diff --git a/app/app.py b/app/app.py index 4cab548..23affd4 100644 --- a/app/app.py +++ b/app/app.py @@ -271,18 +271,23 @@ footer a.fb{display:inline-flex;align-items:center;gap:8px} .annc{border-bottom:1px solid;font-family:'Public Sans',system-ui,sans-serif} .annc-info{background:#F3EBD8;border-color:#E8DCBB;color:#6B5510} .annc-urgent{background:#F6E3DA;border-color:#DFB9A4;color:#8A3B1D} -.anncrow{display:flex;align-items:center;gap:9px;padding:11px 0} +.anncrow{display:flex;align-items:flex-start;gap:9px;padding:11px 0} +.topstick{position:sticky;top:0;z-index:60} +.topstick header.nav{position:static} +.topstick:has(.annc[open]){position:static} .annc summary{cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent} .annc summary::-webkit-details-marker{display:none} .annc summary:focus-visible{outline:2px solid currentColor;outline-offset:-3px} -.anncico,.anncchev{flex:none;display:flex;align-items:center} +.anncico,.anncchev{flex:none;display:flex;align-items:center;margin-top:1px} .anncchev{transition:transform .15s ease} .annc[open] .anncchev{transform:rotate(180deg)} -.anncline{flex:1;min-width:0;font-size:14px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +.anncline{flex:1;min-width:0;font-size:14px;line-height:1.4;overflow-wrap:anywhere} +.ancctop{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden} +@media(max-width:560px){.ancctop{-webkit-line-clamp:3}} .anncopen{display:none} .annc[open] .ancctop{display:none} .annc[open] .anncopen{display:block;font-weight:600} -.annccount{flex:none;font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;border:1px solid currentColor} +.annccount{flex:none;margin-top:1px;font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;border:1px solid currentColor} .annc[open] .annccount{display:none} .anncbody{max-height:40vh;overflow-y:auto;padding-bottom:12px} .anncitem{padding:10px 0 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere} @@ -324,7 +329,12 @@ def announcement_bar(): must never take down the public homepage, so any error here renders an empty string and logs. - Collapsed shows the top-ranked notice on one clamped line plus a count. + Collapsed clamps to two lines, three on a phone, because one line cut the + actual location out of a venue change - the only part of the notice that + mattered. A single notice does not clamp at all: it has no expand + affordance, so clamping it would lose text with no way to recover it. + + Collapsed shows the top-ranked notice plus a count. Expanded lists all of them. Native
, so there is no JavaScript and nothing to load - which matters on a read-only rootfs with no build step. The single-notice case, which is nearly always the case, renders @@ -386,7 +396,7 @@ def page(title, body, active=""): -{announcement_bar()} +
{announcement_bar()} +
{body}