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 }} -
+
+
{{- $summary -}}
+ {{- if $truncated }} +
+ + {{- "read_more" | i18n -}} + +
+ {{- end }} {{- end }}