Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zzo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortabinurie <tracktracker2020@gmail.com>2020-11-14 11:11:47 +0300
committertabinurie <tracktracker2020@gmail.com>2020-11-14 11:11:47 +0300
commitfac34001fac43efda67a2b86f3e7bdb4597eceb0 (patch)
tree04d41c39fdf1b933aa72cdff8f20dc92ffba8cbf
parent2e96cb4cf1fc585b15133a58ee75e0ec96fd9ba3 (diff)
add pin icon
-rw-r--r--exampleSite/config/_default/params.toml1
-rw-r--r--layouts/partials/summary/card.html2
-rw-r--r--layouts/partials/summary/classic.html2
-rw-r--r--layouts/partials/summary/compact.html2
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 -}}📌&nbsp;{{- end -}}{{ .Title }}</a> </h5>
+ <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinIcon | safeHTML) | default "📌" }}&nbsp;{{- 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 -}}📌&nbsp;{{- end -}}{{ .Title }}</a> </h5>
+ <h5 class="title h5"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinIcon | safeHTML) | default "📌" }}&nbsp;{{- 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 "📅" }}&nbsp;{{ .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 -}}📌&nbsp;{{- end -}}{{ .Title }}</a> </h5>
+ <h5 class="title h6"><a href='{{ .Permalink }}'>{{- with .Params.pinned -}}{{ ($.Site.Params.pinTimeIcon | safeHTML) | default "📌" }}&nbsp;{{- 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")) }}