summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-08-16 22:24:39 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-08-16 22:26:31 -0600
commitbb6c715a0ec9470c2cd5fdf5f86a2bf0b2c41f39 (patch)
tree000995bbac01f4f350dd410668e196bde6db0ea0
parentc06dd5c5873f7d2c96946dd2414687e8b0eb71f3 (diff)
more polish, use table on index page
-rw-r--r--srv/src/http/static/mediocre.css13
-rw-r--r--srv/src/http/tpl/edit-post.html24
-rw-r--r--srv/src/http/tpl/index.html16
-rw-r--r--srv/src/http/tpl/post.html2
4 files changed, 31 insertions, 24 deletions
diff --git a/srv/src/http/static/mediocre.css b/srv/src/http/static/mediocre.css
index d6e2905..7b9d784 100644
--- a/srv/src/http/static/mediocre.css
+++ b/srv/src/http/static/mediocre.css
@@ -36,6 +36,7 @@ h1, h2, h3, h4, h5, h6, .button-primary, .button, header, footer {
h1, h2, h3 {
border-bottom: 0;
+ margin-bottom: 1rem;
}
h1 a,
@@ -58,6 +59,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;
diff --git a/srv/src/http/tpl/edit-post.html b/srv/src/http/tpl/edit-post.html
index 9376f2e..5db0600 100644
--- a/srv/src/http/tpl/edit-post.html
+++ b/srv/src/http/tpl/edit-post.html
@@ -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>
diff --git a/srv/src/http/tpl/index.html b/srv/src/http/tpl/index.html
index 22f0e1c..1a5eaf8 100644
--- a/srv/src/http/tpl/index.html
+++ b/srv/src/http/tpl/index.html
@@ -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>
diff --git a/srv/src/http/tpl/post.html b/srv/src/http/tpl/post.html
index d4b24f4..c7ffc30 100644
--- a/srv/src/http/tpl/post.html
+++ b/srv/src/http/tpl/post.html
@@ -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>