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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/article/components/details.html')
-rw-r--r--layouts/partials/article/components/details.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html
index cb85f1c..cc0a0fc 100644
--- a/layouts/partials/article/components/details.html
+++ b/layouts/partials/article/components/details.html
@@ -23,9 +23,12 @@
{{ end }}
</div>
- {{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }}
+ {{ $showReadingTime := .Params.readingTime | default (.Site.Params.article.readingTime) }}
+ {{ $showDate := not .Date.IsZero }}
+ {{ $showFooter := or $showDate $showReadingTime }}
+ {{ if $showFooter }}
<footer class="article-time">
- {{ if not .Date.IsZero }}
+ {{ if $showDate }}
<div>
{{ partial "helper/icon" "date" }}
<time class="article-time--published">
@@ -34,7 +37,7 @@
</div>
{{ end }}
- {{ if (.Params.readingTime | default (.Site.Params.article.readingTime)) }}
+ {{ if $showReadingTime }}
<div>
{{ partial "helper/icon" "clock" }}
<time class="article-time--reading">