templates, handlers, CSS, JS: special cakes UI, HTMX nav, dashboard overhaul

Special cakes UI: overlay drawer, basket integration, catalogue tag
filter, form parsing, JS save/edit/remove.
HTMX navigation: MainContent component, nav links with hx-get,
handlers return partial on HX-Request.
Dashboard: metrics grid, CakeBreakdown, OrderRow with status select,
CakeCounts/OrderCounts, torty filter, tort badge, results-pane.
Collapsible sidebar: toggle button, localStorage, CSS transitions.
Location field: dropdown replaced with pill toggle.
Inline style cleanup: moved to CSS classes (tag-grid, grow, icon.sm,
header-actions, toggle-group, success-icon, etc.).
Dead CSS removal: pagination, status-chip, badge-pill, login-page.
Helpers: exported CakeTitle/OrderTitle, added tagNames, tagIDsComma,
orderItemsDesc, specialCakeDetail, removed unused helpers.
This commit is contained in:
bronkuu 2026-06-15 18:50:21 +02:00
parent 17b92a706a
commit 5a5372b831
18 changed files with 1153 additions and 422 deletions

View file

@ -11,23 +11,54 @@ aside.sidebar {
flex-direction: column;
padding: 1rem;
z-index: 40;
transition: width 0.2s ease, padding 0.2s ease;
.brand {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1.5rem;
padding: 0 0.5rem;
h1 {
font-size: 1.25rem;
font-weight: 700;
color: var(--primary);
letter-spacing: -0.01em;
line-height: 1.3;
.collapse-btn {
background: none;
border: none;
cursor: pointer;
color: var(--on-surface-variant);
padding: 0.25rem;
border-radius: var(--border-radius-sm);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:hover {
background: var(--surface-container-high);
color: var(--on-surface);
}
.material-symbols-outlined {
font-size: 1.25rem;
}
}
p {
font-size: 0.75rem;
color: var(--on-surface-variant);
margin-top: 0.25rem;
.brand-text {
overflow: hidden;
white-space: nowrap;
h1 {
font-size: 1.25rem;
font-weight: 700;
color: var(--primary);
letter-spacing: -0.01em;
line-height: 1.3;
}
p {
font-size: 0.75rem;
color: var(--on-surface-variant);
margin-top: 0.25rem;
}
}
}
@ -140,6 +171,47 @@ aside.sidebar {
}
}
/* ---------- COLLAPSED ---------- */
body.sidebar-collapsed aside.sidebar {
width: 3.5rem;
padding: 0.5rem;
.brand .brand-text {
display: none;
}
.cta {
padding: 0;
width: 2.5rem;
height: 2.5rem;
margin-left: auto;
margin-right: auto;
border-radius: 50%;
span:not(.material-symbols-outlined) {
display: none;
}
}
nav a.link {
justify-content: center;
padding: 0.75rem 0.5rem;
span:not(.material-symbols-outlined) {
display: none;
}
}
footer .user .info {
display: none;
}
}
body.sidebar-collapsed main {
margin-left: 3.5rem;
width: calc(100% - 3.5rem);
}
/* ========== MAIN LAYOUT ========== */
main {
margin-left: var(--sidebar-width);
@ -147,6 +219,7 @@ main {
display: flex;
flex-direction: column;
height: 100dvh;
transition: margin-left 0.2s ease, width 0.2s ease;
}
/* ========== TOP NAVBAR ========== */
@ -228,14 +301,13 @@ header.topnav {
}
@media (max-width: 48em) {
aside.sidebar {
body:not(.sidebar-collapsed) aside.sidebar {
width: 3.5rem;
padding: 0.5rem;
.brand h1,
.brand p,
nav a.link span:not(.material-symbols-outlined),
.brand .brand-text,
.cta span:not(.material-symbols-outlined),
nav a.link span:not(.material-symbols-outlined),
.user .info {
display: none;
}
@ -258,6 +330,18 @@ header.topnav {
}
}
body.sidebar-collapsed aside.sidebar {
width: 0;
padding: 0;
overflow: hidden;
border-right: none;
}
body.sidebar-collapsed main {
margin-left: 0;
width: 100%;
}
main {
margin-left: 3.5rem;
width: calc(100% - 3.5rem);