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: 0e4692ce6b02b7d875ed5a2da3cb911685ff1bcc (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
<header class="article-header">
    <a href="{{ .Permalink }}">
    <h1 class="article-title" itemprop="name">
        {{ .Title }}
    </h1>
    </a>
    <div class="article-meta">
        <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>

        
        {{ 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 }}
                <a class="article-category-link" href="{{ $.Site.BaseURL }}categories/{{ . | urlize | lower }}">{{ . }}</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 }}
                <a class="article-category-link" href="{{ $.Site.BaseURL }}tags/{{ . | urlize | lower }}">{{ . }}</a>
                {{ if lt $k (sub $tagsLen 1) }}&middot;{{ end }}
                {{ end }}
            </div>
            {{ end }}
        {{ end }}
    </div>
</header>