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: 433ce619c9ad3a41e9cb7e1a2a4526b96de6125d (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{{- $params := .Params | merge .Site.Params -}}
{{- $tagsStyle := $params.summaryStyle.tags -}}
{{- $tagsTheme := $params.summaryStyle.tags.theme | default "image" -}}

<article itemscope itemtype="http://schema.org/Article">
    <div class="summary summary-animation" style="margin-bottom:0">
        <header>
            {{- /* Featured image */ -}}
            {{- if not $params.summaryStyle.hiddenImage -}}
            {{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
            {{- with .Resources.GetMatch "featured-image" -}}
                {{- $image = (.Fill "796x238 Center q90").RelPermalink -}}
            {{- end -}}
            {{- with .Resources.GetMatch "featured-image-preview" -}}
                {{- $image = (.Fill "796x238 Center q90").RelPermalink -}}
            {{- end -}}
            {{- with $image -}}
                <div class="featured-image-preview">
                    {{- if eq $tagsTheme "image" -}}
                    {{- with $.Params.tags -}}
                    <div class="post-tags-summary-image">
                        {{- range $index, $value := . -}}
                        {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
                        <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}"><span>{{ $tag.Title }}</span></a>
                        {{- end -}}
                    </div>
                    {{- end -}}
                    {{- end -}}
                    <a href="{{ $.RelPermalink }}" target="_blank">
                        {{- dict "Src" . "Title" $.Description "Resources" $.Resources "Alt" $.Title "Height" 798 "Width" 238 | partial "plugin/image.html" -}}
                    </a>
                </div>
            {{- end -}}
            {{- end -}}

            <div style="padding-top: 20px;padding-left: 20px;padding-right: 20px;">
                {{- /* Title */ -}}
                <h2 class="summary-title" itemprop="name headline">
                    <a href="{{ $.RelPermalink }}" target="_blank">{{ .Title }}</a>
                </h2>

                {{- if not $params.summaryStyle.hiddenMeta -}}
                {{- /* Meta */ -}}
                <div class="post-meta summary-post-meta">

                    {{- $categories := slice -}}
                    {{- range .Params.categories -}}
                    {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
                    {{- $categories = $categories | append (printf `<a href="%v"><span class="svg-icon icon-folder"></span>%v</a>` $category.RelPermalink $category.Title) -}}
                    {{- end -}}
                    {{- with delimit $categories "&nbsp;" -}}
                    <span class="meta-item post-category">
                            {{ . }}
                    </span>
                    {{- end -}}

                    {{- $authorName := $params.name | default .Site.Author.name | default " " -}}
                    {{- if not (eq $authorName " ") -}}
                    {{ $author := index .Site.Data.authors $authorName }}
                    {{- $authorLink := $author.link | default .Site.Home.RelPermalink -}}
                    <span class="meta-item post-author">
                        {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "svg-icon icon-user") "Content" $author.nickname -}}
                        {{- partial "plugin/link.html" $options -}}
                    </span>
                    {{- end -}}

                    {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
                    {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
                    <span class="meta-item post-publish"><span class="svg-icon icon-clock"></span>
                            {{- printf `<time class="timeago" datetime="%v">%v</time>` $timeAgoDate . | safeHTML -}}
                        </span>
                    {{- end -}}

                    {{- with .Params.Views -}}
                    <span class="meta-item post-meta-views">
                            <span class="svg-icon icon-eye"></span>{{ . }}
                        </span>
                    {{- end -}}

                    {{- $comment := .Site.Params.Comment -}}
                    {{- $remark42 := $comment.remark42 | default dict -}}
                    {{- if $remark42.enable -}}
                    <span class="meta-item post-meta-comments">
                            <span class="svg-icon icon-comments"></span><span class="remark42__counter" data-url="{{ .Permalink }}"></span>
                    </span>
                    {{- end -}}
                </div>
                {{- end -}}
            </div>
        </header>

        <div class="article-text">

            {{- /* Summary content */ -}}
            {{- if not $params.summaryStyle.hiddenDescription -}}
            <div class="content summary-content">
                {{- with .Summary -}}
                {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
                {{- else -}}
                {{- .Description | safeHTML -}}
                {{- end -}}
            </div>
            {{- end -}}

            {{- if eq $tagsTheme "footer" -}}
            {{- with $.Params.tags -}}
            <footer>
                <div class="post-tags-summary-footer">
                    {{- range $index, $value := . -}}
                    {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
                    <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}">{{ $tag.Title }}</a>
                    {{- end -}}
                </div>
            </footer>
            {{- end -}}
            {{- end -}}

        </div>
    </div>

    <div class="post-tags-summary-under-footer">
        {{- with $.Params.tags -}}
        <footer>
            <div class="post-tags-summary-under-footer-display" {{ if eq $tagsTheme "under-footer" }}style="display: inline-block;"{{ end }}>
                {{- range $index, $value := . -}}
                {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
                    <a class="post-tag-summary" href="{{ $tag.RelPermalink }}" style="{{ with $tagsStyle.color }}color: {{ . }}; {{ end }}{{ with $tagsStyle.background }}background: {{ . }}; {{ end }}{{ with $tagsStyle.transparency }}opacity: {{ . }}; {{ end }}">{{ $tag.Title }}</a>
                {{- end -}}
            </div>
        </footer>
        {{- end -}}
    </div>
</article>