mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add repost feature (#156)
This commit is contained in:
@@ -41,9 +41,7 @@
|
||||
<h2 class="group-title">{{ .Key }}</h2>
|
||||
{{- range .Pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">{{- .Title -}}</a>
|
||||
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
|
||||
{{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
|
||||
</span>
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title" itemprop="name headline">
|
||||
{{ $repost := $params.repost | default dict }}
|
||||
{{- with $repost -}}
|
||||
{{- if eq .Enable true -}}
|
||||
{{- $icon := dict "Class" "fa-solid fa-share fa-fw" -}}
|
||||
{{- $title := cond (hasPrefix .Url "http") (printf "%v -> %v" (T "repost") .Url ) (T "repost") -}}
|
||||
<span title="{{ $title }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user