summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-05 21:00:21 +0800
committerEltrac <hi@guhub.cn>2025-11-05 21:00:21 +0800
commit1a8b514d40129a57cb5fefb857591152a5daad09 (patch)
treef42fd738c811896fc2228cb74305bf7f8b6e449e
parentf444e5d6205c57dd4bff630cde257407483cb6f3 (diff)
feat: add thoughts page
-rw-r--r--i18n/zh.yml2
-rw-r--r--layouts/_partials/home/home-nav.html34
-rw-r--r--layouts/stats.html1
3 files changed, 21 insertions, 16 deletions
diff --git a/i18n/zh.yml b/i18n/zh.yml
index 37b2511d..ff0cb2ad 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -14,7 +14,7 @@ postNav:
latest: '最新'
categories: '搜寻'
featured: '精选'
- settings: '设置'
+ thoughts: '碎言'
cards: 最近在学
moreLinks:
posts: '所有文章'
diff --git a/layouts/_partials/home/home-nav.html b/layouts/_partials/home/home-nav.html
index 9afb0b24..9ee63bc0 100644
--- a/layouts/_partials/home/home-nav.html
+++ b/layouts/_partials/home/home-nav.html
@@ -6,19 +6,25 @@
"link" ""
"active" (eq "/" $.Page.RelPermalink)
) }}
- {{ if eq .Site.Language.Lang "zh" }}
- {{ partial "home/home-nav-item" (dict
- "text" (T "postNav.featured")
- "link" "featured"
- "active" (eq "/featured/" $.Page.RelPermalink)
- ) }}
- {{ partial "home/home-nav-item" (dict
- "text" (T "postNav.categories")
- "link" "categories"
- "active" (or
- (strings.HasPrefix $.Page.RelPermalink "/categories/")
- (strings.HasPrefix $.Page.RelPermalink "/tags/"))
- ) }}
- {{ end }}
+
+ {{ partial "home/home-nav-item" (dict
+ "text" (T "postNav.thoughts")
+ "link" "thoughts"
+ "active" (eq "/thoughts/" $.Page.RelPermalink)
+ ) }}
+
+ {{ partial "home/home-nav-item" (dict
+ "text" (T "postNav.featured")
+ "link" "featured"
+ "active" (eq "/featured/" $.Page.RelPermalink)
+ ) }}
+
+ {{ partial "home/home-nav-item" (dict
+ "text" (T "postNav.categories")
+ "link" "categories"
+ "active" (or
+ (strings.HasPrefix $.Page.RelPermalink "/categories/")
+ (strings.HasPrefix $.Page.RelPermalink "/tags/"))
+ ) }}
</nav>
{{ end }}
diff --git a/layouts/stats.html b/layouts/stats.html
index cdd66f14..457d9e11 100644
--- a/layouts/stats.html
+++ b/layouts/stats.html
@@ -1,7 +1,6 @@
{{ define "main" }}
<article>
{{ partial "header" . }}
- {{ partial "home/home-nav" . }}
<section>
<h2>站点统计</h2>