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

list.html « _default « layouts - github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 767cbd3189cf913bddcbbca908788ab60fdf30bb (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
{{- define "content"}}
<main class="main" role="main">
    <article class="content article article-archives article-type-list" itemscope="">
        <header class="article-header">
            <h1 itemprop="title">{{ .Title }}</h1>
            <p class="text-muted">{{- T "total_article" (len .Site.RegularPages) }}</p>
        </header>
        <div class="article-body">
            {{- $currentYearSection := 0}}
            {{- range $idx,$page := .Site.RegularPages}}
                {{- $thisYear := $page.Date.Format ("2006") }}
                {{- if eq $currentYearSection 0 }}
                    {{- $currentYearSection = $thisYear}}
                {{- end }}
                {{- if or (eq $idx 0) (ne $currentYearSection $thisYear)}}
                    {{- if ne $idx 0 }}
                    </div></div></div></section>
                    {{- end}}
                    <section class="panel panel-default b-no">
                        <div class="panel-heading" role="tab">
                            <h3 class="panel-title">
                                <a data-toggle="collapse" href="#collapse{{- $thisYear }}" aria-expanded="true">
                                    <i class="icon icon-calendar-plus text-active"></i><i class="icon icon-calendar-minus text"></i>
                                    &nbsp;{{- $thisYear }}
                                </a>
                            </h3>
                        </div>
                        <div id="collapse{{- $thisYear }}" class="panel-collapse collapse in" role="tabpanel"
                            aria-labelledby="heading{{- $thisYear }}">
                            <div class="panel-body">
                                <div class="collection">
                {{- end}}
                {{- .Scratch.Set "type" "link"}}
                {{- partial "item-post.html" . }}
            {{- end}}
        </div></div></div></section>
        </div>
    </article>
</main>
{{- end }}