mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 01:47:28 -05:00
Split duplicated .page-list
div into separate partial
This commit is contained in:
@ -11,24 +11,10 @@
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="page-list">
|
||||
{{ with .Paginator.Pages.Reverse }}
|
||||
<ul>
|
||||
{{ $i := 0 }}
|
||||
{{ $total := len $.Pages }}
|
||||
{{ range . }}
|
||||
{{ $i = add 1 $i }}
|
||||
{{ .Scratch.Set "series_position" $i }}
|
||||
{{ .Scratch.Set "series_total" $total }}
|
||||
<li>{{ .Render "summary/post" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
<div>
|
||||
{{ i18n "no_posts" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ with .Paginator.Pages.Reverse }}
|
||||
{{ partial "page-list.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user