From a8adc0a49c31072e29cf42f2622420da75b3c2fe Mon Sep 17 00:00:00 2001 From: razonyang Date: Mon, 9 Oct 2023 23:00:54 +0800 Subject: [PATCH] fix: replace the summaries truncated indicator (dots) with the read more button Closes #387 --- assets/hb/modules/blog/scss/post/_summary.scss | 6 ------ i18n/en.toml | 3 +++ i18n/ko.toml | 3 +++ i18n/zh-hans.toml | 3 +++ i18n/zh-hant.toml | 3 +++ layouts/partials/hb/modules/blog/post/card.html | 14 +++++++++++--- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/assets/hb/modules/blog/scss/post/_summary.scss b/assets/hb/modules/blog/scss/post/_summary.scss index 81c959a5..89a0cf1f 100644 --- a/assets/hb/modules/blog/scss/post/_summary.scss +++ b/assets/hb/modules/blog/scss/post/_summary.scss @@ -9,9 +9,3 @@ margin-bottom: 0; } } - -.summary-truncated { - &::after { - content: "…"; - } -} diff --git a/i18n/en.toml b/i18n/en.toml index 3165a145..23dd6baf 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -1,5 +1,8 @@ [on_this_page] other = "On this page" +[read_more] +other = "Read more" + [reading_time] other = "{{ .Count }} min read" diff --git a/i18n/ko.toml b/i18n/ko.toml index 0ceafd2d..a0da8a4e 100644 --- a/i18n/ko.toml +++ b/i18n/ko.toml @@ -1,5 +1,8 @@ [on_this_page] other = "목차" +[read_more] +other = "Read more" + [reading_time] other = "읽는 데에 {{ .Count }}분" diff --git a/i18n/zh-hans.toml b/i18n/zh-hans.toml index 493d149b..5f7db6e8 100644 --- a/i18n/zh-hans.toml +++ b/i18n/zh-hans.toml @@ -1,5 +1,8 @@ [on_this_page] other = "本页内容" +[read_more] +other = "阅读全文" + [reading_time] other = "{{ .Count }} 分钟阅读" diff --git a/i18n/zh-hant.toml b/i18n/zh-hant.toml index aa63de0e..97845961 100644 --- a/i18n/zh-hant.toml +++ b/i18n/zh-hant.toml @@ -1,5 +1,8 @@ [on_this_page] other = "本頁內容" +[read_more] +other = "閱讀全文" + [reading_time] other = "{{ .Count }} 分鐘閱讀" diff --git a/layouts/partials/hb/modules/blog/post/card.html b/layouts/partials/hb/modules/blog/post/card.html index 9deffad4..d2b7d504 100644 --- a/layouts/partials/hb/modules/blog/post/card.html +++ b/layouts/partials/hb/modules/blog/post/card.html @@ -16,7 +16,7 @@ {{- if default true site.Params.hb.blog.post_thumbnail }} {{ partial "hb/modules/blog/post/card-img" $page }} {{- end }} -
+