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

archives.html « _default « layouts - github.com/WingLim/hugo-tania.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9e0cda19c969d6035f17f53736565639a31851d (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
{{ define "main" }}

<header>
    <div class="container">
        <h1>{{ .Title }}</h1>
        <p class="subtitle">{{ .Params.subtitle }}</p>
    </div>
</header>

{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}

<section>
    <div class="container">
        <div class="filter-container">
          {{ $maxCategoryToShow := $.Site.Params.maxCategoryToShow | default 5 }}
          {{ range .Site.Taxonomies.categories.TaxonomyArray | first $maxCategoryToShow }}
            <div class="filter-item" data-value="{{ .Page.Title }}" data-type="categories">
              {{ .Page.Title }}<sup>{{ .Count }}</sup>
            </div>
          {{ end }}
        </div>
        <input id="search-query" type="search" placeholder="Search for anything...">
        
        <div id="search-results">
        </div>
        <section id="articles-list">
            {{ range $pages.GroupByDate "2006" }}
            <section>
                <h2>{{ .Key }}</h2>
                <div class="posts">
                    {{ range .Pages }}
                    <div class="post">
                        <a href="{{ .RelPermalink }}">
                            <div class="post-row">
                                <time>{{ .Date.Format "Jan 02" }}</time>
                                <h3>{{ .Title }}</h3>
                            </div>
                        </a>
                    </div>
                    {{ end }}
                </div>
            </section>
            {{ end }}
        </section>
    </div>
</section>

{{- $opts := dict "minify" hugo.IsProduction -}}
{{ $search := resources.Get "ts/search.ts" | js.Build $opts | fingerprint }}
<script async src="{{ $search.RelPermalink }}"></script>

{{ end }}