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

archive.html « partials « layouts - github.com/wd/hugo-fabric.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d835dc2d6ca27395a75152ae551c2dd974267957 (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
{{ $.Scratch.Add "last" 0 }}
{{ range (where $.Site.Pages "Kind" $.Site.Params.theme.post_type) }}
    {{ if ne .Type $.Site.Params.theme.archive_post_type }}
        {{ $year := .Date.Format "2006" | int }}
        {{ $post_date := .Date.Format "01-02" }}
        {{ $last := $.Scratch.Get "last" }}
        {{ if ne $last $year }}
            {{ if ne $last 0 }}
            </section>
            {{ end }}
            {{ $.Scratch.Set "last" $year }}
            <section class="archives"><h1 class="year">{{ $year }}</h1><div class="top-border-padding"></div>
        {{ end }}

        <article>
            <h2 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
        	<div class="meta">
                <span class="date">{{ $post_date }}</span>
                <span class="tags">{{ partial "post/tags.html" . }}</span>
                {{ if $.Site.Params.theme.disqus_shortname }}
                <span class="comments"><a href="{{ .Permalink }}#disqus_thread">Comments</a></span>
                {{ end }}
        	</div>
        </article>
    {{ end }}
{{ end }}
</section>