feat(calc-02): add shared popup menus for mode and constants

Refactor the calc-02 demo to use a single popup menu component for angle mode and constants, align the menus to their trigger buttons, and update the README/project notes to reflect the portrait-first demo layout and constant API.
This commit is contained in:
2026-05-16 04:04:01 +02:00
parent e5f50aee0a
commit 003d4fde1b
4 changed files with 69 additions and 91 deletions
+3 -21
View File
@@ -1,5 +1,4 @@
:root {
--bg0: #10151e;
--bg1: #1b2432;
@@ -42,7 +41,6 @@ body {
background: var(--bg0);
}
.app-shell {
min-height: 100vh;
display: grid;
@@ -113,9 +111,6 @@ body {
max-height: 138px;
margin-bottom: 0;
}
.display-grid {
height: 100%;
display: grid;
@@ -125,7 +120,6 @@ body {
gap: 2px;
}
.stack-cell {
display: grid;
grid-template-columns: 2.2ch auto minmax(0, 1fr);
@@ -137,7 +131,6 @@ body {
padding-block: 0;
}
.stack-label {
text-align: right;
opacity: 0.78;
@@ -152,8 +145,6 @@ body {
justify-self: end;
font-size: 20px;
}
.display-buttons-panel {
grid-area: display-buttons;
padding: 8px;
@@ -183,7 +174,6 @@ body {
box-shadow: none;
}
.display-button-symbol {
display: inline-flex;
align-items: center;
@@ -203,8 +193,7 @@ body {
padding: 6px 8px;
}
.mode-menu {
.menu-popup {
position: fixed;
z-index: 20;
display: flex;
@@ -218,7 +207,7 @@ body {
backdrop-filter: blur(2px);
}
.mode-menu-item {
.menu-popup-item {
width: 100%;
min-width: 0;
padding: 6px 10px;
@@ -228,7 +217,7 @@ body {
font-weight: 700;
}
.mode-menu-item.is-active {
.menu-popup-item.is-active {
outline: 1px solid rgba(207, 224, 174, 0.7);
outline-offset: 0;
}
@@ -295,10 +284,6 @@ body {
.functions-grid,
.trigo-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.functions-grid,
.trigo-grid {
grid-template-rows: repeat(2, minmax(0, 1fr));
}
@@ -321,7 +306,6 @@ button:hover {
filter: brightness(1.06);
}
button:active {
transform: none;
box-shadow: none;
@@ -342,8 +326,6 @@ button:active {
opacity: 0.7;
}
}
.stack-copy-button {
padding: 4px;
min-width: 24px;