diff --git a/js/theme-toggle.js b/js/theme-toggle.js index 533e20bae..24ff18cef 100644 --- a/js/theme-toggle.js +++ b/js/theme-toggle.js @@ -84,3 +84,38 @@ }, 350); }); }()); + +/** + * Brand-logo bitmap fallback bootstrap. + * + * The header brand row renders an `` + * stacked over a `🇸🇪` flag glyph fallback. When the bitmap loads + * successfully we add `.rm-logo-img-loaded` to the parent ` +
@@ -7607,7 +7624,7 @@ · Built by Hack23 AB

- +
- + ${(opts.languageBar ?? true) ? ` + ` : ''} ${opts.breadcrumbHtml ?? ''}
`; diff --git a/styles.css b/styles.css index 073987855..904a449b0 100644 --- a/styles.css +++ b/styles.css @@ -12144,6 +12144,15 @@ html[data-theme="light"] .footer-disclaimer a { backdrop-filter: blur(18px); } +/* Publishes the sticky header's nominal height so siblings positioned + below it (e.g. `.rm-lang-bar`) can stick beneath rather than under it. + Defined on `:root` so descendant siblings inherit it; layouts with a + non-default header height can override this single token without + touching the consumer rules. */ +:root { + --rm-site-header-sticky-offset: 72px; +} + .rm-site-header-inner { max-width: 1200px; margin: 0 auto; @@ -12312,6 +12321,137 @@ html[data-theme="light"] .footer-disclaimer a { .rm-lang-current-label { display: none; } } +/* ---- brand image logo (PR2012 regression fix) --------------------------- + The unified `buildChrome` originally rendered only an emoji glyph, so the + real `riksdagsmonitor-logo.webp` was missing from every generated page + (news index, sitemap, political-intelligence and articles). The chrome + now emits an `` ahead of the existing + `.rm-logo-glyph`; the glyph stays in DOM as an automatic fallback when + the image fails to load (e.g. ad-blocked CDN paths) so the brand row + never collapses to plain text. */ +.rm-logo-img { + width: 40px; + height: 40px; + border-radius: 6px; + object-fit: contain; + display: inline-block; + flex-shrink: 0; + background: transparent; +} + +/* When the bitmap logo loads, the `🇸🇪` flag glyph would duplicate the + brand mark — hide the glyph only after the image successfully loads. + `theme-toggle.js` adds `.rm-logo-img-loaded` on the parent `