diff --git a/Elternbeirat.Web/Components/App.razor b/Elternbeirat.Web/Components/App.razor index a336909..befd164 100644 --- a/Elternbeirat.Web/Components/App.razor +++ b/Elternbeirat.Web/Components/App.razor @@ -5,6 +5,14 @@ + @* Tab icon: the speech bubble with a grown-up and a child, filled with the header + gradient. The IGMH mark is unreadable at tab size, the bubble is not. SVG stays + sharp at every size; the PNG is for browsers without SVG icons. SVG comes last + because some browsers take the last icon they can use. The apple-touch-icon is + what phones use for a home-screen bookmark. *@ + + + diff --git a/Elternbeirat.Web/Components/Layout/MainLayout.razor.css b/Elternbeirat.Web/Components/Layout/MainLayout.razor.css index 2b9a7f5..7d89391 100644 --- a/Elternbeirat.Web/Components/Layout/MainLayout.razor.css +++ b/Elternbeirat.Web/Components/Layout/MainLayout.razor.css @@ -68,12 +68,12 @@ outline-color: var(--color-focus-inverse); } -/* The signet lives in its own component (Signet.razor), so its carries that +/* The signet lives in its own component (Signet.razor), so its carries that component's scope attribute, not this one's; ::deep reaches it from here. */ .brand ::deep .signet { flex-shrink: 0; - width: 2.5rem; - height: 2.5rem; + width: 3rem; + height: 3rem; } .brand-text { @@ -94,8 +94,10 @@ } /* The links are pills with their own padding (see app.css), so the gap between - them can stay small. */ + them can stay small. margin-left:auto pushes the menu to the right edge, away + from the brand -- the usual split, brand left, menu right. */ .main-nav { + margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; @@ -178,8 +180,8 @@ .footer-brand ::deep .signet { flex-shrink: 0; - width: 3rem; - height: 3rem; + width: 3.5rem; + height: 3.5rem; } /* Column headings label the lists; they are not a second page heading, so they @@ -229,16 +231,24 @@ font-size: 0.85rem; } -/* Mobile: on narrow screens the nav collapses behind a hamburger button. This is - pure CSS -- the #nav-toggle checkbox holds the open/closed state and its - :checked state reveals the nav. No JavaScript, so it works under static SSR. */ -@media (max-width: 40rem) { +/* Narrow screens: the nav collapses behind a hamburger button. This is pure CSS -- + the #nav-toggle checkbox holds the open/closed state and its :checked state + reveals the nav. No JavaScript, so it works under static SSR. Without JavaScript + the header cannot measure whether the links still fit, so the switch happens at a + fixed width instead: brand plus the current menu need about 1000 px. When the + menu in PocketBase gets longer and the links start to wrap, raise this value + (and the matching one in app.css). */ +@media (max-width: 64rem) { /* The brand stays on the left, the hamburger goes to the right, and the nav occupies its own full-width row below both. */ .header-inner { flex-wrap: wrap; align-items: center; justify-content: space-between; + /* No row gap: the folded nav is a zero-height second row, and a gap above + it would leave empty space under the brand, pushing it off centre. The + open nav brings its own distance instead (margin-top below). */ + row-gap: 0; } /* The checkbox comes back as a real, focusable control -- only visually hidden @@ -322,11 +332,34 @@ transition: max-height 0.2s ease; max-height: 70vh; overflow-y: auto; - margin-top: 0.5rem; + margin-top: var(--space-3); } /* Mobile per-link spacing for .main-nav a is in the global app.css too, for the same scoped-attribute reason as above. */ +} + +/* Phones. */ +@media (max-width: 40rem) { + /* The header stays pinned while scrolling, so on a small screen every pixel of + its height is lost for content. Less padding, a smaller signet and lettering + bring it down to about 56 px, the usual height of a phone's top bar. */ + .header-inner { + padding-block: var(--space-2); + } + + .brand ::deep .signet { + width: 2.5rem; + height: 2.5rem; + } + + .brand-name { + font-size: 1.15rem; + } + + .brand-school { + font-size: 0.75rem; + } /* The footer columns stack: one column, brand on top. */ .footer-inner { diff --git a/Elternbeirat.Web/Features/Home/Home.razor b/Elternbeirat.Web/Features/Home/Home.razor index 1f70fbf..e3efa4a 100644 --- a/Elternbeirat.Web/Features/Home/Home.razor +++ b/Elternbeirat.Web/Features/Home/Home.razor @@ -1,7 +1,7 @@ @page "/" @using Elternbeirat.Web.Features.Events -Elternbeirat der IGMH +Elternbeirat IGMH @* The hero spans the full window width (see Home.razor.css). Its text is the "home" page's body, taken apart by HomeIntro; the card beside it shows the next event. *@ diff --git a/Elternbeirat.Web/Features/Layout/Signet.razor b/Elternbeirat.Web/Features/Layout/Signet.razor index 9ba6ee7..f08b2e3 100644 --- a/Elternbeirat.Web/Features/Layout/Signet.razor +++ b/Elternbeirat.Web/Features/Layout/Signet.razor @@ -1,17 +1,10 @@ @* - The site's own small mark: a speech bubble (the board speaks for the parents) - holding a grown-up and a child. Inline SVG, so there is no extra request and - nothing from a third-party host. Decorative only -- the name next to it carries - the meaning, so it is hidden from screen readers. Colours come from tokens in - Signet.razor.css; the size is set by whoever places it (MainLayout.razor.css). + The IGMH mark: the four squares with "IGMH", in white on a transparent + background, so it sits straight on the header gradient and the dark footer. Made + from the school's black-and-white logo with its subtitle cut off, which would be + unreadable at this size. Served from wwwroot (logo.png, 192 px so it stays sharp + on dense screens), so nothing comes from a third-party host. Decorative only -- + the name next to it carries the meaning, so the alt text is empty. The size is + set by whoever places it (MainLayout.razor.css). *@ - + diff --git a/Elternbeirat.Web/Features/Layout/Signet.razor.css b/Elternbeirat.Web/Features/Layout/Signet.razor.css index a0959e1..22db529 100644 --- a/Elternbeirat.Web/Features/Layout/Signet.razor.css +++ b/Elternbeirat.Web/Features/Layout/Signet.razor.css @@ -1,11 +1,5 @@ -/* A white bubble with green figures. It sits on the header gradient and on the dark - footer, both of which always carry white text, so --color-on-header is right in - both places. The figures use the darker green so they stay distinct on the white - bubble (the lighter --color-accent would wash out). */ -.signet-bubble { - fill: var(--color-on-header); -} - -.signet-figures { - fill: var(--color-accent-dark); +/* The image is already white on transparent; it only needs to behave as a block so + no inline gap appears below it. */ +.signet { + display: block; } diff --git a/Elternbeirat.Web/wwwroot/app.css b/Elternbeirat.Web/wwwroot/app.css index 7da3ef1..8ebbafb 100644 --- a/Elternbeirat.Web/wwwroot/app.css +++ b/Elternbeirat.Web/wwwroot/app.css @@ -525,8 +525,9 @@ main:focus { they stay the same pills as on the desktop, with the stroke under the whole word. Only taller, for a comfortable tap target; the stroke moves up with the extra padding so it still sits right under the text, not at the pill's edge. Same - global placement, same NavLink reason as above. */ -@media (max-width: 40rem) { + global placement, same NavLink reason as above. The width matches the hamburger + breakpoint in MainLayout.razor.css. */ +@media (max-width: 64rem) { .main-nav a { padding: 0.6rem var(--space-3); } diff --git a/Elternbeirat.Web/wwwroot/apple-touch-icon.png b/Elternbeirat.Web/wwwroot/apple-touch-icon.png new file mode 100644 index 0000000..34698d7 Binary files /dev/null and b/Elternbeirat.Web/wwwroot/apple-touch-icon.png differ diff --git a/Elternbeirat.Web/wwwroot/favicon.png b/Elternbeirat.Web/wwwroot/favicon.png new file mode 100644 index 0000000..a8f2dfe Binary files /dev/null and b/Elternbeirat.Web/wwwroot/favicon.png differ diff --git a/Elternbeirat.Web/wwwroot/favicon.svg b/Elternbeirat.Web/wwwroot/favicon.svg new file mode 100644 index 0000000..f1124f3 --- /dev/null +++ b/Elternbeirat.Web/wwwroot/favicon.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/Elternbeirat.Web/wwwroot/logo.png b/Elternbeirat.Web/wwwroot/logo.png new file mode 100644 index 0000000..1fe914e Binary files /dev/null and b/Elternbeirat.Web/wwwroot/logo.png differ