mirror of
https://github.com/tomfran/typo.git
synced 2025-04-26 13:39:55 +03:00
parent
5e5762617e
commit
f3b937e0ad
3 changed files with 48 additions and 38 deletions
|
@ -201,11 +201,15 @@ footer a {
|
|||
color: var(--content-secondary);
|
||||
}
|
||||
|
||||
.list-container {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 0rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,25 +34,28 @@
|
|||
|
||||
{{ if .Site.Params.homeCollection }}
|
||||
|
||||
{{ with .Site.Params.homeCollectionTitle}}
|
||||
<h1> {{ . }} </h1>
|
||||
{{ end }}
|
||||
<div class="list-container">
|
||||
{{ with .Site.Params.homeCollectionTitle}}
|
||||
<h1> {{ . }} </h1>
|
||||
{{ end }}
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Section" .Site.Params.homeCollection }}
|
||||
{{ $pages := where .Site.RegularPages "Section" .Site.Params.homeCollection
|
||||
}}
|
||||
|
||||
{{ $paginationSize := 1}}
|
||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||
{{ end }}
|
||||
{{ $paginationSize := 1}}
|
||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||
{{ end }}
|
||||
|
||||
{{ $paginator := .Paginate $pages $paginationSize }}
|
||||
{{ $paginator := .Paginate $pages $paginationSize }}
|
||||
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
{{ partial "post-entry.html" $page}}
|
||||
{{ end }}
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
{{ partial "post-entry.html" $page}}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination-controls.html" $paginator}}
|
||||
{{ partial "pagination-controls.html" $paginator}}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
|
@ -1,29 +1,32 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<div class="list-container">
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
|
||||
{{ $tagsPage := eq .Title "Tags"}}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
|
||||
{{ $paginationSize := 1}}
|
||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||
{{ $tagsPage := eq .Title "Tags"}}
|
||||
|
||||
{{ $paginationSize := 1}}
|
||||
{{ if (gt .Site.Params.paginationSize 0) }}
|
||||
{{ $paginationSize = .Site.Params.paginationSize }}
|
||||
{{ end }}
|
||||
|
||||
{{ $paginator := .Paginate (.Pages) $paginationSize }}
|
||||
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
|
||||
{{ if $tagsPage }}
|
||||
{{ partial "tag-entry.html" $page}}
|
||||
{{ else }}
|
||||
{{ partial "post-entry.html" $page}}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination-controls.html" $paginator}}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $paginator := .Paginate (.Pages) $paginationSize }}
|
||||
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
|
||||
{{ if $tagsPage }}
|
||||
{{ partial "tag-entry.html" $page}}
|
||||
{{ else }}
|
||||
{{ partial "post-entry.html" $page}}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination-controls.html" $paginator}}
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue