friends-of-mineral-town/blog/themes/mineral/layouts/partials/pagination.html

34 lines
1.5 KiB
HTML
Raw Permalink Normal View History

{{ $paginator := $.Paginator }}
{{ if ne .Kind "home" }}
{{ $paginator = .Data }}
{{ end }}
{{ if gt $paginator.TotalPages 1 }}
<nav aria-label="page navigation">
<ul class="pagination">
{{ if and (ne $paginator.PageNumber 1) (ne $paginator.PageNumber 2) }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ $paginator.First.URL }}" rel="first" class="page-link"><li class="page-item">«<span class="tablet-hidden"> First</span></li></a>
{{ end }}
{{ if $paginator.HasPrev }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ $paginator.Prev.URL }}" rel="prev" class="page-link"><li class="page-item"><span class="tablet-hidden"> Prev</span></li></a>
{{ end }}
{{ range $paginator.Pagers }}
{{ if eq . $paginator }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ .URL }}" class="page-link"><li class="page-item active">{{ .PageNumber }}</li></a>
{{ else if and (ge .PageNumber (sub $paginator.PageNumber 2)) (le .PageNumber (add $paginator.PageNumber 2)) }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ .URL }}" class="page-link mobile-hidden"><li class="page-item">{{ .PageNumber }}</li></a>
{{ end }}
{{ end }}
{{ if $paginator.HasNext }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ $paginator.Next.URL }}" rel="next" class="page-link"><li class="page-item"><span class="tablet-hidden">Next </span></li></a>
{{ end }}
{{ if and (ne $paginator.PageNumber $paginator.TotalPages) ((ne $paginator.PageNumber (sub $paginator.TotalPages 1))) }}
develop/blog/posts (#4) fix(tag): lowercase feat(theme): dividing horizontal line between posts on lists feat(post): k680t images and links feat(post): hhkb images and links fix(images): cropped aj11cmft low bred fix(posts): spell checked style(posts): whitespace no more 80char line width limit on blog post files bc my text editors know how to word-wrap feat(posts): added stock photos fix(posts): whitespace feat(posts): jojo vans, hori mini pad, arizona superstars, k680t update(schedule): blog post feat(posts): 85hi and ysl college feat(post): neverfull fix(footer): line break make the site copyright block slightly more visually consistent across views feat(pagination): responsive styles - removed linkless ellipses between page numbers and next/previous links - hide first/previous/next/last text labels on smaller views - hide non active page specific links on even smaller views fix(about): stylized email to allow for linebreaks instead of one continuous whitespaceless string, the email address is broken up so that the text will flow properly on smaller views fix(footer): layout alignment add half width column class to nav and removed inline styles feat(styles): shrank skeleton's typography reduced heading sizes to make them more compatible with smaller displays refactor(config.toml): whitespace feat(permalinks): use post title, not filename hides the "ordering" prefix refactor(category): "input hardware" -> "hardware" feat(drafts): marked incomplete posts as drafts marked via hugo/md post headers note(schedule): textfile noting blog post queue order just for reference fix(post): typo in file name refactor(posts): rename md files with post order prefix purely for internal/developmental organizational purposes (because hugo decides post order based on post dates) draft(posts): a lot of empty files or notes Co-authored-by: steven-y-e <steven@mineral.town> Reviewed-on: http://irie.clinic.homo.casa/steven-y-e/friends-of-mineral-town/pulls/4 Co-Authored-By: steven <steven-y-e@noreply.localhost> Co-Committed-By: steven <steven-y-e@noreply.localhost>
2021-09-29 15:33:16 -04:00
<a href="{{ $paginator.Last.URL }}" rel="last" class="page-link"><li class="page-item"><span class="tablet-hidden">Last </span>»</li></a>
{{ end }}
</ul>
</nav>
{{ end }}