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

single.html « _default « layouts - github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4c9bf3b43eeb166ad1069108d0ff34d961019b13 (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{{ define "header" }}
<!-- Post Header -->
<style type="text/css">
    header.intro-header {
        background-image: url('{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ .Site.Params.header_image | relURL}}{{ end }}')
    }
</style>
{{ if eq .Params.headerstyle "text" }}
<header class="intro-header style-text" >
{{ else }}
<header class="intro-header" >
{{ end }}
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                    <div class="tags">
                        {{ range .Params.tags }}
                        <a class="tag" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" title="{{ . }}">
                            {{ . }}
                        </a>
                        {{ end }}
                    </div>
                    <h1>{{ .Title }}</h1>
                    <h2 class="subheading">{{ .Params.subtitle }}</h2>
                    <span class="meta">
                        {{ if .Params.metadata }}
                            {{ range $index, $element := .Params.metadata }}
                                {{ if .link }}
                                    <a href="{{ .link }}">{{ .text }}</a>
                                {{ else }}
                                    {{ .text }}
                                {{ end }}
                            {{ end }}
                        {{ else }}
                            Posted by 
                            {{ if .Params.author }}
                                {{ .Params.author }}
                            {{ else }}
                                    {{ .Site.Title }}
                            {{ end }} 
                            on 
                            {{ .Date.Format "Monday, January 2, 2006" }}
                            {{ if .Site.Params.page_view_conter }}
                                {{ partial "page_view_counter.html" . }}
                            {{ end }}
                            <!-- Don't show "Last Modified on" if update happened on the same day. -->
                            {{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }}
                            <br>Last Modified on {{ dateFormat "Monday, January 2, 2006" .Params.LastMod }}
                            {{ end }}
                        {{ end }}    
                    </span>
                </div>
            </div>
        </div>
    </div>
</header>
{{ end }}

{{ define "main" }}
<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">

            <!-- Post Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                post-container">

                <!--
                {{ if not (eq (.Param "showtoc") false) }}
                <header>
                    <h2>TOC</h2>
                </header>
                {{.TableOfContents}}
                {{ end }}
                -->
                {{ .Content }}

                {{ if .Site.Params.reward }}
                {{ partial "reward.html" . }}
                {{ end }}

                <hr>
                <ul class="pager">
                    {{ if .PrevInSection }}
                    <li class="previous">
                        <a href="{{ .PrevInSection.RelPermalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title}}">&larr;
                            Previous Post</a>
                    </li>
                    {{ end }}
                    {{ if .NextInSection }}
                    <li class="next">
                        <a href="{{ .NextInSection.RelPermalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title}}">Next
                            Post &rarr;</a>
                    </li>
                    {{ end }}
                </ul>
                {{ partial "comments.html" . }}
            </div>

            <!-- Side Catalog Container -->
            {{ if not (eq (.Param "showtoc") false) }}
            <div class="
                col-lg-2 col-lg-offset-0
                visible-lg-block
                sidebar-container
                catalog-container">
                <div class="side-catalog">
                    <hr class="hidden-sm hidden-xs">
                    <h5>
                        <a class="catalog-toggle" href="#">CATALOG</a>
                    </h5>
                    <ul class="catalog-body"></ul>
                </div>
            </div>
            {{ end }}

            <!-- Sidebar Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->
                {{ if .Site.Params.featured_tags }}
                <section>
                    <hr class="hidden-sm hidden-xs">
                    <h5><a href="/tags/">FEATURED TAGS</a></h5>
                    <div class="tags">
                        {{ $featured_condition_size := .Site.Params.featured_condition_size }}
                        {{ range $name, $taxonomy := .Site.Taxonomies.tags }}
                        {{ if gt (len $taxonomy.Pages) $featured_condition_size }}
                        <a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
                            {{ $name }}
                        </a>
                        {{ end }}
                        {{ end }}
                    </div>
                </section>
                {{ end }}

                <!-- Friends Blog -->
                {{ if .Site.Params.friends }}
                <section>
                    <hr>
                    <h5>FRIENDS</h5>
                    <ul class="list-inline">
                        {{ range .Site.Params.friend_link }}
                        <li><a target="_blank" href="{{.href}}">{{.title}}</a></li>
                        {{ end }}
                    </ul>
                </section>
                {{ end }}
            </div>
        </div>
    </div>
</article>

{{ end }}