Use unordered list instead of table on post index

This commit is contained in:
Brian Picciano 2022-11-23 18:53:40 +01:00
parent 14bf8033b2
commit cbaaad38c9
3 changed files with 16 additions and 22 deletions

View File

@ -65,7 +65,7 @@ published_posts:
- id: empty-test
title: Empty Test
description: A post with no content. Might as well test it.
description:
tags:
- foo
- bar

View File

@ -89,6 +89,10 @@ ul {
list-style: circle;
}
ul li {
margin-bottom: 1rem;
}
hr {
margin: 2rem 0 2rem 0;
border-color: var(--nc-bg-3);

View File

@ -11,28 +11,18 @@
</p>
{{ end }}
<table>
<colgroup>
<col span="1" style="width: 7rem;">
<col span="1">
<col span="1" style="width: 50%;">
</colgroup>
<ul>
{{ range .Payload.Posts }}
<tr>
<td>{{ DateTimeFormat .PublishedAt }}</td>
<td><a href="{{ PostURL .ID }}">{{ .Title }}</td>
<td><em>{{ .Description }}</em></td>
</tr>
<li>
<a href="{{ PostURL .ID }}">
{{ DateTimeFormat .PublishedAt }} / {{ .Title }}
</a>
{{ if .Description }}
<br/><em>{{ .Description }}</em>
{{ end }}
</table>
{{ if ge .Payload.NextPage 0 }}
<p>
<a href="?p={{ .Payload.NextPage}}">Next Page &gt; &gt;</a>
</p>
</li>
{{ end }}
</ul>
{{ end }}