From b3e89034d87dad4bedfb0aab08ce3dd6d88b71cf Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 7 Apr 2025 15:50:01 +0800 Subject: feat: add "see all" links for both sections in index Former-commit-id: 055261cd834ca7b55fb5027484ee7047ac11df37 --- assets/css/components/_postlist.scss | 6 ------ i18n/en.yml | 4 +++- i18n/zh.yml | 3 +++ layouts/index.html | 10 ++++++++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss index 31e99cd6..8fb10f65 100644 --- a/assets/css/components/_postlist.scss +++ b/assets/css/components/_postlist.scss @@ -1,9 +1,3 @@ -.index-section-title { - font-size: 1.1rem; - margin-bottom: 0; - font-weight: normal; -} - .index-section-morelink { @include small-button; diff --git a/i18n/en.yml b/i18n/en.yml index e8b32709..2a53c6d3 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -14,4 +14,6 @@ postNav: latest: 'Latest' categories: 'Categories' tags: 'Tags' -cards: Cards +moreLinks: + posts: 'All Posts' + cards: 'All Cards' diff --git a/i18n/zh.yml b/i18n/zh.yml index 6c66fe75..f5335290 100644 --- a/i18n/zh.yml +++ b/i18n/zh.yml @@ -15,3 +15,6 @@ postNav: categories: '分类' tags: '标签' cards: 最近在学 +moreLinks: + posts: '所有文章' + cards: '所有卡片' diff --git a/layouts/index.html b/layouts/index.html index ff721ab7..d2a75ea7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -38,13 +38,14 @@ {{ end }} - 查看所有 + + {{ T "moreLinks.posts" }} + {{ if eq .Site.Language.Lang "zh" }}
-

{{ T "cards" }}

{{- $cards := .Site.GetPage "section" "cards" }} {{- $paginator := .Paginate $cards.Pages 4 }} @@ -70,6 +71,11 @@
{{- end }} +
+ + {{ T "moreLinks.cards" }} + +
{{ end }} -- cgit v1.2.3