Merge pull request #352 from tabinurie/customicon
Add option to change default emoji icons
This commit is contained in:
commit
a703d0e3c6
|
@ -45,6 +45,15 @@ paginateWindow = 1
|
|||
talksPaginate = 5
|
||||
talksGroupByDate = "2006"
|
||||
pubPaginate = 20
|
||||
writtenTimeIcon = "📅"
|
||||
modifiedTimeIcon = "📝"
|
||||
readingTimeIcon = "☕"
|
||||
authorIcon = "✍️"
|
||||
pagePvIcon = "👀"
|
||||
pinIcon = "📌"
|
||||
tagIcon = "🏷️"
|
||||
publicationIcon = "📚"
|
||||
typeIcon = "🎯"
|
||||
|
||||
# whoami
|
||||
myname = "zzossig"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{{ $params := .Params }}
|
||||
<div class="single__infos">
|
||||
<time class="single__info" title="{{ i18n "tooltip-written" }}">📅 {{ .Date.Format (i18n "single-dateformat") }} </time>
|
||||
<time class="single__info" title="{{ i18n "tooltip-written" }}">{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} {{ .Date.Format (i18n "single-dateformat") }} </time>
|
||||
{{ if ne (.Date.Format (i18n "summary-dateformat")) (.Lastmod.Format (i18n "summary-dateformat")) }}
|
||||
· <time class="single__info" title="{{ i18n "tooltip-modified" }}"> 📝 {{ .Lastmod.Format (i18n "single-dateformat") }} </time>
|
||||
· <time class="single__info" title="{{ i18n "tooltip-modified" }}"> {{ ($.Site.Params.modifiedTimeIcon | safeHTML) | default "📝" }} {{ .Lastmod.Format (i18n "single-dateformat") }} </time>
|
||||
{{ end }}
|
||||
· <span class="single__info" title="{{ i18n "tooltip-reading-time" }}"> ☕ {{ .ReadingTime }} {{ i18n "reading-time" }} </span>
|
||||
· <span class="single__info" title="{{ i18n "tooltip-reading-time" }}"> {{ ($.Site.Params.readingTimeIcon | safeHTML) | default "☕" }} {{ .ReadingTime }} {{ i18n "reading-time" }} </span>
|
||||
{{ with .Params.Author }}
|
||||
· <span class="single__info" title="{{ i18n "single-writtenBy" }}">{{if $params.AuthorEmoji }}{{ $params.AuthorEmoji }}{{ else }}✍️{{ end }} {{ . }}</span>
|
||||
· <span class="single__info" title="{{ i18n "single-writtenBy" }}">{{if $params.AuthorEmoji }}{{ $params.AuthorEmoji }}{{ else }}{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }}{{ end }} {{ . }}</span>
|
||||
{{ end }}
|
||||
<span class="single__info">
|
||||
{{ if (and .Site.Params.enableBusuanzi .Site.Params.busuanziPagePV) }} · 👀<span id="busuanzi_value_page_pv">...</span> {{ i18n "counter-page-pv" }}{{ end }}
|
||||
{{ if (and .Site.Params.enableBusuanzi .Site.Params.busuanziPagePV) }} · {{ ($.Site.Params.pagePvIcon | safeHTML) | default "👀" }}<span id="busuanzi_value_page_pv">...</span> {{ i18n "counter-page-pv" }}{{ end }}
|
||||
</span>
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
{{ $taxo := "tags" }}
|
||||
<ul class="single__tags caption">
|
||||
{{ if .Params.tags }}
|
||||
🏷️
|
||||
{{ ($.Site.Params.tagIcon | safeHTML) | default "🏷️" }}
|
||||
{{ end }}
|
||||
{{ range (.GetTerms "tags") }}
|
||||
<li><a href="{{ .Permalink }}" class="single__tag" title="{{ .LinkTitle }}">#{{ .LinkTitle }}</a></li>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<span class="caption pub__meta">📅 {{ if .Params.publishDate }}{{ dateFormat (i18n "pub-dateformat") .Params.publishDate }}{{ end }}</span>{{ with .Params.authors }}<span class="caption pub__meta">✍️ {{ delimit . ", " }}</span>{{ end }}{{ with .Params.publication }}<span class="caption pub__meta">📚 {{ . }}</span>{{ end }}{{ with .Params.ENTRYTYPE }}<span class="caption pub__meta" data-entry-type="{{ . }}">🎯 {{ . }}</span>{{ end }}
|
||||
<span class="caption pub__meta">{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} {{ if .Params.publishDate }}{{ dateFormat (i18n "pub-dateformat") .Params.publishDate }}{{ end }}</span>{{ with .Params.authors }}<span class="caption pub__meta">{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }} {{ delimit . ", " }}</span>{{ end }}{{ with .Params.publication }}<span class="caption pub__meta">{{ ($.Site.Params.publicationIcon | safeHTML) | default "📚" }} {{ . }}</span>{{ end }}{{ with .Params.ENTRYTYPE }}<span class="caption pub__meta" data-entry-type="{{ . }}">{{ ($.Site.Params.typeIcon | safeHTML) | default "🎯" }} {{ . }}</span>{{ end }}
|
||||
|
|
|
@ -47,28 +47,28 @@
|
|||
if (obj.publishDate) {
|
||||
var dateSpan = document.createElement('span');
|
||||
dateSpan.className = 'caption pub__meta';
|
||||
dateSpan.innerText = '📅 ' + obj.publishDate.slice(0, 10);
|
||||
dateSpan.innerText = '{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} ' + obj.publishDate.slice(0, 10);
|
||||
metaDiv.appendChild(dateSpan);
|
||||
}
|
||||
|
||||
if (obj.authors) {
|
||||
var authorsSpan = document.createElement('span');
|
||||
authorsSpan.className = 'caption pub__meta';
|
||||
authorsSpan.innerText = '✍️ ' + obj.authors.toString();
|
||||
authorsSpan.innerText = '{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }} ' + obj.authors.toString();
|
||||
metaDiv.appendChild(authorsSpan);
|
||||
}
|
||||
|
||||
if (obj.publication) {
|
||||
var pubSpan = document.createElement('span');
|
||||
pubSpan.className = 'caption pub__meta';
|
||||
pubSpan.innerText = '📚 ' + obj.publication;
|
||||
pubSpan.innerText = '{{ ($.Site.Params.publicationIcon | safeHTML) | default "📚" }} ' + obj.publication;
|
||||
metaDiv.appendChild(pubSpan);
|
||||
}
|
||||
|
||||
if (obj.ENTRYTYPE) {
|
||||
var typeSpan = document.createElement('span');
|
||||
typeSpan.className = 'caption pub__meta';
|
||||
typeSpan.innerText = '🎯 ' + obj.ENTRYTYPE;
|
||||
typeSpan.innerText = '{{ ($.Site.Params.typeIcon | safeHTML) | default "🎯" }} ' + obj.ENTRYTYPE;
|
||||
metaDiv.appendChild(typeSpan);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
|||
if (obj.tags && obj.tags.length) {
|
||||
tagsUl = document.createElement('ul');
|
||||
tagsUl.setAttribute('class', 'pub__tags caption');
|
||||
tagsUl.innerHTML = ' 🏷️';
|
||||
tagsUl.innerHTML = ' {{ ($.Site.Params.tagIcon | safeHTML) | default "🏷️" }}';
|
||||
|
||||
for (var i = 0; i < obj.tags.length; i++) {
|
||||
var tagLi = document.createElement('li');
|
||||
|
@ -147,28 +147,28 @@
|
|||
if (obj.item.publishDate) {
|
||||
var dateSpan = document.createElement('span');
|
||||
dateSpan.className = 'caption pub__meta';
|
||||
dateSpan.innerText = '📅 ' + obj.item.publishDate.slice(0, 10);
|
||||
dateSpan.innerText = '{{ ($.Site.Params.writtenTimeIcon | safeHTML) | default "📅" }} ' + obj.item.publishDate.slice(0, 10);
|
||||
metaDiv.appendChild(dateSpan);
|
||||
}
|
||||
|
||||
if (obj.item.authors) {
|
||||
var authorsSpan = document.createElement('span');
|
||||
authorsSpan.className = 'caption pub__meta';
|
||||
authorsSpan.innerText = '✍️ ' + obj.item.authors.toString();
|
||||
authorsSpan.innerText = '{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }} ' + obj.item.authors.toString();
|
||||
metaDiv.appendChild(authorsSpan);
|
||||
}
|
||||
|
||||
if (obj.item.publication) {
|
||||
var pubSpan = document.createElement('span');
|
||||
pubSpan.className = 'caption pub__meta';
|
||||
pubSpan.innerText = '📚 ' + obj.item.publication;
|
||||
pubSpan.innerText = '{{ ($.Site.Params.publicationIcon | safeHTML) | default "📚" }} ' + obj.item.publication;
|
||||
metaDiv.appendChild(pubSpan);
|
||||
}
|
||||
|
||||
if (obj.item.ENTRYTYPE) {
|
||||
var typeSpan = document.createElement('span');
|
||||
typeSpan.className = 'caption pub__meta';
|
||||
typeSpan.innerText = '🎯 ' + obj.item.ENTRYTYPE;
|
||||
typeSpan.innerText = '{{ ($.Site.Params.typeIcon | safeHTML) | default "🎯" }} ' + obj.item.ENTRYTYPE;
|
||||
metaDiv.appendChild(typeSpan);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
if (obj.item.tags && obj.item.tags.length) {
|
||||
tagsUl = document.createElement('ul');
|
||||
tagsUl.setAttribute('class', 'pub__tags caption');
|
||||
tagsUl.innerHTML = ' 🏷️';
|
||||
tagsUl.innerHTML = ' {{ ($.Site.Params.tagIcon | safeHTML) | default "🏷️" }}';
|
||||
|
||||
for (var j = 0; j < obj.item.tags.length; j++) {
|
||||
var tagLi = document.createElement('li');
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<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 }}">📅{{ .Date.Format (i18n "summary-dateformat") }} </time>
|
||||
<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")) }}
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · 📝 {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.modifiedTimeIcon | safeHTML) | default "📝" }} {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
{{ end }}
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · ☕ {{ .ReadingTime }} {{ i18n "reading-time" }}</span>
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.readingTimeIcon | safeHTML) | default "☕" }} {{ .ReadingTime }} {{ i18n "reading-time" }}</span>
|
||||
{{ with $.Param "author" }}
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $.Param "AuthorEmoji" }}{{ $.Param "AuthorEmoji" }}{{ else }}✍️{{ end }} {{ . }}</span>
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $.Param "AuthorEmoji" }}{{ $.Param "AuthorEmoji" }}{{ else }}{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }}{{ end }} {{ . }}</span>
|
||||
{{ end }}
|
||||
</h6>
|
||||
</header>
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
|
||||
<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 }}">📅 {{ .Date.Format (i18n "summary-dateformat") }} </time>
|
||||
<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")) }}
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · 📝 {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.modifiedTimeIcon | safeHTML) | default "📝" }} {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
{{ end }}
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · ☕ {{ .ReadingTime }} {{ i18n "reading-time" }} </span>
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.readingTimeIcon | safeHTML) | default "☕" }} {{ .ReadingTime }} {{ i18n "reading-time" }} </span>
|
||||
{{ with $.Param "author" }}
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $.Param "authorEmoji" }}{{ $.Param "authorEmoji" }}{{ else }}✍️{{ end }} {{ . }}</span>
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $.Param "authorEmoji" }}{{ $.Param "authorEmoji" }}{{ else }}{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }}{{ end }} {{ . }}</span>
|
||||
{{ end }}
|
||||
</h6>
|
||||
</header>
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{{ $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 }}">📅 {{ .Date.Format (i18n "summary-dateformat") }} </time>
|
||||
<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")) }}
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · 📝 {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.modifiedTimeIcon | safeHTML) | default "📝" }} {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
|
||||
{{ end }}
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · ☕ {{ .ReadingTime }} {{ i18n "reading-time" }}</span>
|
||||
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · {{ ($.Site.Params.readingTimeIcon | safeHTML) | default "☕" }} {{ .ReadingTime }} {{ i18n "reading-time" }}</span>
|
||||
{{ with $params.Author }}
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $params.AuthorEmoji }}{{ $params.AuthorEmoji }}{{ else }}✍️{{ end }} {{ . }}</span>
|
||||
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $params.AuthorEmoji }}{{ $params.AuthorEmoji }}{{ else }}{{ ($.Site.Params.authorIcon | safeHTML) | default "✍️" }}{{ end }} {{ . }}</span>
|
||||
{{ end }}
|
||||
</h6>
|
||||
</header>
|
||||
|
|
Loading…
Reference in New Issue