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

list.html « projects « layouts - github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 619253e7efa69e87a337a1752fb51e0af416e4e3 (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
{{ define "main" }}
    <div class="container markdown top-pad">
        {{ .Content }}
    </div>
    <div class="container">
        <div class="section is-small">
            <div class="columns is-multiline">
                {{ $numberOfPages := len .Pages}}
                {{ range .Pages.ByWeight }}
                {{ if eq (mod $numberOfPages 2) 0 }}
                <div class="column is-half">
                {{ else }}
                <div class="column is-one-third">
                {{ end }}
                    <div class="card">
                        <div class="card-image">
                            <figure class="image is-3by2">
                                <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
                                    {{ with .Resources.ByType "image" }}
                                    {{ range first 1 (sort . "Params.weight") }}
                                    {{ $image := .Resize "302x" }}
                                    <img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}">
                                    {{ end }}
                                    {{ end }}
                                </a>
                            </figure>
                        </div>
                        <div class="card-content has-text-centered top-pad">
                            <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{.Permalink}}{{ end }}">
                                {{ .Title }}
                            </a>
                        </div>
                    </div>
                </div>
                {{ end }}
            </div>
        </div>
    </div>
{{ end }}