more polish, use table on index page

This commit is contained in:
Brian Picciano 2022-08-16 22:24:39 -06:00
parent c06dd5c587
commit 8ad394d202
4 changed files with 30 additions and 24 deletions

View File

@ -58,6 +58,18 @@ hr {
opacity: 25%;
}
table td {
border: 0;
}
table tr {
border-bottom: 1px dashed var(--nc-tx-1);
}
table tr:nth-child(1) {
border-top: 1px dashed var(--nc-tx-1);
}
table td form,
table td input {
margin: 0;

View File

@ -1,16 +1,5 @@
{{ define "body" }}
{{ if gt (len .Payload.Tags) 0 }}
<p>
Existing tags:
<em>
{{ range $i, $tag := .Payload.Tags }}
{{ if ne $i 0 }} {{ end }}{{ $tag }}
{{ end }}
</em>
</p>
{{ end }}
<form method="POST" action="{{ BlogURL "posts/" }}">
<table>
@ -34,9 +23,7 @@
</tr>
<tr>
<td>
<p>Tags (space separated)</p>
</td>
<td>Tags (space separated)</td>
<td>
<input
name="tags"
@ -45,6 +32,15 @@
{{- if ne $i 0 }} {{ end }}{{ $tag -}}
{{- end -}}
"/>
{{ if gt (len .Payload.Tags) 0 }}
<em>
Existing tags:
{{ range $i, $tag := .Payload.Tags }}
{{ if ne $i 0 }} {{ end }}{{ $tag }}
{{ end }}
</em>
{{ end }}
</td>
</tr>

View File

@ -10,17 +10,15 @@
</p>
{{ end }}
<ul>
<table>
{{ range .Payload.Posts }}
<li>
{{ DateTimeFormat .PublishedAt }}
&nbsp;&nbsp; <a href="{{ PostURL .ID }}">{{ .Title }}</a>
&nbsp;&nbsp; {{ .Description }}
</li>
<tr>
<td>{{ DateTimeFormat .PublishedAt }}</td>
<td><a href="{{ PostURL .ID }}">{{ .Title }}</td>
<td><em>{{ .Description }}</em></td>
</tr>
{{ end }}
</ul>
</table>
{{ if ge .Payload.NextPage 0 }}
<p>

View File

@ -22,7 +22,7 @@
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
<hr/>
<p><em>
If you liked this post, consider checking out other posts in the series:<br/>
This post is part of a series.<br/>
{{ if .Payload.SeriesPrevious }}
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a>