From 6be02cea11848175ead843d2ecad78dd0548a8a4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 21 Jun 2023 13:21:25 +0200 Subject: Add skip links for accessibility --- templates/index.html | 66 +++++++++++++++--------------- themes/bear/templates/header.html | 1 + themes/bear/templates/page.html | 2 +- themes/bear/templates/section.html | 2 +- themes/bear/templates/style.html | 9 ++++ themes/bear/templates/taxonomy_list.html | 2 +- themes/bear/templates/taxonomy_single.html | 2 +- 7 files changed, 48 insertions(+), 36 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7370d21..7a7d753 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,36 +5,38 @@ {% block title_class %} p-name fn{% endblock %} {% block main %} -
- {{ section.content | safe }} -
-
-

Latest Posts

- -
-
-

Elsewhere on the Internet

- -
- +
+
+ {{ section.content | safe }} +
+
+

Latest Posts

+ +
+
+

Elsewhere on the Internet

+ +
+ +
{% endblock %} diff --git a/themes/bear/templates/header.html b/themes/bear/templates/header.html index 90d5a7e..d08ea29 100644 --- a/themes/bear/templates/header.html +++ b/themes/bear/templates/header.html @@ -1,3 +1,4 @@ +

diff --git a/themes/bear/templates/page.html b/themes/bear/templates/page.html index 89de955..996f229 100644 --- a/themes/bear/templates/page.html +++ b/themes/bear/templates/page.html @@ -15,7 +15,7 @@

{%- endif %} {%- endif %} -
+
{{ page.content | safe }}

diff --git a/themes/bear/templates/section.html b/themes/bear/templates/section.html index e596ffb..838e001 100644 --- a/themes/bear/templates/section.html +++ b/themes/bear/templates/section.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block main %} -

+
{%- if taxonomy.term %}

Filtering for "{{ section.title }}"

diff --git a/themes/bear/templates/style.html b/themes/bear/templates/style.html index b242914..9015890 100644 --- a/themes/bear/templates/style.html +++ b/themes/bear/templates/style.html @@ -12,6 +12,15 @@ color: #444; } + .skip { + position: absolute; + top: -3em; + background: #fff; + } + .skip:focus { + top: 0; + } + h1, h2, h3, diff --git a/themes/bear/templates/taxonomy_list.html b/themes/bear/templates/taxonomy_list.html index 69d9fa2..abf4294 100644 --- a/themes/bear/templates/taxonomy_list.html +++ b/themes/bear/templates/taxonomy_list.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block main %} -
+
{% set tags = get_taxonomy(kind="tags") %} diff --git a/themes/bear/templates/taxonomy_single.html b/themes/bear/templates/taxonomy_single.html index c252440..95962a4 100644 --- a/themes/bear/templates/taxonomy_single.html +++ b/themes/bear/templates/taxonomy_single.html @@ -6,7 +6,7 @@ {%- endblock -%} {% block main %} -
+
{%- if taxonomy.term %}

Filtering for "{{ term.name }}"

-- cgit 1.4.1