2022-06-03 22:37:33 +08:00
|
|
|
{{ with .ctx }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ if $.IsHome }}
|
|
|
|
{{ if .Params.Expand }}
|
2022-06-09 09:12:22 +08:00
|
|
|
{{ .Content }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ else }}
|
2022-06-09 09:12:22 +08:00
|
|
|
{{ .Summary }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
2025-01-18 22:06:49 +08:00
|
|
|
{{/** Post expired tip message **/}}
|
2025-01-03 20:48:41 +08:00
|
|
|
{{ $expired := default .Site.Params.PostMeta.expired .Params.Expired }}
|
|
|
|
{{ if $expired }}
|
|
|
|
<div class="post-expired-tip" id="post-expired-tip">
|
|
|
|
<div class="post-expired-title">
|
|
|
|
<i class="fa-solid fa-hourglass-half"></i>
|
|
|
|
<span>{{ T "PostMeta.expired.title" }}</span>
|
|
|
|
</div>
|
|
|
|
<div id="post-expired-content" class="post-expired-content"></div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2025-01-18 22:06:49 +08:00
|
|
|
{{/** Post summary **/}}
|
2025-01-25 20:52:11 +08:00
|
|
|
{{ if .Site.Params.PostMeta.summary }}
|
|
|
|
{{ with .Params.Description }}
|
2025-01-18 22:06:49 +08:00
|
|
|
<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">
|
2025-01-25 20:52:11 +08:00
|
|
|
{{ . }}
|
2025-01-18 22:06:49 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2025-01-25 20:52:11 +08:00
|
|
|
{{ end }}
|
2025-01-03 20:48:41 +08:00
|
|
|
{{/** Started use the read more content anchor the need
|
|
|
|
Hugo framework min marjo version greater than 0.134.0 **/}}
|
2024-12-08 17:01:27 +08:00
|
|
|
{{ .Summary }}
|
2025-01-03 20:48:41 +08:00
|
|
|
<!-- It's an anchor point to locate read more content start. -->
|
|
|
|
<a id="more"></a>
|
2024-12-08 17:01:27 +08:00
|
|
|
{{ .ContentWithoutSummary }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ end }}
|
2022-06-03 22:37:33 +08:00
|
|
|
{{ end }}
|