diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-07 15:50:01 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-07 15:50:01 +0800 |
| commit | b3e89034d87dad4bedfb0aab08ce3dd6d88b71cf (patch) | |
| tree | 594fe7c1e6e2d91eff7160d48323c7e3c36884e6 | |
| parent | d0e7f15de7b1c048e3db95b096b767537c2a40e8 (diff) | |
feat: add "see all" links for both sections in index
Former-commit-id: 055261cd834ca7b55fb5027484ee7047ac11df37
| -rw-r--r-- | assets/css/components/_postlist.scss | 6 | ||||
| -rw-r--r-- | i18n/en.yml | 4 | ||||
| -rw-r--r-- | i18n/zh.yml | 3 | ||||
| -rw-r--r-- | 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 @@ </div> {{ end }} </div> - <a href="/posts" class="index-section-morelink">查看所有</a> + <a href="/posts" class="index-section-morelink"> + {{ T "moreLinks.posts" }} + </a> </section> {{ if eq .Site.Language.Lang "zh" }} <!-- Latest Cards --> <section id="latest-cards"> - <h2 class="index-section-title">{{ T "cards" }}</h2> <div class="latest-cards-container"> {{- $cards := .Site.GetPage "section" "cards" }} <!-- 获取 "cards" 部分的内容 --> {{- $paginator := .Paginate $cards.Pages 4 }} <!-- 对该部分内容进行分页 --> @@ -70,6 +71,11 @@ </div> {{- end }} </div> + <div style="margin: 1rem 0"> + <a href="/cards" class="index-section-morelink"> + {{ T "moreLinks.cards" }} + </a> + </div> </section> {{ end }} </article> |
