aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 88e4bb85d205e5703e242332a356c8d5cb264a4a (plain) (blame)
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
{{ define "main" }}
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-4">
            {{ if .Title }}
                <h1 class="post-title fw-semibold">
                    {{ .Title }}
                </h1>
                {{ .Content }}
                <a href="/feed/" class="btn btn-primary">{{ partial "icon.html" "rss" }} Пописка</a>
            {{ end }}
        </div>
        <div class="col-xs-12 col-sm-12 col-md-8">
            {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
            {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
            {{ $filtered := ($pages | intersect $notHidden) }}
            {{ $pag := .Paginate ($filtered) }}

            {{ $paginator := .Paginate .Pages 7 }}
            {{ range $paginator.Pages }}
            {{ partial "list.html" . }}
            {{ end }}
            <nav>{{ partial "pagination.html" . }}</nav>
        </div>
    </div>
</div>
{{ end }}