diff --git a/samples/hp48/index.html b/samples/hp48/index.html index ca49400..a7dec97 100644 --- a/samples/hp48/index.html +++ b/samples/hp48/index.html @@ -93,6 +93,18 @@ display: grid; grid-template-columns: 26px 1fr; gap: 8px; + padding: 1px 4px; + border-radius: 4px; + } + + .stack-line.selected { + background: rgba(27, 42, 18, 0.14); + outline: 1px dashed rgba(27, 42, 18, 0.45); + } + + .stack-line.moving { + background: rgba(140, 255, 109, 0.18); + outline: 1px solid rgba(27, 42, 18, 0.55); } .stack-line .label { @@ -100,6 +112,12 @@ color: var(--screen-dim); } + .stack-line.selected .label, + .stack-line.moving .label { + color: var(--screen-text); + font-weight: bold; + } + .hidden-input { position: absolute; left: -9999px; @@ -129,6 +147,7 @@ } .panel { + position: relative; margin-top: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); @@ -144,10 +163,66 @@ letter-spacing: 0.08em; } - .buttons { + .keypad-labels { + display: grid; + grid-template-columns: 4fr 3fr 2fr; + gap: 12px; + margin-bottom: 10px; + } + + .keypad-label { + color: #d8d8d8; + font-size: 11px; + font-weight: bold; + letter-spacing: 0.08em; + text-transform: uppercase; + text-align: center; + padding: 6px 8px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.08); + } + + .keypad-wrap { + display: grid; + grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 2fr); + gap: 12px; + align-items: start; + } + + .keypad-group { display: grid; gap: 8px; - grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); + } + + .keypad-group.functions { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .keypad-group.numbers { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .keypad-group.operators { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .keypad-group button, + .keypad-group .keypad-spacer { + min-height: 46px; + } + + .keypad-spacer { + min-height: 46px; + } + + .keypad button.active-toggle { + background: linear-gradient(180deg, #6a8c52, #49693a); + color: #fff; + } + + .keypad-group button.enter-tall { + grid-row: span 2; } button { @@ -177,6 +252,30 @@ background: rgba(255, 255, 255, 0.05); } + .constants-menu { + position: absolute; + top: 54px; + left: 14px; + z-index: 10; + display: grid; + gap: 6px; + min-width: 84px; + padding: 8px; + background: linear-gradient(180deg, #373737, #242424); + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 12px; + box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); + } + + .constants-menu[hidden] { + display: none; + } + + .constants-menu button { + width: 100%; + min-height: 40px; + } + .error { margin-top: 10px; min-height: 20px; @@ -191,6 +290,57 @@ font-size: 13px; line-height: 1.5; } + + @media (max-width: 820px) { + .wrap { + padding: 16px; + } + + .input-row { + grid-template-columns: 1fr; + } + + .keypad-labels, + .keypad-wrap { + gap: 8px; + } + + .keypad-group.functions { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .keypad-group.numbers, + .keypad-group.operators { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + + @media (max-width: 640px) { + .calc { + padding: 14px; + border-radius: 16px; + } + + .brand { + flex-direction: column; + align-items: flex-start; + } + + .keypad-labels, + .keypad-wrap { + grid-template-columns: 1fr; + } + + .keypad-group.functions, + .keypad-group.numbers, + .keypad-group.operators { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + .keypad-group.operators { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } @@ -213,7 +363,7 @@
-
Keyboard input is captured directly by the screen
+
Keyboard works globally: digits, numpad, Enter, Backspace, Delete, Esc, ↑, ↓, →, +, -, *, /, %, ^, q, n, r, i, g, l, s, c, S, C, x, y, z, t