Published

Page Headers Documentation

Page Headers Documentation

This document provides a comprehensive overview of how page headers are handling across the application, mapping routes to header components and detailing the configuration of the generic PageHeader component.

Header Component Mapping

Multiple header implementations exist to suit different page designs. The Generic PageHeader is the standard for content-heavy pages, while specialized heroes are used for Marketing/Landing pages.

Page RouteComponent UsedDescription
/partnersPageHeaderGeneric header with title/subtitle.
/teamPageHeaderGeneric header with title/subtitle.
/impact-scorePageHeaderGeneric header with title/subtitle.
/opensourcePageHeaderGeneric header with title/subtitle.
/contactContactHeroSpecialized hero with highlights and contact channels.
/releasesOpendataHeroSpecialized hero with "latest release" badge and education card.
/opendata/*OpendataHeroShared hero logic for open data pages (presumed).
/blogTheArticles.vueEmbedded custom hero section (HTML/CSS in component).
/ (Home)HomeHeroFull-screen hero with nudge wizard (not listed above but distinct).

internal: PageHeader Component

The PageHeader (app/components/shared/header/PageHeader.vue) is the unified component for standard pages. It resolves theme assets via useThemeAsset.

Usage Example

<PageHeader
  title="My Page Title"
  subtitle="A descriptive subtitle"
  background="image"
  background-image-asset-key="heroBackground"
  container="semi-fluid"
/>

Configuration Options

PropTypeDefaultDescription
titlestring-Main heading (H1).
subtitlestring-Subheading text.
background'surface-variant' | 'image' | 'gradient' | 'parallax''surface-variant'Background style.
backgroundImageAssetKeyThemeAssetKey-Key to resolve background image from theme assets.
container'fluid' | 'semi-fluid' | 'lg' | 'xl''lg'Container width.
eyebrowstring-Small uppercase label above title.

Theme Asset Integration

  1. Define Asset: Ensure the asset key (e.g., heroBackground) is defined in frontend/config/theme/assets.ts.
  2. Configure Theme Assets: Map the key to a path in frontend/config/theme/assets.ts.
  3. Use Prop: Pass background-image-asset-key="heroBackground" to PageHeader.

Note: Specialized heroes (ContactHero, OpendataHero, etc.) do not currently support PageHeader theme asset backgrounds, as they rely on HeroSurface or custom CSS.