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

This commit is contained in:
BBaoVanC 2021-11-25 23:34:56 -06:00
parent ebcbccb3bb
commit 6bedf987d6
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
9 changed files with 108 additions and 74 deletions

View File

@ -15,15 +15,17 @@
{{ end }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
</div>

View File

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

View File

@ -10,15 +10,17 @@
{{ .Content }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}

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" . }}

View File

@ -5,12 +5,18 @@
</h1>
<div class="tag-list">
<ul>
{{ range .Data.Terms.Alphabetical }}
<a href="{{ .Page.Permalink }}">
<li>{{ .Page.Title | markdownify }}</li>
</a>
{{ end }}
</ul>
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
<a href="{{ .Page.Permalink }}">
<li>{{ .Page.Title | markdownify }}</li>
</a>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -7,15 +7,17 @@
{{ partial "description-or-summary.html" . }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}

View File

@ -10,12 +10,18 @@
</h1>
<div class="taxonomy">
<ul>
{{ range .Data.Terms.Alphabetical }}
<li>
<a href="{{ .Page.Permalink }}">{{ .Page.Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
<li>
<a href="{{ .Page.Permalink }}">{{ .Page.Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -12,15 +12,17 @@
{{ partial "description-or-summary.html" . }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}