Replace tiny logo with full-width hero banner across all pages#916
Conversation
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
… logo sizing and text readability - Increase backdrop-filter blur from 1px to 6px to obscure baked-in banner text - Increase overlay gradient opacity (light: 0.45-0.72, dark: 0.55-0.82) - Increase site-logo max size from 80-140px to 100-160px with responsive breakpoints - Add responsive logo sizing (80px on mobile, 100px on tablet) - Add light-theme text-shadow overrides for hero banner h1 and tagline - Improve dark mode text shadows for better readability - Fix mobile content overflow by constraining logo height at smaller viewports - Increase gap from xs to sm for better spacing between hero elements Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…tle below banner - Remove hero-banner-overlay: no more text placed over the banner image - Move logo above banner in its own .hero-logo-link container - Move h1 and tagline below banner in new .hero-header-text container - Banner image now displays clean without any overlay or blur - Update all 14 language index files + dashboard/index.html - Replace overlay CSS with clean layout CSS for logo, banner, and text sections - Add responsive breakpoints for new layout (480px, 768px) - Reduce banner height since it no longer needs to contain text - All 2682 tests pass, HTMLhint validation clean Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
- Remove .hero-logo-link from all 14 language index files + dashboard - Remove .hero-logo-link CSS (no longer needed) - Increase banner height from clamp(180px,28vw,300px) to clamp(220px,32vw,380px) - Banner displays the full Riksdagsmonitor branding prominently - h1 + tagline remain below banner for SEO/accessibility - HTMLhint 0 errors, 2682 tests pass Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…template - Replace tiny site-logo with full hero-banner in all 13 dashboard language files - Update news index template to use riksdagsmonitornews-banner.webp - Add localized page-nav (Home/News links) to all dashboard pages - HTMLhint 0 errors (1314 files), all 2682 tests pass Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
This PR standardizes the site’s hero area by removing the redundant small logo and relying on the full-width banner image as the primary branding element, applying the same hero/banner + title pattern across main index pages, dashboard language variants, and the news index template.
Changes:
- Refactors hero markup across main
index*.htmlanddashboard/index*.htmlfiles to remove the overlay/logo block and place the title/tagline below the banner. - Updates the news index generator template to use the full-width
riksdagsmonitornews-banner.webphero banner instead of the small news logo. - Adjusts
styles.csshero banner sizing and removes overlay-related CSS; adds more responsive.site-logosizing rules.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| styles.css | Updates hero banner sizing and switches styling from overlay-based hero text to below-banner .hero-header-text; adjusts .site-logo responsiveness. |
| scripts/generate-news-indexes/template.ts | Updates generated news index header to use a hero banner + below-banner title block. |
| index.html | Removes hero overlay/logo and moves title/tagline into .hero-header-text below the banner. |
| index_ar.html | Same hero refactor as index.html for Arabic homepage. |
| index_da.html | Same hero refactor as index.html for Danish homepage. |
| index_de.html | Same hero refactor as index.html for German homepage. |
| index_es.html | Same hero refactor as index.html for Spanish homepage. |
| index_fi.html | Same hero refactor as index.html for Finnish homepage. |
| index_fr.html | Same hero refactor as index.html for French homepage. |
| index_he.html | Same hero refactor as index.html for Hebrew homepage. |
| index_ja.html | Same hero refactor as index.html for Japanese homepage. |
| index_ko.html | Same hero refactor as index.html for Korean homepage. |
| index_nl.html | Same hero refactor as index.html for Dutch homepage. |
| index_no.html | Same hero refactor as index.html for Norwegian homepage. |
| index_sv.html | Same hero refactor as index.html for Swedish homepage. |
| index_zh.html | Same hero refactor as index.html for Chinese homepage. |
| dashboard/index.html | Removes hero overlay/logo and places dashboard title/tagline below the banner. |
| dashboard/index_ar.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_da.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_de.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_es.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_fi.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_fr.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_he.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_ja.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_ko.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_nl.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_no.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_sv.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| dashboard/index_zh.html | Replaces old header logo/title block with hero banner + below-banner title + page nav. |
| .gitignore | Ignores before/after screenshot artifacts and a news article check image. |
| @media (max-width: 768px) { | ||
| .hero-banner { | ||
| height: clamp(200px, 50vw, 300px); | ||
| height: clamp(160px, 35vw, 260px); | ||
| } | ||
| .hero-banner-overlay { | ||
| padding: var(--spacing-sm); | ||
| .hero-header-text { | ||
| padding: var(--spacing-sm) var(--spacing-sm) 0; | ||
| } | ||
| } | ||
|
|
||
| @media (max-width: 480px) { | ||
| .hero-banner { | ||
| height: clamp(180px, 55vw, 260px); | ||
| height: clamp(130px, 40vw, 200px); | ||
| } |
There was a problem hiding this comment.
The hero banner height values jump up at the responsive breakpoints (e.g., at 768px and 480px wide the max-width media queries switch to a larger vw factor / clamp range). This can cause noticeable layout shifts when resizing or rotating devices. Consider adjusting the clamp ranges so height changes smoothly/monotonically across breakpoints (or rely on a single clamp without breakpoint overrides).
| <!-- Hero Banner --> | ||
| <div class="hero-banner"> | ||
| <img src="../images/riksdagsmonitornews-banner.webp" alt="" class="hero-banner-bg" width="1536" height="1024" loading="eager" aria-hidden="true"> | ||
| </div> | ||
| <!-- Hero Title --> | ||
| <div class="hero-header-text"> | ||
| <h1>${escapeHtml(lang.title)}</h1> | ||
| <p class="subtitle">${lang.subtitle}</p> | ||
| </div> |
There was a problem hiding this comment.
This updates the news index header to use the hero banner, but the generated news article pages (and scripts/article-template/template.ts) still reference riksdagsmonitornews-logo.webp / .article-site-logo. If the PR goal is “full-width hero banner across all pages”, consider updating the article template + regenerating articles as well, or adjust the PR title/description to clarify that only the news index pages were updated.
|
@copilot apply changes based on the comments in this thread |
- Replace 3 breakpoint-specific hero-banner height clamps with single smooth clamp(130px, 28vw, 380px) to eliminate layout jumps at 768px and 480px breakpoints - Update article template to use riksdagsmonitornews-banner.webp hero banner instead of tiny 100x100 logo - Update all 1022 existing news article files to use hero banner - HTMLhint 0 errors, all 2682 tests pass Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Applied both review comments in commit
|
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Signed-off-by: James Pether Sörling <pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |

The hero section displayed a tiny 80-120px logo above the full-width banner image — redundant since the banner already contains the Riksdagsmonitor branding. Dashboard language files (13), the news index template, and news article pages were also missed in the initial cleanup.
Changes
.hero-logo-linkfrom all 14 main index files + dashboard — banner image IS the brandingsite-logoheader withhero-banner+hero-header-text+page-navpattern matchingdashboard/index.htmlriksdagsmonitornews-logo.webp(100×100) forriksdagsmonitornews-banner.webp(1536×1024)article-site-logowith full-widthriksdagsmonitornews-banner.webphero bannerclamp(130px, 28vw, 380px)replaces 3 breakpoint-specific clamps that caused layout jumps at 768px and 480px.hero-logo-linkCSS — dead code cleanupBefore (dashboard language file):
After:
Main page
Dashboard (Swedish) / News index / Article page
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.