From 1427bf4b507f849726a8028c81fe79832070ad3c Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Tue, 22 Sep 2026 13:23:46 +0900 Subject: PageTitle.astro: ページに副題(subtitle)を表示できるようにする MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starlight のスキーマに subtitle(任意)を追加し、h1 の下に表示する。請願第19号の審査ページに副題を設定した(サイドバーには出ない)。 --- src/components/starlight/PageTitle.astro | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/components') 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';
-

{Astro.locals.starlightRoute.entry.data.title}

+

{title}

+ {subtitle &&

{subtitle}

} )} @@ -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); + } } -- cgit v1.3.1