Theme Files Update

This commit is contained in:
GitHub Action 2023-10-25 08:10:31 +00:00
parent e05f24b11b
commit 2dd301b5ad
4 changed files with 24 additions and 17 deletions

View file

@ -22,7 +22,7 @@ defaultContentLanguageInSubdir = true
languageCode = "en-us" languageCode = "en-us"
# title = "Hermit - V2" # title = "Hermit - V2"
#enableGitInfo = true # enableGitInfo = true
pygmentsCodefences = true pygmentsCodefences = true
pygmentsUseClasses = true pygmentsUseClasses = true
@ -63,7 +63,7 @@ enableEmoji = true
#homeSubtitle = "Continuing Hermit's legacy to be minimal and fast theme" #homeSubtitle = "Continuing Hermit's legacy to be minimal and fast theme"
footerCopyright = ' <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>' footerCopyright = ' <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
# bgImg = "" # bgImg = ""
# gitUrl = "https://github.com/username/repository/commit/" # gitUrl = "https://github.com/1bl4z3r/hermit-V2/tree/staging"
justifyContent = true justifyContent = true

View file

@ -1,10 +1,10 @@
{{ if .Site.Params.readTime }} {{- if .Site.Params.readTime }}
{{ .Site.Params.readTimeSeparator }} {{ .Site.Params.readTimeSeparator }}
{{ $rT := mul (div (.WordCount) 220.0) 60 }} {{ $rT := mul (div (.WordCount) 220.0) 60 }}
{{ $rTH := math.Floor (div $rT 3600) }} {{ $rTH := math.Floor (div $rT 3600) }}
{{ $rTM := math.Floor (div (mod $rT 3600) 60) }} {{ $rTM := math.Floor (div (mod $rT 3600) 60) }}
{{ $rTS := mod (mod $rT 3600) 60 }} {{ $rTS := mod (mod $rT 3600) 60 }}
{{ if gt $rTH 0 }}{{ $rTH }}{{ cond (gt $rTH 1) " Hours" " Hour" }}{{- end -}} {{- 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 $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 -}} {{- if gt $rTS 0 }}{{- cond (gt $rTM 0) ", " "" -}}{{ $rTS }}{{- cond (gt $rTS 1) " Seconds" " Second" -}}{{- end -}}
{{ end }} {{- end }}

View file

@ -70,6 +70,12 @@
<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-alert-triangle"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> <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-alert-triangle"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
{{- else if (eq .name "admonition_bug") -}} {{- else if (eq .name "admonition_bug") -}}
<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-alert-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg> <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-alert-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
{{- else if (eq .name "posts_single_wordcount") -}}
<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>
{{- else if (eq .name "posts_single_date") -}}
<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>
{{- else if (eq .name "posts_single_git_commit") -}}
<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-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>
{{- else -}} {{- else -}}
<svg xmlns="http://www.w3.org/2000/svg" class="feather feather-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" class="feather feather-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
{{- end -}} {{- end -}}

View file

@ -45,17 +45,18 @@
{{- end }} {{- end }}
</p> </p>
{{- end }} {{- 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" . }} {{ partial "readTime.html" . }}</p> <p>{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{ 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 }} <p>{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local -}}
{{ if .Lastmod }} {{- if or (eq .Page.Params.IgnoreLastmod nil) (not .Page.Params.IgnoreLastmod) -}}
{{ if not (eq .Lastmod .Date ) }} {{- if and .GitInfo .Site.Params.gitUrl -}}
[Modified : {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local }}] [{{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash -}}</a> @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local -}}]
{{ end }} {{- else if not (eq .Lastmod .Date ) -}}
{{ end }} &nbsp;[Modified : {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}]
{{- else -}}
{{ errorf ".Lastmod is not found in Page Frontmatter or .Lastmod is same as .Date" }}
{{- end -}}
{{- end -}}
</p> </p>
{{- if and .GitInfo .Site.Params.gitUrl }}
<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-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}</p>
{{- end }}
</div> </div>
<hr class="post-end"> <hr class="post-end">
<div class="content"> <div class="content">