From f03bbbeeb0936ad8e278ac4bd71422a0e38ed3e0 Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Tue, 2 Dec 2025 14:47:32 +0530 Subject: [PATCH] feat(ui): add in-app modals for user guide and shortcuts. Create `shortcuts.html` as a standalone reference page. Implement `#shortcuts-modal` in `index.html` to display key bindings. Implement `#guide-modal` with an iframe to embed `User_Manual.html` directly in the app. Refactor header navigation into color-coded buttons (Green/Blue/Amber-Indigo). Update `src/dom.js` and `src/ui.js` to handle modal visibili and interactions (ESC key, 'k' key, click-to-close). Improve visual consistency of header button heights and moda styling. --- steps/index.html | 155 +++++++++++++++++++++++++++++++++++++++++-- steps/shortcuts.html | 137 ++++++++++++++++++++++++++++++++++++++ steps/src/dom.js | 7 ++ steps/src/ui.js | 64 ++++++++++++++++++ 4 files changed, 358 insertions(+), 5 deletions(-) create mode 100644 steps/shortcuts.html diff --git a/steps/index.html b/steps/index.html index 73df086..f08f4ff 100644 --- a/steps/index.html +++ b/steps/index.html @@ -177,6 +177,48 @@ } /* --- END: CSS for Resizable/Draggable Panel --- */ + + /* --- Keyboard Shortcuts Modal Styling --- */ + kbd { + background-color: #e2e8f0; + /* slate-200 */ + border: 1px solid #cbd5e1; + /* slate-300 */ + border-bottom-width: 2px; + color: #334155; + /* slate-700 */ + border-radius: 0.375rem; + padding: 0.125rem 0.5rem; + font-family: monospace; + font-size: 0.75rem; + line-height: 1rem; + font-weight: 600; + display: inline-block; + margin: 0 0.125rem; + } + + /* Dark mode support for kbd */ + .dark kbd { + background-color: #475569; + /* slate-600 */ + border-color: #64748b; + /* slate-500 */ + color: #f1f5f9; + /* slate-100 */ + } + + .feature-card { + /* Inherits bg-white/dark:bg-gray-800 from parent or class */ + border: 1px solid #e2e8f0; + border-radius: 0.75rem; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05); + } + + .dark .feature-card { + border-color: #4b5563; + /* gray-600 */ + box-shadow: none; + } @@ -203,11 +245,15 @@ (i) - + + + @@ -483,6 +529,80 @@ + + +