File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ ignoreFiles = ['_index\.template\.md$']
2222 tag = " tags"
2323 author = " author"
2424
25+ # blog archives render a 3-column card grid, so pages hold a multiple of 3
26+ [pagination ]
27+ pagerSize = 9
28+
2529[params ]
2630 # draft site: keep search engines out — remove before production launch
2731 noindex = true
Original file line number Diff line number Diff line change 1+ {{ define "main" }}
2+ < section id ="blog " class ="sectionPad ">
3+ < div class ="gradientOverlay blueGradient inverted "> </ div >
4+ < div class ="container ">
5+ < div class ="row ">
6+ {{ if or .Title .Content }}
7+ < h1 class ="col-sm-12 textGradient "> {{ if ne .Section "blog" }} < span class ="capitalize "> {{ .Section }}:</ span > {{ end }} {{ .Title }}</ h1 >
8+ {{ with .Content }}< div > {{ . }}</ div > {{ end }}
9+ {{ end }}
10+ < div id ="postList " class ="row columnGap ">
11+ {{ range .Paginator.Pages }}
12+ {{ .Render "summary" }}
13+ {{ end }}
14+ </ div >
15+ {{ partial "pagination.html" . }}
16+ </ div >
17+ </ div >
18+ </ section >
19+ {{ end }}
Original file line number Diff line number Diff line change 1+ {{ if gt .Paginator.TotalPages 1 }}
2+ < div class ="separator "> </ div >
3+ < nav class ="pagination textCenter ">
4+ {{ if .Paginator.HasPrev }}
5+ < a href ="{{ .Paginator.Prev.URL }} " class ="prev noUnderline " title ="Previous page "> ‹</ a >
6+ {{ end }}
7+ {{ range $i, $pager := .Paginator.Pagers }}
8+ {{- if $i }}< span class ="dot "> ·</ span > {{ end -}}
9+ {{- if eq $pager.PageNumber $.Paginator.PageNumber -}}
10+ < span class ="current "> {{ $pager.PageNumber }}</ span >
11+ {{- else -}}
12+ < a href ="{{ $pager.URL }} " class ="noUnderline " title ="Page {{ $pager.PageNumber }} "> {{ $pager.PageNumber }}</ a >
13+ {{- end -}}
14+ {{ end }}
15+ {{ if .Paginator.HasNext }}
16+ < a href ="{{ .Paginator.Next.URL }} " class ="next noUnderline " title ="Next page "> ›</ a >
17+ {{ end }}
18+ </ nav >
19+ {{ end }}
Original file line number Diff line number Diff line change 4444 transform : rotate (225deg ) translateY (-1px );
4545 }
4646}
47+
48+ /* blog pagination (project partial): centered "< 1 · 2 · 3 > " pager */
49+ .pagination {
50+ /* relative lifts it above the section's absolutely-positioned
51+ .gradientOverlay, which otherwise swallows the clicks */
52+ position : relative;
53+ width : 100% ;
54+ margin-top : 30px ;
55+ }
56+
57+ .pagination a ,
58+ .pagination .current ,
59+ .pagination .dot {
60+ display : inline-block;
61+ padding : 0 10px ;
62+ }
63+
64+ .pagination a {
65+ color : var (--baseColor );
66+ }
67+
You can’t perform that action at this time.
0 commit comments