diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-09-22 22:25:46 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-09-22 22:25:46 +0900 |
| commit | 4276406a5a8c1efd98d4659a08a23716760584d8 (patch) | |
| tree | 86c8365f053fd27cdda225c3b4cbd84b2463726a /src/components | |
| parent | 48d033ef73d39557ad979fde1e5792353d476097 (diff) | |
Footer.astro: 編集履歴のリンクを最終更新日の下に追加
Starlight標準のEditLinkをやめ、最終更新日のすぐ下にcgitの編集履歴(履歴アイコン)を置くようにした。
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/starlight/Footer.astro | 29 |
1 files changed, 22 insertions, 7 deletions
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; <SocialShare title={caption} /> <div class="meta sl-flex"> - <EditLink /> { lastUpdated && ( <p> @@ -48,6 +46,14 @@ const lastUpdated = route.lastUpdated; </p> ) } + { + route.editUrl && ( + <a class="edit-history sl-flex" href={route.editUrl}> + <Icon name="code-branch" /> + {Astro.locals.t('page.editLink')} + </a> + ) + } </div> <Pagination /> @@ -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 { |
