From afebeba99d57247abee53a6857f586ed964edee4 Mon Sep 17 00:00:00 2001 From: 2kool4idkwhat <120322313+2kool4idkwhat@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:17:10 +0200 Subject: [PATCH] a11y: add skipnav link --- assets/style.css | 15 +++++++++++++++ layouts/_default/baseof.html | 2 +- layouts/partials/header.html | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/assets/style.css b/assets/style.css index 3b90566..c36c7e1 100644 --- a/assets/style.css +++ b/assets/style.css @@ -145,3 +145,18 @@ h3.blog-filter { cursor: not-allowed; opacity: 0.7; } + +/* "skip to main content" link */ +.skiplink { + position: absolute; + top: 5; + transform: translateY(-600%); + transition: transform 0.5s; + background-color: #121212; + font-size: larger; + padding: 6px; +} + +.skiplink:focus { + transform: translateY(0%); +} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7aa0605..06d71c3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -36,7 +36,7 @@
{{- partial "header.html" . -}}
-
+
{{- block "main" . }}{{- end }}