diff options
author | tabinurie <tracktracker2020@gmail.com> | 2020-11-14 11:11:47 +0300 |
---|---|---|
committer | tabinurie <tracktracker2020@gmail.com> | 2020-11-14 11:11:47 +0300 |
commit | fac34001fac43efda67a2b86f3e7bdb4597eceb0 (patch) | |
tree | 04d41c39fdf1b933aa72cdff8f20dc92ffba8cbf | |
parent | 2e96cb4cf1fc585b15133a58ee75e0ec96fd9ba3 (diff) |
add pin icon
-rw-r--r-- | exampleSite/config/_default/params.toml | 1 | ||||
-rw-r--r-- | layouts/partials/summary/card.html | 2 | ||||
-rw-r--r-- | layouts/partials/summary/classic.html | 2 | ||||
-rw-r--r-- | layouts/partials/summary/compact.html | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 1b8be52..08dd35e 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -50,6 +50,7 @@ modifiedTimeIcon = "📝" readingTimeIcon = "☕" authorIcon = "✍️" pagePvIcon = "👀" +pinIcon = "📌" tagIcon = "🏷️" publicationIcon = "📚" typeIcon = "🎯" diff --git a/layouts/partials/summary/card.html b/layouts/partials/summary/card.html index 0f3b0c9..ed8187d 100644 --- a/layouts/partials/summary/card.html +++ b/layouts/partials/summary/card.html @@ -1,6 +1,6 @@ <article class="summary-card" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}"> <header> - <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}📌 {{- end -}}{{ .Title }}</a> </h5> + <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinIcon | safeHTML) | default "📌" }} {{- end -}}{{ .Title }}</a> </h5> <h6 class="subtitle caption"> <time title="{{ i18n "tooltip-written" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }}{{ .Date.Format (i18n "summary-dateformat") }} </time> {{ if ne (.Date.Format (i18n "summary-dateformat")) (.Lastmod.Format (i18n "summary-dateformat")) }} diff --git a/layouts/partials/summary/classic.html b/layouts/partials/summary/classic.html index d87c107..db71419 100644 --- a/layouts/partials/summary/classic.html +++ b/layouts/partials/summary/classic.html @@ -17,7 +17,7 @@ <div class="summary-classic__content"> <header> - <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}📌 {{- end -}}{{ .Title }}</a> </h5> + <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinIcon | safeHTML) | default "📌" }} {{- end -}}{{ .Title }}</a> </h5> <h6 class="subtitle caption"> <time title="{{ i18n "tooltip-written" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} {{ .Date.Format (i18n "summary-dateformat") }} </time> {{ if ne (.Date.Format (i18n "summary-dateformat")) (.Lastmod.Format (i18n "summary-dateformat")) }} diff --git a/layouts/partials/summary/compact.html b/layouts/partials/summary/compact.html index 2074643..a9df179 100644 --- a/layouts/partials/summary/compact.html +++ b/layouts/partials/summary/compact.html @@ -3,7 +3,7 @@ {{ $params := .Params }} <div class="summary-compact__meta"> <header> - <h5 class="title h6"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}📌 {{- end -}}{{ .Title }}</a> </h5> + <h5 class="title h6"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinTimeIcon | safeHTML) | default "📌" }} {{- end -}}{{ .Title }}</a> </h5> <h6 class="subtitle caption"> <time title="{{ i18n "tooltip-written" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} {{ .Date.Format (i18n "summary-dateformat") }} </time> {{ if ne (.Date.Format (i18n "summary-dateformat")) (.Lastmod.Format (i18n "summary-dateformat")) }} |