diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-24 22:29:27 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-24 22:29:27 +0800 |
| commit | 09a09678508c7fddadb6f5c56fd3de871599240d (patch) | |
| tree | 443a5603c4dc3fe39f39b8f328b0af75f993f990 | |
| parent | 331ffb2b52602ad45248f45c78eadb1df930682d (diff) | |
feat: enhance active state styling for home nav item
Adds a background highlight div for active navigation items and updates button classes for improved appearance and hover behavior.
Former-commit-id: 9eae579503c9eda4fd0b95d1cfd0955f1146e5b3
| -rw-r--r-- | layouts/_partials/home/home-nav-item.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/_partials/home/home-nav-item.html b/layouts/_partials/home/home-nav-item.html index b5554acb..cffe62ba 100644 --- a/layouts/_partials/home/home-nav-item.html +++ b/layouts/_partials/home/home-nav-item.html @@ -5,8 +5,14 @@ <div class="flex-shrink-0 flex-grow-0"> <a data-umami-event="🧠Click postnav link" href="{{ .Site.LanguagePrefix }}/{{ $link }}" - class="small-button {{ if $active }}font-extrabold{{ end }}" + class="texl-base md:text-lg relative px-2 py-1 + hover:no-underline + {{ if $active }}font-extrabold{{ end }}" > + {{ if $active }} + <div class="absolute -z-1 top-0 left-0 w-full h-full rounded bg-blockBg" + style="view-transition-name: home-nav-item;"></div> + {{ end }} {{ $text }} </a> </div> |
