mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: can not disable params.footer.siteTime
This commit is contained in:
@@ -181,6 +181,7 @@
|
||||
license = '<a rel="license external nofollow noopener noreferrer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
||||
# FixIt 0.2.17 | CHANGED Site creation time
|
||||
[params.footer.siteTime]
|
||||
enable = false
|
||||
animate = true
|
||||
icon = "fa-solid fa-heartbeat"
|
||||
pre = ""
|
||||
|
||||
+1
-1
Submodule docs updated: cb80c07b28...7337263a88
@@ -232,8 +232,10 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Site creation time */ -}}
|
||||
{{- with .Site.Params.footer.siteTime.value -}}
|
||||
{{- $config = dict "siteTime" . | merge $config -}}
|
||||
{{- if .Site.Params.footer.siteTime.enable -}}
|
||||
{{- with .Site.Params.footer.siteTime.value -}}
|
||||
{{- $config = dict "siteTime" . | merge $config -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* PWA */ -}}
|
||||
|
||||
@@ -44,15 +44,17 @@
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Site.Params.footer.siteTime.value | or .Site.Params.footer.wordCount -}}
|
||||
{{- if .Site.Params.footer.siteTime.enable | or .Site.Params.footer.wordCount -}}
|
||||
<div class="footer-line statistics{{ with .Site.Params.footer.order.statistics }} order-{{ . }}{{ end }}">
|
||||
{{- with .Site.Params.footer.siteTime -}}
|
||||
<span class="site-time" title='{{ T "footer.siteRunning" }}'>
|
||||
{{- $siteTimeIcon := printf (cond .Animate "%v fa-fw animate-icon" "%v fa-fw") .Icon -}}
|
||||
{{- dict "Class" $siteTimeIcon | partial "plugin/icon.html" -}}
|
||||
{{- with .Pre -}}<span class="ms-1 d-none">{{ . }}</span>{{- end -}}
|
||||
{{- printf `<span class="run-times ms-1">%v</span>` (T "footer.siteRunning") | safeHTML -}}
|
||||
</span>
|
||||
{{- if .Site.Params.footer.siteTime.enable | and .Site.Params.footer.siteTime.value -}}
|
||||
{{- with .Site.Params.footer.siteTime -}}
|
||||
<span class="site-time" title='{{ T "footer.siteRunning" }}'>
|
||||
{{- $siteTimeIcon := printf (cond .Animate "%v fa-fw animate-icon" "%v fa-fw") .Icon -}}
|
||||
{{- dict "Class" $siteTimeIcon | partial "plugin/icon.html" -}}
|
||||
{{- with .Pre -}}<span class="ms-1 d-none">{{ . }}</span>{{- end -}}
|
||||
{{- printf `<span class="run-times ms-1">%v</span>` (T "footer.siteRunning") | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{{- $warns = $warns | append "The parameter `autoBookmark` is deprecated since v0.2.17, use `page.autoBookmark` instead." -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.footer.siteTime -}}
|
||||
{{- if gt (len .) 4 -}}
|
||||
{{- if gt (len .) 5 -}}
|
||||
{{- $errors = $errors | append "The parameter `footer.siteTime` has changed to an array since v0.2.17. Please correct the format!" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user