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

article-header.html « partials « layouts - github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2e137b9157c839bdf720f6d85123e2fa944efadd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<section class="article header">
    <h1 class="article title">{{- .Title | safeHTML -}}</h1>
    {{- $dateFormat := site.Params.dateFormat -}}
    {{- if not $dateFormat -}}{{- $dateFormat = "2006-01-02" -}}{{- end -}}
    {{- $lastmodFormat := "" -}}
    {{- $lastmod := .Lastmod -}}
    {{- if $lastmod -}}
        {{- $lastmodFormat = $lastmod.Format $dateFormat -}}
    {{- end -}}
    {{- if .Date -}}
        {{- $dateFormat := .Date.Format $dateFormat -}}
        <p class="article date">{{- $dateFormat -}}
            {{- if and ($lastmod.After .Date) (ne $lastmodFormat $dateFormat) -}}
                <span class="lastmod">{{- printf (T "edited") $lastmodFormat -}}</span>
            {{- end -}}
            {{- if or (eq .Params.readingTime true) (and (not (eq .Params.readingTime false)) (eq site.Params.readingTime true)) -}}
            <span class="reading-time">{{ T "readingTime" .ReadingTime }}</span>
            {{- end -}}
            {{- if .IsTranslated -}}
            <span class="langs">
                {{- range .Translations -}}
                <span class="lang"><a href="{{- .RelPermalink -}}">{{- .Lang -}}</a></span>
                {{- end -}}
            </span>
            {{- end -}}
        </p>
    {{- end -}}
    {{- partial "article-header-extra.html" . -}}
</section>