From d48e9b80f3223d3ce01a54c19fa010c2a6cef4bd Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 5 Nov 2025 20:36:15 +0800 Subject: feat: brand-new header design Former-commit-id: 5b4275c78ee9330a48868fc67e0c1e6c9d8b1bc2 --- layouts/_partials/components/logo.html | 2 +- layouts/_partials/header.html | 17 ++++++------- layouts/_partials/header/hoverable-logo.html | 15 ----------- layouts/_partials/header/language-switch.html | 17 ------------- layouts/_partials/header/navigation.html | 2 +- layouts/_partials/header/other-navigation.html | 35 ++++++++++++++++++++++++++ layouts/_partials/home/home-nav.html | 7 ------ 7 files changed, 44 insertions(+), 51 deletions(-) delete mode 100644 layouts/_partials/header/hoverable-logo.html delete mode 100644 layouts/_partials/header/language-switch.html create mode 100644 layouts/_partials/header/other-navigation.html (limited to 'layouts/_partials') diff --git a/layouts/_partials/components/logo.html b/layouts/_partials/components/logo.html index 226cb557..eff37b6a 100644 --- a/layouts/_partials/components/logo.html +++ b/layouts/_partials/components/logo.html @@ -9,6 +9,6 @@ Logo diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html index 814fe992..085bbb2f 100644 --- a/layouts/_partials/header.html +++ b/layouts/_partials/header.html @@ -1,11 +1,8 @@ -
+
-
- {{ if .IsHome }} - {{ partial "header/hoverable-logo" . }} - {{ else }} - {{ partial "components/logo" (dict "imageClass" "w-[10rem]") }} - {{ end }} +
+ {{ partial "components/logo" }}
- {{ $navOffset := "pl-6" }} -
+
{{ partial "header/navigation" . }} - {{ partial "header/language-switch" . }} + {{ partial "header/other-navigation" . }}
diff --git a/layouts/_partials/header/hoverable-logo.html b/layouts/_partials/header/hoverable-logo.html deleted file mode 100644 index d04ae6ac..00000000 --- a/layouts/_partials/header/hoverable-logo.html +++ /dev/null @@ -1,15 +0,0 @@ -
-
- {{ partial "components/logo" (dict "imageClass" "w-[10rem]") }} -
-
-

- {{ T "homePageQuote.content" . | markdownify }} -

-

- {{ T "homePageQuote.source" . | markdownify }} -

-
-
diff --git a/layouts/_partials/header/language-switch.html b/layouts/_partials/header/language-switch.html deleted file mode 100644 index 9f0a9c20..00000000 --- a/layouts/_partials/header/language-switch.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ $langButtonSize := "w-4 h-4" }} - -{{- $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 -}} -
- {{ $entry.label }} - diff --git a/layouts/_partials/header/navigation.html b/layouts/_partials/header/navigation.html index 0883206a..ec05f2a3 100644 --- a/layouts/_partials/header/navigation.html +++ b/layouts/_partials/header/navigation.html @@ -1,4 +1,4 @@ -