summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-24 22:29:27 +0800
committerEltrac <hi@guhub.cn>2025-09-24 22:29:27 +0800
commit9eae579503c9eda4fd0b95d1cfd0955f1146e5b3 (patch)
treed694eb6a9b594c04eea5a51989030ffd368c1541 /layouts
parent56225a811d512411be3616b86fd9706b5c144d47 (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.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/home/home-nav-item.html8
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>