💄 Closed #111, add post summary show.

This commit is contained in:
elkan1788
2025-01-18 22:06:49 +08:00
parent 9cd3e0bf68
commit ba5ae7c295
10 changed files with 68 additions and 4 deletions

View File

@@ -6,6 +6,7 @@
{{ .Summary }}
{{ end }}
{{ else }}
{{/** Post expired tip message **/}}
{{ $expired := default .Site.Params.PostMeta.expired .Params.Expired }}
{{ if $expired }}
<div class="post-expired-tip" id="post-expired-tip">
@@ -16,6 +17,19 @@
<div id="post-expired-content" class="post-expired-content"></div>
</div>
{{ end }}
{{/** Post summary **/}}
{{ $summary := default .Site.Params.PostMeta.summary .Params.Summary }}
{{ if $summary }}
<div class="post-summary-wrapper">
<div class="summary-title">
<span><i class="fa-solid fa-list"></i></span>
<span>{{ T "PostMeta.summary.title" }}</span>
</div>
<div class="summary-content">
{{ default .Summary .Params.Summary }}
</div>
</div>
{{ end }}
{{/** Started use the read more content anchor the need
Hugo framework min marjo version greater than 0.134.0 **/}}
{{ .Summary }}