Don't put the no_posts message inside a <ul>

This commit is contained in:
2021-11-25 23:34:56 -06:00
parent ebcbccb3bb
commit 6bedf987d6
9 changed files with 108 additions and 74 deletions

View File

@ -5,10 +5,16 @@
</h1>
<div class="series-taxonomy">
<ul>
{{ range .Pages }}
<li>{{ .Render "summary/series" }}</li>
{{ end }}
</ul>
{{ with .Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/series" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -10,20 +10,22 @@
{{ partial "description-or-summary.html" . }}
<div class="page-list">
<ul>
{{ $i := 0 }}
{{ $total := len .Pages }}
{{ range .Paginator.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
{{ 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>
{{ partial "pagination.html" . }}