Feat: add pin icon in home post list and add repost icon in section .etc.

This commit is contained in:
Cell
2023-12-27 16:30:36 +08:00
parent 0c3148b3ee
commit da54fef151
20 changed files with 96 additions and 51 deletions
+7 -1
View File
@@ -40,7 +40,13 @@
<h2 class="group-title">{{ .Key }}</h2>
{{- range .Pages -}}
<article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link">{{- .LinkTitle -}}</a>
<a href="{{ .RelPermalink }}" class="archive-item-link">
{{- $repost := .Params.repost | default dict -}}
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
{{- .Date | dateFormat ($.Site.Params.section.dateFormat | default "01-02") -}}
</span>