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

summary.html « _default « layouts - github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 60c3a91e034e43c01131c952e67d240042938153 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{{- $scratch := .Scratch.Get "scratch" -}}

<article class="single summary" itemscope itemtype="http://schema.org/Article">
    {{- /* Featured image */ -}}
    {{- with .Params.featuredImage -}}
        <div class="featured-image-preview">
            {{- $image := $.Params.featuredImagePreview | default . -}}
            {{- partial "plugin/image.html" (dict "src" $image "description" $.Description "scratch" $scratch) -}}
        </div>
    {{- end -}}

    {{- /* Title */ -}}
    <h1 class="single-title" itemprop="name headline">
        <a href="{{ .RelPermalink }}">{{ .Title }}</a>
    </h1>

    {{- /* Meta */ -}}
    <div class="post-meta">
        {{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
        {{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
        <span class="post-author">
            {{- $link := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
            {{- partial "plugin/link.html" $link -}}
        </span>

        {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
        &nbsp;<span class="post-publish">
            {{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>
        </span>

        {{- with .Params.categories -}}
            &nbsp;
            <span class="post-category">
                {{- T "included" -}}
                {{- range $index, $value := . -}}
                    {{- if gt $index 0 }}&nbsp;{{ end -}}
                    <a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
                        <i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
                    </a>
                {{- end -}}
            </span>
        {{- end -}}
    </div>

    {{- /* Summary content */ -}}
    <div class="content">
        {{- with .Summary -}}
            {{- partial "single/content.html" . -}}
        {{- else -}}
            {{- .Description | safeHTML -}}
        {{- end -}}
    </div>

    {{- /* Footer */ -}}
    <div class="post-footer">
        <a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
        {{- with .Params.tags -}}
            <div class="post-tags">
                <i class="fas fa-tags fa-fw"></i>&nbsp;
                {{- range $index, $value := . -}}
                    {{- if gt $index 0 }},&nbsp;{{ end -}}
                    <a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
                {{- end -}}
            </div>
        {{- end -}}
    </div>
</article>