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

github.com/leonstafford/accessible-minimalism-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Stafford <me@ljs.dev>2020-09-10 08:08:16 +0300
committerLeon Stafford <me@ljs.dev>2020-09-10 08:08:16 +0300
commit63ed6991859c1d454c010474896102c1531849a3 (patch)
tree5dba877793d58f2df57122a172120219b7662eaf
parent1ee54531e50b042b0431979eb36c0fc44cdb8960 (diff)
target XHTML 1.0 strict
-rw-r--r--README.md63
-rw-r--r--layouts/_default/baseof.html5
-rw-r--r--layouts/_default/list.html14
-rw-r--r--layouts/_default/single.html16
-rw-r--r--layouts/partials/head.html7
-rw-r--r--layouts/partials/metadata.html12
6 files changed, 95 insertions, 22 deletions
diff --git a/README.md b/README.md
index 1c362a1..abc30cc 100644
--- a/README.md
+++ b/README.md
@@ -4,14 +4,15 @@ Minimalist Hugo theme with a penchant for accessibility
## Project aims
- - HTML 1 and HTML 5 valid code
+ - XHTML 1.0 valid and HTML 5 friendly code
- minimal bloat in the generated markup
- focus on accessibility
- semantic, minimal markup for screen readers
- - minimal CSS for high contrast viewing
+ - minimal added CSS for partially sighted users
- easy to read source code
- minimal config required to get started and use in Hugo
- RSS subscription support
+ - favors fully-blind users over partially or fully sighted users
- mobile-last development
## Who is this for?
@@ -33,6 +34,64 @@ The early web was great for content, unburdened by MBs of JavaScript or CSS.
`cp themes/accessible-minimalism/exampleSite/config.toml .`
+## Configuration
+
+The main things you may want to adjust when using this theme are your content
+ structure and main site menu. Copying the `content` directory from this theme's
+ `exampleSite` directory will be a good place to start. You can compare this
+ with the menu entries in the `config.toml` and it should make sense. Try making
+ changes and see what happens. If it becomes a mess, reset both to initial
+ states.
+
+## Development decisions
+
+ - skip redundancy such as anchor's `title` attributes
+ - default browser colors are high contrast enough
+
+## HTML 1.0 tags (still valid in HTML 5)
+
+```
+<A>
+<ADDRESS>
+<B>
+<BASE>
+<BLOCKQUOTE>
+<BODY>
+<CITE>
+<CODE>
+<DD>
+<DFN>
+<DL>
+<DT>
+<EM>
+<H1>
+<H2>
+<H3>
+<H4>
+<H5>
+<H6>
+<HEAD>
+<HTML>
+<I>
+<IMG>
+<KBD>
+<KEY>
+<LI>
+<LINK>
+<LISTING>
+<MENU>
+<NEXTID>
+<OL>
+<P>
+<PLAINTEXT>
+<PRE>
+<SAMP>
+<STRONG>
+<TITLE>
+<UL>
+<VAR>
+<XMP>
+```
### License
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index f151b3e..dbab0e1 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,6 @@
-<!DOCTYPE html>
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="{{ .Site.LanguageCode }}" xmlns="http://www.w3.org/1999/xhtml">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index c9019c1..b206ecb 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,12 +1,14 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ range .Pages.ByPublishDate.Reverse }}
-<p>
- <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
+
+ <h3><a class="test1" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" . }}
- <a href="{{ .RelPermalink }}">
- <p>{{ .Summary }}</p>
- </a>
-</p>
+ <p>
+ <a class="test2" href="{{ .RelPermalink }}">
+ {{ .Summary | plainify }}
+ </a>
+ </p>
+
{{ end }}
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 8bc28ad..c2e99b6 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,20 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "metadata.html" . }}
-<br><br>
+
{{ .Content }}
+
+<p>See related content by Tags:</p>
+
+<ul>
+
+{{ with .Params.tags }}
+{{ range . }}
+{{ $href := print (absURL "tags/") (urlize .) }}
+<li><a href="{{ $href }}">{{ . }}</a></li>
+{{ end }}
+{{ end }}
+
+</ul>
+
{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 70c133f..80ccc30 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,8 +1,9 @@
<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="icon" href="data:;base64,iVBORw0KGgo=">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <link rel="icon" href="data:;base64,iVBORw0KGgo=" />
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
+ <style type="text/css">body {font-size: 130%;}</style>
</head>
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index b0691cf..2d475ca 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,10 +1,6 @@
+<p>by {{if .Params.author}}{{.Params.author}}{{else}}{{ .Site.Params.author }}{{end}}</p>
+
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
-<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
-{{ with .Params.tags }}
-<i data-feather="tag"></i>
-{{ range . }}
-{{ $href := print (absURL "tags/") (urlize .) }}
-<a href="{{ $href }}">{{ . }}</a>
-{{ end }}
-{{ end }}
+<p>{{ .PublishDate.Format $dateFormat }}</p>
+