diff --git a/cmd/foodster/static/app.css b/cmd/foodster/static/app.css index 794a866..fcd8c10 100644 --- a/cmd/foodster/static/app.css +++ b/cmd/foodster/static/app.css @@ -20,6 +20,11 @@ --kala: light-dark(#25688F, #63AAD8); --kasvis: light-dark(#457A3C, #82BE7A); + /* Its own name rather than reusing --card, so the header can be recoloured + later without dragging every card with it. Keep the theme-color meta tags + in views.templ in step: those need literal hex. */ + --header: light-dark(#FFFFFF, #1C1E22); + --tap: 48px; /* minimum touch target */ } @@ -43,11 +48,15 @@ button, input, select { font: inherit; } :focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; } @media (prefers-reduced-motion: reduce) { * { transition: none !important; } } +/* The header is the brand and the theme toggle, and nothing else. The page + title below it is content, so it stays on the page background. */ .brandbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; + background: var(--header); + border-bottom: 1px solid var(--line); } .brand { display: flex; @@ -84,9 +93,7 @@ html[data-theme="dark"] .themetoggle .i-sun { display: none; } html[data-theme="light"] .themetoggle .i-moon { display: none; } .appbar { - background: var(--paper); - border-bottom: 1px solid var(--line); - padding: 2px 16px 12px; + padding: 16px 16px 4px; } .appbar h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; } .appbar .meta { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); } diff --git a/cmd/foodster/views.templ b/cmd/foodster/views.templ index 5944fde..18fe049 100644 --- a/cmd/foodster/views.templ +++ b/cmd/foodster/views.templ @@ -78,8 +78,10 @@ templ page(title, current string) { - - + // Matches --header in app.css so the browser chrome continues the + // header rather than butting against it. + +