From 4276406a5a8c1efd98d4659a08a23716760584d8 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Tue, 22 Sep 2026 22:25:46 +0900 Subject: Footer.astro: 編集履歴のリンクを最終更新日の下に追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starlight標準のEditLinkをやめ、最終更新日のすぐ下にcgitの編集履歴(履歴アイコン)を置くようにした。 --- src/components/starlight/Footer.astro | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'src/components') diff --git a/src/components/starlight/Footer.astro b/src/components/starlight/Footer.astro index e553e60..65a61ce 100644 --- a/src/components/starlight/Footer.astro +++ b/src/components/starlight/Footer.astro @@ -1,5 +1,4 @@ --- -import EditLink from 'virtual:starlight/components/EditLink'; import Pagination from 'virtual:starlight/components/Pagination'; import config from 'virtual:starlight/user-config'; import { Icon } from '@astrojs/starlight/components'; @@ -39,7 +38,6 @@ const lastUpdated = route.lastUpdated;
- { lastUpdated && (

@@ -48,6 +46,14 @@ const lastUpdated = route.lastUpdated;

) } + { + route.editUrl && ( + + + {Astro.locals.t('page.editLink')} + + ) + }
@@ -67,15 +73,24 @@ const lastUpdated = route.lastUpdated; gap: 1.5rem; } .meta { - gap: 0.75rem 3rem; - justify-content: space-between; - flex-wrap: wrap; + flex-direction: column; + align-items: flex-end; + gap: 0.35rem; margin-top: 3rem; font-size: var(--sl-text-sm); color: var(--sl-color-gray-3); } - .meta > :global(p:only-child) { - margin-inline-start: auto; + .meta > :global(p) { + margin: 0; + } + .edit-history { + align-items: center; + gap: 0.35em; + text-decoration: none; + color: var(--sl-color-gray-3); + } + .edit-history:hover { + color: var(--sl-color-white); } .kudos { -- cgit v1.3.1