diff options
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..88e4bb8 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,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 }} |