aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 0c749d21149a125c7db86e879ce92665de92b21a (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 sidebar">
            {{ 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 content">
            {{ $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 }}