Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kongdivin/hugo-theme-okayish-blog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivin Kong <divin@okayish.dev>2020-08-24 04:39:15 +0300
committerDivin Kong <divin@okayish.dev>2020-08-24 04:39:15 +0300
commitefc42185de14068bebe5a9617bd781328e51260d (patch)
tree6a7822c09df4fe3a8088afa4cd16471aa8c6cbf9
parent242121554d49b1bf6f53a7bc3345b88b57a44d29 (diff)
Improve accessibility and SEOv1.0.7
-rw-r--r--layouts/_default/list.html18
1 files changed, 13 insertions, 5 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index f7e6b04..636ef44 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -13,9 +13,9 @@
{{ $pages = slice }}
{{ range .Site.RegularPages }}
- {{ if $.IsAncestor . }}
- {{ $pages = append . $pages}}
- {{ end }}
+{{ if $.IsAncestor . }}
+{{ $pages = append . $pages}}
+{{ end }}
{{ end }}
{{ end }}
@@ -28,7 +28,11 @@
<div class="col-12">
<div class="p-card">
- <h3><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h3>
+ <!--
+ H3 is not in a sequentially-descending order which is not good for accessibility.
+ However, we still want the visual appearance of H3. Fortunately, Vanilla has a CSS class for that.
+ -->
+ <h2 class="p-heading--3"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
{{/* Check to see if it has post info. */}}
{{ if or .Params.Date (or .Params.Authors .Params.Author) }}
@@ -44,7 +48,11 @@
{{ end }}
{{ if .Truncated }}
- <p><a href="{{ .Permalink }}">{{ i18n "readMore" | default "Read more" }}</a></p>
+ <p>
+ <a href="{{ .Permalink }}">
+ {{ i18n "readMore" | default "Read more" }}<span class="u-off-screen"> of {{ .Title }}</span>
+ </a>
+ </p>
{{ end }}
</div>
</div>