Use unordered list instead of table on post index

main
Brian Picciano 1 year ago
parent 14bf8033b2
commit cbaaad38c9
  1. 2
      src/cmd/load-test-data/test-data.yml
  2. 4
      src/http/static/mediocre.css
  3. 32
      src/http/tpl/index.html

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

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

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

Loading…
Cancel
Save