mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add pin icon in home post list and add repost icon in section .etc.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="single-title" itemprop="name headline">
|
||||
{{ $repost := $params.repost | default dict }}
|
||||
{{- with $params.weight -}}
|
||||
{{- $icon := dict "Class" "fa-solid fa-thumbtack fa-fw" -}}
|
||||
<span title="{{ T "single.pin" }}" class="icon-pin">{{- $icon | partial "plugin/icon.html" -}}</span>
|
||||
{{- end -}}
|
||||
{{- $repost := $params.repost | default dict -}}
|
||||
{{- with $repost -}}
|
||||
{{- if eq .Enable true -}}
|
||||
{{- $icon := dict "Class" "fa-solid fa-share fa-fw" -}}
|
||||
|
||||
Reference in New Issue
Block a user