From 044bc2ed2b2d48b8d7a2f4c53e49eba2da8ada1a Mon Sep 17 00:00:00 2001 From: eltrac Date: Tue, 10 Feb 2026 15:48:13 +0800 Subject: feat: theme switch style --- i18n/zh.yml | 4 ++++ layouts/_partials/header/other-navigation.html | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/i18n/zh.yml b/i18n/zh.yml index fa2b539a..ea2c2906 100644 --- a/i18n/zh.yml +++ b/i18n/zh.yml @@ -1,5 +1,9 @@ lang: zh-CN seeArchive: 查看全部页面 +theme: + auto: 自动 + light: 亮色 + dark: 暗色 archivePage: postCountMonthly: '{{ . }} 篇文章' postCountAnnual: '共计 {{ . }} 篇文章' diff --git a/layouts/_partials/header/other-navigation.html b/layouts/_partials/header/other-navigation.html index ab6035f1..718b491c 100644 --- a/layouts/_partials/header/other-navigation.html +++ b/layouts/_partials/header/other-navigation.html @@ -2,10 +2,11 @@
- {{ $switches := slice "auto" "light" "dark" }} {{ range $switches }} - + {{ end }} @@ -16,7 +17,7 @@ {{- $entry := index $switch $lang -}}