summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-24 22:16:01 +0800
committerEltrac <hi@guhub.cn>2025-09-24 22:16:01 +0800
commita809016e8aa4d27910186b0eea4e286821471f35 (patch)
tree643485beed31b724739fb8e62381002135689efe /layouts
parentb58370a672748b5662044a68b3fdaa4f75efc200 (diff)
remove: remove cards from navigation and home
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/home/latest-cards.html23
-rw-r--r--layouts/_partials/home/latest-posts.html2
-rw-r--r--layouts/home.html1
3 files changed, 1 insertions, 25 deletions
diff --git a/layouts/_partials/home/latest-cards.html b/layouts/_partials/home/latest-cards.html
deleted file mode 100644
index f7a7df78..00000000
--- a/layouts/_partials/home/latest-cards.html
+++ /dev/null
@@ -1,23 +0,0 @@
-{{ if eq .Site.Language.Lang "zh" }}
-<!-- Latest Cards -->
-<section class="my-4">
- <div class="p-[5px] flex w-full overflow-x-auto gap-4 items-stretch">
- {{- $cards := .Site.GetPage "section" "cards" }} <!-- 获取 "cards" 部分的内容 -->
- {{- $paginator := .Paginate $cards.Pages 4 }} <!-- 对该部分内容进行分页 -->
- {{- range $paginator.Pages }}
- <div class="flex-shrink-0 w-5/6 md:w-1/2">
- {{ partial "items/card" (dict
- "context" .
- "summary" true
- "summaryClass" "text-base!") }}
- </div>
- {{- end }}
- </div>
- <div class="py-4">
- <a href="/cards" class="small-button"
- data-umami-event="➕ Click more cards link">
- {{ T "moreLinks.cards" }} →
- </a>
- </div>
-</section>
-{{ end }}
diff --git a/layouts/_partials/home/latest-posts.html b/layouts/_partials/home/latest-posts.html
index d98f9e1c..b6007c5c 100644
--- a/layouts/_partials/home/latest-posts.html
+++ b/layouts/_partials/home/latest-posts.html
@@ -2,7 +2,7 @@
<section class="pagefind-exclude">
<div class="flex flex-col my-4">
{{ $firstPost := true }} <!-- 初始化标记 -->
- {{ range first 8 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+ {{ range first 12 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ partial "items/post" (dict
"ctx" .
"showSummary" $firstPost
diff --git a/layouts/home.html b/layouts/home.html
index 19b9d21c..2e36c63d 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -3,7 +3,6 @@
{{ partial "header" . }}
{{ partial "home/home-nav" . }}
{{ partial "home/latest-posts" . }}
- {{ partial "home/latest-cards" . }}
</article>
{{ partial "footer.html" . }}
{{ end }}