From 56c59453706ba9aba1ce377eb78bdfaac56aa8da Mon Sep 17 00:00:00 2001 From: razonyang Date: Sun, 15 Oct 2023 01:01:36 +0800 Subject: [PATCH] style: hide the read more button from pinned posts on homepage --- layouts/partials/hb/modules/blog/index.html | 2 +- layouts/partials/hb/modules/blog/post/card.html | 3 ++- layouts/partials/hb/modules/blog/posts.html | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/hb/modules/blog/index.html b/layouts/partials/hb/modules/blog/index.html index e3dc20df..59ff8ce1 100644 --- a/layouts/partials/hb/modules/blog/index.html +++ b/layouts/partials/hb/modules/blog/index.html @@ -11,7 +11,7 @@ {{- with $pinnedPages }}
- {{ partial "hb/modules/blog/posts" (dict "Pages" . "Cols" "row-cols-1") }} + {{ partial "hb/modules/blog/posts" (dict "Pages" . "Cols" "row-cols-1" "ReadMore" false) }}
{{- end }} diff --git a/layouts/partials/hb/modules/blog/post/card.html b/layouts/partials/hb/modules/blog/post/card.html index 0f7c6b7b..ec3e42ec 100644 --- a/layouts/partials/hb/modules/blog/post/card.html +++ b/layouts/partials/hb/modules/blog/post/card.html @@ -1,5 +1,6 @@ {{- $page := .Page }} {{- $showSummary := default true .Summary }} +{{- $readMore := default true .ReadMore }} {{- $readingTime := default true .ReadingTime }} {{- $meta := default true .Meta }}
@@ -40,7 +41,7 @@
{{- $summary -}}
- {{- if $truncated }} + {{- if and $readMore $truncated }}