Skip to content

Commit 96c2f20

Browse files
committed
Tidy list partial to make crosswalks list easier to understand
1 parent ea9622a commit 96c2f20

File tree

1 file changed

+33
-22
lines changed
  • themes/CodeMeta-Pyramids/layouts/partials

1 file changed

+33
-22
lines changed

themes/CodeMeta-Pyramids/layouts/partials/list.html

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,46 @@
77
</div>
88
{{end}}
99

10-
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
1110

1211
<!-- List pages can get Content and yaml metadata from an _index.md -->
1312
{{ with .Content }}<div class="article-style" itemprop="articleBody">{{ . }}</div>{{ end }}
1413

1514

1615
<div class="row">
17-
<div class="col-11">
16+
<table class="col-11">
1817
{{ range .Paginator.Pages }}
19-
<div class="article">
20-
<h2><a href="{{ .RelPermalink }}">{{if .Params.image }} <img alt="{{ substr .Params.image 5 -4 }} logo" src="{{ .Params.image }}" height="50px"/> {{ end }}{{ .Title }}</a></h2>
21-
</div>
18+
<tr class="article">
19+
<td class="col-2 p-2 text-center">
20+
{{if .Params.image }}
21+
<img style="height:auto;max-width:75px;" alt="{{ substr .Params.image 5 -4 }} logo" src="{{ .Params.image }}" height="50px"/>
22+
{{ end }}
23+
</td>
24+
<td>
25+
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
26+
</td>
27+
</tr>
2228
{{ end }}
23-
</div>
29+
</table>
30+
31+
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
32+
<nav class="mt-5">
33+
<table class="col-12">
34+
<tr class="pager">
35+
<td class="col-4 text-end">
36+
{{ if .Paginator.HasPrev }}
37+
<a href="{{ .Paginator.Prev.URL | relURL }}">&laquo; Previous</a>
38+
{{ end }}
39+
</td>
40+
<td class="col-4 text-center">
41+
{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</td>
42+
<td class="col-4 text-start">
43+
{{ if .Paginator.HasNext }}
44+
<a href="{{ .Paginator.Next.URL | relURL }}">Next &raquo;</a>
45+
{{ end }}
46+
</td>
47+
</tr>
48+
</table>
49+
</nav>
50+
{{ end }}
2451

25-
26-
27-
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
28-
<nav>
29-
<ul class="pager">
30-
{{ if .Paginator.HasPrev }}
31-
<li><a href="{{ .Paginator.Prev.URL | relURL }}">&laquo; Previous</a></li>
32-
{{ end }}
33-
{{ if .Paginator.HasNext }}
34-
<li><a href="{{ .Paginator.Next.URL | relURL }}">Next &raquo;</a></li>
35-
{{ end }}
36-
</ul>
37-
</nav>
38-
{{ end }}
39-
40-
<br />
4152
</div>

0 commit comments

Comments
 (0)