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: fee5664d45d6c5ab4be07785d0c3dd570c73c754 (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
{{- $params := .Params | merge .Site.Params -}}
{{- $tagsStyle := $params.summaryStyle.tags -}}
{{- $tagsTheme := $params.summaryStyle.tags.theme | default "image" -}}

<article onclick="window.open('{{ $.RelPermalink }}')" class="summary summary-animation" itemscope itemtype="http://schema.org/Article" style="margin-bottom:0">
    {{- /* 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 -}}
            {{- dict "Src" . "Title" $.Description "Resources" $.Resources "Height" 798 "Width" 238 | partial "plugin/image.html" -}}
        </div>
    {{- end -}}
    {{- end -}}
    <div class="article-text">
        {{- /* Title */ -}}
        <h2 class="summary-title" itemprop="name headline">
            {{ .Title }}
        </h2>

        {{- if not $params.summaryStyle.hiddenMeta -}}
        {{- /* Meta */ -}}
        <div class="post-meta summary-post-meta">
            {{- $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="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="post-publish"><i class="svg-icon icon-clock"></i>
                {{- printf `<time class="timeago" datetime="%v">%v</time>` $timeAgoDate . | safeHTML -}}
            </span>
            {{- end -}}

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

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

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

        {{- /* 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 -}}
        <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>
        {{- end -}}
        {{- end -}}

    </div>
</article>

<div class="post-tags-summary-under-footer">
{{- with $.Params.tags -}}
    <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>
{{- end -}}
</div>