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

article_header.html « partials « layouts - gitlab.com/toryanderson/hugo-icarus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4e57e1cccb1f8801c3ed9b5f9a7135eb508b9727 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<header class="article-header">
    <a href="{{ .Permalink }}">
    <h1 class="article-title" itemprop="name">
        {{ .Title }}
    </h1>
    </a>
    <div class="article-meta">

        {{ if not .Params.nodateline }}
        <div class="article-date">
            <i class="fa fa-calendar"></i>
            <time datetime="{{ .Date }}" itemprop="datePublished">{{ .Date.Format .Site.Params.date_format }}</time>
            &middot;
            {{ .WordCount }}
            {{ with .Site.Data.l10n.articles.words }}{{.}}{{end}}
            &middot;
            {{ .ReadingTime }}
            {{ with .Site.Data.l10n.articles.readingtime }}{{.}}{{end}}
        </div>
        {{ end }}
        {{ if isset .Params "categories" }}
            {{ $categoriesLen := len .Params.categories }}
            {{ if gt $categoriesLen 0 }}
            <div class="article-category">
                <i class="fa fa-folder"></i>
                {{ range $k, $v := .Params.categories }}
                {{ $url := printf "categories/%s" (. | urlize | lower) }}
                <a class="article-category-link" href="{{ $url | absURL }}">{{ . }}</a>
                {{ if lt $k (sub $categoriesLen 1) }}&middot;{{ end }}
                {{ end }}
            </div>
            {{ end }}
        {{ end }}

        {{ if isset .Params "tags" }}
            {{ $tagsLen := len .Params.tags }}
            {{ if gt $tagsLen 0 }}
            <div class="article-category">
                <i class="fa fa-tags"></i>
                {{ range $k, $v := .Params.tags }}
                {{ $url := printf "tags/%s" (. | urlize | lower) }}
                <a class="article-category-link" href="{{ $url | absURL }}">{{ . }}</a>
                {{ if lt $k (sub $tagsLen 1) }}&middot;{{ end }}
                {{ end }}
            </div>
            {{ end }}
        {{ end }}
    </div>
</header>