From 1fccceee9be1790849c2852d4742e2c41b4157b2 Mon Sep 17 00:00:00 2001
From: a
Date: Wed, 16 Oct 2024 02:34:56 -0500
Subject: [PATCH] WIP: add skip links
---
.../assets/styles/layouts/_default/list.scss | 28 +++++++++++++++++++
.../styles/layouts/_default/single.scss | 27 ++++++++++++++++++
.../layouts/_default/baseof.html | 2 +-
unified.test.hugo/layouts/_default/list.html | 6 +++-
.../layouts/_default/single.html | 3 ++
.../layouts/partials/mf2/h-card.html | 2 ++
6 files changed, 66 insertions(+), 2 deletions(-)
diff --git a/unified.test.hugo/assets/styles/layouts/_default/list.scss b/unified.test.hugo/assets/styles/layouts/_default/list.scss
index 0ad185c..bcbba52 100644
--- a/unified.test.hugo/assets/styles/layouts/_default/list.scss
+++ b/unified.test.hugo/assets/styles/layouts/_default/list.scss
@@ -1,4 +1,32 @@
+@import "../../mixins/shadow.scss";
+
.layout-_default-list {
+ .skip-to-items {
+ position: absolute;
+ inset-block-start: -5em;
+ inset-inline-start: 1em;
+ transition: all 0.25s ease-in;
+ background: var(--ui-overlay);
+ color: var(--ui-overlay-text);
+ padding: 1em;
+ @include shadow-low;
+ &:focus {
+ inset-block-start: 1em;
+ }
+ }
+ .back-to-top {
+ position: absolute;
+ inset-block-end: 1em;
+ inset-inline-start: -10em;
+ transition: all 0.25s ease-in;
+ background: var(--ui-overlay);
+ color: var(--ui-overlay-text);
+ padding: 1em;
+ @include shadow-low;
+ &:focus {
+ inset-inline-start: 1em;
+ }
+ }
.list-header {
hr {display: none;}
.container {
diff --git a/unified.test.hugo/assets/styles/layouts/_default/single.scss b/unified.test.hugo/assets/styles/layouts/_default/single.scss
index 6475dfa..4080e24 100644
--- a/unified.test.hugo/assets/styles/layouts/_default/single.scss
+++ b/unified.test.hugo/assets/styles/layouts/_default/single.scss
@@ -1,6 +1,33 @@
@import "../../mixins/shadow.scss";
.layout-_default-single {
+ position: relative;
+ .skip-to-end-of-header {
+ position: absolute;
+ inset-block-start: -5em;
+ inset-inline-start: 1em;
+ transition: 0.25s all ease-in;
+ background: var(--ui-overlay);
+ color: var(--ui-overlay-text);
+ padding: 1em;
+ @include shadow-low;
+ &:focus {
+ inset-block-start: 1em;
+ }
+ }
+ .back-to-top {
+ position: absolute;
+ inset-block-end: 1em;
+ inset-inline-start: -10em;
+ transition: 0.25s all ease-in;
+ background: var(--ui-overlay);
+ color: var(--ui-overlay-text);
+ padding: 1em;
+ @include shadow-low;
+ &:focus {
+ inset-inline-start: 1em;
+ }
+ }
.page-header {
hr {display: none;}
.container {
diff --git a/unified.test.hugo/layouts/_default/baseof.html b/unified.test.hugo/layouts/_default/baseof.html
index 59b8a0e..a6f0420 100644
--- a/unified.test.hugo/layouts/_default/baseof.html
+++ b/unified.test.hugo/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
-
+
{{- /* TODO: more precise type detection */}}
{{- $itemtype := "https://schema.org/WebPage"}}
{{- if isset .Params "date" }}
diff --git a/unified.test.hugo/layouts/_default/list.html b/unified.test.hugo/layouts/_default/list.html
index 0cc5bd9..64e1943 100644
--- a/unified.test.hugo/layouts/_default/list.html
+++ b/unified.test.hugo/layouts/_default/list.html
@@ -14,6 +14,7 @@
h-feed URL: {{.Permalink}}
{{- with .AlternativeOutputFormats }}h-entry URL: {{.}}
{{- end }} @@ -64,6 +65,7 @@ {{ end }} */}}