more polish, use table on index page

main
Brian Picciano 2 years ago
parent c06dd5c587
commit bb6c715a0e
  1. 13
      srv/src/http/static/mediocre.css
  2. 24
      srv/src/http/tpl/edit-post.html
  3. 16
      srv/src/http/tpl/index.html
  4. 2
      srv/src/http/tpl/post.html

@ -36,6 +36,7 @@ h1, h2, h3, h4, h5, h6, .button-primary, .button, header, footer {
h1, h2, h3 { h1, h2, h3 {
border-bottom: 0; border-bottom: 0;
margin-bottom: 1rem;
} }
h1 a, h1 a,
@ -58,6 +59,18 @@ hr {
opacity: 25%; 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 form,
table td input { table td input {
margin: 0; margin: 0;

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

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

@ -22,7 +22,7 @@
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }} {{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
<hr/> <hr/>
<p><em> <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 }} {{ if .Payload.SeriesPrevious }}
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a> Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a>

Loading…
Cancel
Save