Theme Files Update
This commit is contained in:
parent
7fdf67fab5
commit
559c581dba
5 changed files with 56 additions and 29 deletions
10
layouts/partials/readTime.html
Normal file
10
layouts/partials/readTime.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if .Site.Params.readTime }}
|
||||
{{ .Site.Params.readTimeSeparator }}
|
||||
{{ $rT := mul (div (.WordCount) 220.0) 60 }}
|
||||
{{ $rTH := math.Floor (div $rT 3600) }}
|
||||
{{ $rTM := math.Floor (div (mod $rT 3600) 60) }}
|
||||
{{ $rTS := mod (mod $rT 3600) 60 }}
|
||||
{{ if gt $rTH 0 }}{{ $rTH }}{{ cond (gt $rTH 1) " Hours" " Hour" }}{{- end -}}
|
||||
{{ if gt $rTM 0 }}{{ cond (gt $rTH 0) ", " "" }}{{ $rTM }}{{ cond (gt $rTM 1) " Minutes" " Minute" }}{{- end -}}
|
||||
{{ if gt $rTS 0 }}{{ cond (gt $rTM 0) ", " "" }}{{ $rTS }}{{ cond (gt $rTS 1) " Seconds" " Second" }}{{- end -}}
|
||||
{{ end }}
|
|
@ -46,6 +46,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="feather" width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22.428 14.359c-.326 1.678-2.92 3.513-5.9 3.87-1.554.185-3.084.355-4.715.28-2.668-.122-4.773-.637-4.773-.637 0 .26.016.507.048.739.347 2.633 2.61 2.79 4.755 2.864 2.164.074 4.092-.534 4.092-.534l.089 1.957s-1.514.813-4.211.962c-1.487.082-3.334-.037-5.485-.606C1.664 22.019.862 17.047.738 12.002.702 10.504.726 9.092.726 7.91c0-5.159 3.38-6.67 3.38-6.67C5.809.456 8.733.126 11.774.102h.074c3.04.024 5.967.354 7.671 1.136 0 0 3.38 1.512 3.38 6.671 0 0 .043 3.806-.471 6.449"/><path d="M18.912 8.31v6.247h-2.474V8.494c0-1.278-.538-1.927-1.614-1.927-1.19 0-1.785.77-1.785 2.291v3.319h-2.46V8.858c0-1.521-.596-2.29-1.786-2.29-1.075 0-1.613.648-1.613 1.926v6.063H4.705V8.31c0-1.276.325-2.29.978-3.041.674-.75 1.555-1.136 2.65-1.136 1.266 0 2.225.487 2.86 1.46l.616 1.034.616-1.033c.634-.974 1.593-1.46 2.86-1.46 1.094 0 1.976.384 2.65 1.135.652.75.977 1.765.977 3.041"/></svg>
|
||||
{{- else if (eq .name "rss") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
|
||||
{{- else if (eq .name "author") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-feather"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>
|
||||
{{- else if (eq .name "scrollup") -}}
|
||||
<svg fill="#3B3E48" width="64px" height="64px" viewBox="-2.4 -2.4 28.80 28.80" id="up-circle" data-name="Flat Color" xmlns="http://www.w3.org/2000/svg" class="icon flat-color" stroke="#3B3E48" stroke-width="0.00024000000000000003"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.9600000000000002"><circle id="primary" cx="12" cy="12" r="10" style="fill: #3B3E48;"></circle><path id="secondary" d="M15,14a1,1,0,0,1-.71-.29L12,11.41l-2.29,2.3a1,1,0,0,1-1.42-1.42l3-3a1,1,0,0,1,1.42,0l3,3a1,1,0,0,1,0,1.42A1,1,0,0,1,15,14Z" style="fill: #018574;"></path></g><g id="SVGRepo_iconCarrier"><circle id="primary" cx="12" cy="12" r="10" style="fill: #3B3E48;"></circle><path id="secondary" d="M15,14a1,1,0,0,1-.71-.29L12,11.41l-2.29,2.3a1,1,0,0,1-1.42-1.42l3-3a1,1,0,0,1,1.42,0l3,3a1,1,0,0,1,0,1.42A1,1,0,0,1,15,14Z" style="fill: #018574;"></path></g></svg>
|
||||
{{- else -}}
|
||||
|
|
|
@ -26,8 +26,16 @@
|
|||
{{- with .Params.description }}
|
||||
<p>{{.}}</p>
|
||||
{{- end }}
|
||||
{{- with $.Param "author" }}
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-feather"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>{{ . }}</p>
|
||||
|
||||
{{- if and .Params.author .Params.authorLink}}
|
||||
{{ $relreflink := relref . .Params.authorLink }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Params.author }}</a></p>
|
||||
{{- else if .Params.author }}
|
||||
{{ $relreflink := relref . .Site.Author.about }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Params.author }}</a></p>
|
||||
{{- else }}
|
||||
{{ $relreflink := relref . .Site.Author.about }}
|
||||
<p>{{ partial "svg.html" (dict "context" . "name" "author") }}<a href="{{ $relreflink }}" target="_blank">{{ .Site.Author.name }}</a></p>
|
||||
{{- end }}
|
||||
{{- with .Params.tags }}
|
||||
<p>
|
||||
|
@ -37,7 +45,7 @@
|
|||
{{- end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }}</p>
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }} {{ partial "readTime.html" . }}</p>
|
||||
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}
|
||||
{{ if .Lastmod }}
|
||||
{{ if not (eq .Lastmod .Date ) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue