🐛 🔥 Fixed flinks page in multiple languages.

This commit is contained in:
elkan1788
2025-01-25 20:52:11 +08:00
parent 6d65d92943
commit abec39b9ec
10 changed files with 98 additions and 4 deletions

View File

@@ -7,7 +7,13 @@
<div class="flinks-block">
<h1 class="flinks-block-title">{{ .Title }}</h1>
<div class="flinks-lists">
{{ range .Site.Data.flinks }}
{{ $flinksData := "" }}
{{ if .IsTranslated }}
{{ $flinksData = index .Site.Data.flinks .Lang }}
{{ else }}
{{ $flinksData = .Site.Data.flinks }}
{{ end }}
{{ range $flinksData }}
<div class="flinks-list">
<div class="flinks-list-title">{{ .FLinksTitle | safeHTML }}</div>
<div class="flinks-list-desc">{{ .FLinksDesc | safeHTML }}</div>

View File

@@ -18,18 +18,19 @@
</div>
{{ end }}
{{/** Post summary **/}}
{{ $summary := default .Site.Params.PostMeta.summary .Params.Summary }}
{{ if $summary }}
{{ if .Site.Params.PostMeta.summary }}
{{ with .Params.Description }}
<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 }}
{{ end }}
{{/** Started use the read more content anchor the need
Hugo framework min marjo version greater than 0.134.0 **/}}
{{ .Summary }}