Initial commit

This commit is contained in:
Kirchik
2025-08-02 11:45:16 +02:00
parent a6a820aba2
commit a0ba937a46
1078 changed files with 7800 additions and 1115 deletions
@@ -42,57 +42,12 @@
</li>
{{ end }}
<!-- Page numbers. -->
{{ range $paginator.Pagers }}
{{ $outer.Scratch.Set "page_number_flag" false }}
<!-- Advanced page numbers. -->
{{ if gt $paginator.TotalPages $max_links }}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{ if le $paginator.PageNumber $lower_limit }}
<!-- If the current loop page is less than max_links. -->
{{ if le .PageNumber $max_links }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{ else if ge $paginator.PageNumber $upper_limit }}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Middle pages. -->
{{ else }}
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
{{ end }}
<!-- Simple page numbers. -->
{{ else }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Output page numbers. -->
{{ if eq ($outer.Scratch.Get "page_number_flag") true }}
<li>
<a href="{{ .URL }}" class="page{{ if eq . $paginator }} active{{ end }}">
{{ .PageNumber }}
</a>
</li>
{{ end }}
{{ end }}
<!-- Информация о страницах для десктопа -->
<li class="page-info desktop-only">
<span class="current-page">{{ $paginator.PageNumber }}</span>
<span class="separator">из</span>
<span class="total-pages">{{ $paginator.TotalPages }}</span>
</li>
<!-- Next page. -->
{{ if $paginator.HasNext }}