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

lists.html « pages « partials « layouts - github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b62899882a78630a6dd813292074f74742ecd258 (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
{{/* List sections (default value is true) */}}
{{ if (or (not (isset .Params "showsections")) (.Params.showsections)) }}
    {{ if .Sections }}
        <div>
            {{ with .Params.sections_title }}
                <h3>{{ . }}</h3>
            {{ end }}

            {{/* Sort the list */}}
            {{ partial "utils/ordered-list.html" (dict "list" .Sections "params" .Params "scratch" .Scratch) }}
            <br>
            <div class="container-fluid">
                <div class="row no-gutter">
                    {{ range (.Scratch.Get "list") }}
                        {{ .Render "limage" }}
                    {{ end }}
                </div>
            </div>
            {{ .Scratch.Delete "list" }}
            <br>
            <hr>
        </div>
    {{ end }}
{{ end }}

{{/* List posts (default value is true) */}}
{{ if (or (not (isset .Params "showposts")) (.Params.showposts)) }}
    {{ if .Pages }}
        <div>
            {{ with .Params.posts_title }}
                <h3>{{ . }}</h3>
            {{ end }}

            {{/* Sort the list */}}
            {{ partial "utils/ordered-list.html" (dict "list" .Pages "params" .Params "scratch" .Scratch) }}
            <ul>
                {{ range (.Scratch.Get "list") }}
                    {{ .Render "li" }}
                {{ end }}
            </ul>
            {{ .Scratch.Delete "list" }}
            <hr>
        </div>
    {{ end }}
{{ end }}