diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/starlight/PageTitle.astro | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/starlight/PageTitle.astro b/src/components/starlight/PageTitle.astro index 352e1c3..eba8bbd 100644 --- a/src/components/starlight/PageTitle.astro +++ b/src/components/starlight/PageTitle.astro @@ -1,5 +1,7 @@ --- import Breadcrumbs from './Breadcrumbs.astro'; + +const { title, subtitle } = Astro.locals.starlightRoute.entry.data; --- {Astro.url.pathname !== "/" && ( @@ -7,7 +9,8 @@ import Breadcrumbs from './Breadcrumbs.astro'; <div id="_top"> <Breadcrumbs /> </div> - <h1>{Astro.locals.starlightRoute.entry.data.title}</h1> + <h1>{title}</h1> + {subtitle && <p class="page-subtitle">{subtitle}</p>} </> )} @@ -20,5 +23,14 @@ import Breadcrumbs from './Breadcrumbs.astro'; font-weight: 600; color: var(--sl-color-white); } + + .page-subtitle { + margin-top: 0.75rem; + margin-bottom: 0; + font-size: var(--sl-text-lg); + line-height: var(--sl-line-height-headings); + font-weight: 400; + color: var(--sl-color-gray-2); + } } </style> |
