commit 4f103bff60f8fa8db18884ce9d86f4b30e0a3630
parent 1d81efc1fd3aa3a71b4ef09076251559fcfb5702
Author: Thomasorus <contact@thomasorus.com>
Date: Wed, 12 Jan 2022 21:35:03 +0100
Cleaned HTML, put the meta in a section tag, changed invisible text, added @ before username.
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/html/head.html b/html/head.html
@@ -44,7 +44,7 @@
blockquote { padding-left: 1rem; border-left: 3px solid black }
div { margin-bottom: 2rem; }
textarea { min-height: 10rem; }
- article > p:first-of-type, form div, label { margin-bottom: 0; }
+ article > section, form div, label { margin-bottom: 0; }
h1 a:visited,
a:not([class]) {
color: black;
diff --git a/html/thread.html b/html/thread.html
@@ -3,9 +3,14 @@
<h1>{{ .Data.Title }}</h1>
{{ range $index, $post := .Data.Posts }}
<article>
- <div>
- <p><span><b>{{ $post.Author }}</b><span class="visually-hidden"> responded:</span></span><span style="float: right;"><time datetime="{{ $post.Publish | formatDate }}">{{ $post.Publish | formatDateRelative }}</time></span></p>
- {{ $post.Content }}
+ <section aria-label="Post meta">
+ <span class="visually-hidden">Author:</span>
+ <b><span aria-hidden="true">@</span>{{$post.Author}}</b>
+ <time style="float: right;" datetime="{{ $post.Publish | formatDate }}">
+ {{ $post.Publish | formatDateRelative }}
+ </time>
+ </section>
+ {{ $post.Content }}
</article>
{{ end }}
{{ if .LoggedIn }}