summaryrefslogtreecommitdiff
path: root/layouts/_partials/header/other-navigation.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-05 20:36:15 +0800
committerEltrac <hi@guhub.cn>2025-11-05 20:36:15 +0800
commitd48e9b80f3223d3ce01a54c19fa010c2a6cef4bd (patch)
treee1fd36fe2af11bdc75a4919d91b1a616a19386a1 /layouts/_partials/header/other-navigation.html
parent200fc68c9de8e131807157f482219b38d3de0a43 (diff)
feat: brand-new header design
Former-commit-id: 5b4275c78ee9330a48868fc67e0c1e6c9d8b1bc2
Diffstat (limited to 'layouts/_partials/header/other-navigation.html')
-rw-r--r--layouts/_partials/header/other-navigation.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/layouts/_partials/header/other-navigation.html b/layouts/_partials/header/other-navigation.html
new file mode 100644
index 00000000..c40860c1
--- /dev/null
+++ b/layouts/_partials/header/other-navigation.html
@@ -0,0 +1,35 @@
+{{ $langButtonSize := "w-4 h-4" }}
+
+<div class="flex gap-2 pr-2">
+ {{ if eq .Site.Language.Lang "zh" }}
+ <!-- insight (/stats) page link -->
+ <a
+ href="/stats"
+ class="rounded-full text-center hover:no-underline {{ $langButtonSize }}
+ bg-neutral/10 border-1 border-[var(--text-color)] border-solid
+ bg-[var(--block-background-color)]
+ items-center justify-center
+ hidden md:flex"
+ title="洞察"
+ >
+ <span class="text-size-[0.5rem] font-extrabold">i</span>
+ </a>
+ {{ end }}
+
+ <!-- language switch -->
+ {{- $lang := .Site.Language.Lang -}}
+ {{- $switch := dict
+ "en" (dict "url" "/zh/" "label" "ZH" "title" "查看中文博客")
+ "zh" (dict "url" "/en/" "label" "EN" "title" "View English Blog") -}}
+ {{- $entry := index $switch $lang -}}
+ <a
+ href="{{ $entry.url }}"
+ class="rounded-full text-center hover:no-underline {{ $langButtonSize }}
+ bg-neutral/10 border-1 border-[var(--text-color)] border-solid
+ bg-[var(--block-background-color)]
+ flex items-center justify-center"
+ title="{{ $entry.title }}"
+ >
+ <span class="text-size-[0.5rem] font-extrabold">{{ $entry.label }}</span>
+ </a>
+</div>