Skip to content

Commit

Permalink
adds better accesssible jumps on page load
Browse files Browse the repository at this point in the history
  • Loading branch information
edelstone committed Sep 22, 2024
1 parent 8db9701 commit 498ce1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<header class="header">
<div class="preface">
{% if main %}
<a href="#color-values" class="offscreen">Jump to the form</a>
{% else %}
<a href="#main" class="offscreen">Jump to main content</a>
{% endif %}
<div class="dark-mode-selector">
<label for="darkmode-toggle" class="switch" tabindex="0">
<input id="darkmode-toggle" class="darkmode-toggle" type="checkbox" tabindex="-1">
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<body>
{% include "header.html" %}
<main class="main {% if docs %}docs{% endif %}">
<main id="main" class="main {% if docs %}docs{% endif %}">
{{ content | safe }}
</main>
{% include "footer.html" %}
Expand Down

0 comments on commit 498ce1c

Please sign in to comment.