summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-05 20:42:14 +0800
committerEltrac <hi@guhub.cn>2025-11-05 20:42:14 +0800
commit67d45b9942d272e96b8f4304399f428bc77163c5 (patch)
treeff99b0de94ae9d3d5e1c675c3f88c58a8242e32c
parentd48e9b80f3223d3ce01a54c19fa010c2a6cef4bd (diff)
feat: replace home nav active style with emphasis dot
Former-commit-id: f444e5d6205c57dd4bff630cde257407483cb6f3
-rw-r--r--layouts/_partials/home/home-nav-item.html10
-rw-r--r--layouts/_partials/home/home-nav.html2
2 files changed, 6 insertions, 6 deletions
diff --git a/layouts/_partials/home/home-nav-item.html b/layouts/_partials/home/home-nav-item.html
index 71eb8883..eaebf744 100644
--- a/layouts/_partials/home/home-nav-item.html
+++ b/layouts/_partials/home/home-nav-item.html
@@ -3,13 +3,13 @@
{{ $text := .text }}
<a href="{{ .Site.LanguagePrefix }}/{{ $link }}"
- class="texl-base md:text-lg relative px-2 py-1
- hover:no-underline
+ class="texl-base md:text-lg relative
+ hover:no-underline relative
{{ if $active }}font-extrabold{{ end }}"
>
+ {{ $text }}
{{ 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>
+ <div class="absolute left-0 right-0 text-center top-3"
+ style="view-transition-name: home-nav-item-emphasis;">ยท</div>
{{ end }}
- {{ $text }}
</a>
diff --git a/layouts/_partials/home/home-nav.html b/layouts/_partials/home/home-nav.html
index 99d6f737..9afb0b24 100644
--- a/layouts/_partials/home/home-nav.html
+++ b/layouts/_partials/home/home-nav.html
@@ -1,5 +1,5 @@
{{ if eq .Site.Language.Lang "zh" }}
-<nav id="home-nav" class="relative w-full ps-0 flex list-none gap-1
+<nav id="home-nav" class="relative w-full ps-0 flex list-none gap-4
text-size-sm md:text-size-base">
{{ partial "home/home-nav-item" (dict
"text" (T "postNav.latest")