mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
Changed Parameter so you have per Page control over the Display of the readingTime. If noting is set, it uses the main setting.
58 lines
1.8 KiB
HTML
58 lines
1.8 KiB
HTML
<div class="article-details">
|
|
{{ if .Params.categories }}
|
|
<header class="article-category">
|
|
{{ range (.GetTerms "categories") }}
|
|
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
|
|
{{ .LinkTitle }}
|
|
</a>
|
|
{{ end }}
|
|
</header>
|
|
{{ end }}
|
|
|
|
<div class="article-title-wrapper">
|
|
<h2 class="article-title">
|
|
<a href="{{ .RelPermalink }}">
|
|
{{- .Title -}}
|
|
</a>
|
|
</h2>
|
|
|
|
{{ with .Params.description }}
|
|
<h3 class="article-subtitle">
|
|
{{ . }}
|
|
</h3>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ if or (not .Date.IsZero) (.Params.article.readingTime) }}
|
|
<footer class="article-time">
|
|
{{ if not .Date.IsZero }}
|
|
<div>
|
|
{{ partial "helper/icon" "date" }}
|
|
<time class="article-time--published">
|
|
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
|
</time>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ if .Site.Params.article.readingTime }}
|
|
<div>
|
|
{{ partial "helper/icon" "clock" }}
|
|
<time class="article-time--reading">
|
|
{{ T "article.readingTime" .ReadingTime }}
|
|
</time>
|
|
</div>
|
|
{{ end }}
|
|
</footer>
|
|
{{ end }}
|
|
|
|
{{ if .IsTranslated }}
|
|
<footer class="article-translations">
|
|
{{ partial "helper/icon" "language" }}
|
|
<div>
|
|
{{ range .Translations }}
|
|
<a href="{{ .Permalink }}" class="link">{{ .Language.LanguageName }}</a>
|
|
{{ end }}
|
|
</div>
|
|
</footer>
|
|
{{ end }}
|
|
</div> |