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 }} {{ end }}
<div class="page-list"> <div class="page-list">
<ul> {{ with .Paginator.Pages }}
{{ range .Paginator.Pages }} <ul>
<li>{{ .Render "summary/post" }}</li> {{ range . }}
{{ else }} <li>{{ .Render "summary/post" }}</li>
<div> {{ end }}
{{ i18n "no_posts" }} </ul>
</div> {{ else }}
{{ end }} <div>
</ul> {{ i18n "no_posts" }}
</div>
{{ end }}
</div> </div>
</div> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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