Skip to content

Commit 70313c2

Browse files
committed
update: nav.njk — implementation of skipTo section
1 parent 1e3139b commit 70313c2

File tree

1 file changed

+40
-18
lines changed

1 file changed

+40
-18
lines changed

src/_includes/components/nav.njk

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<nav class="nav t-all">
2+
<div class="nav-skip">
3+
<a class="nav-skipto" href="#main">Skip to Main</a>
4+
</div>
25
<div class="nav-container">
36
<div class="leftside">
4-
<a class="nav-skipto" href="#main">Skip to Main</a>
5-
<a class="brand" aria-labelledby="emptywork-logo-text" href="{{ link.website | development }}">
7+
<a class="brand"
8+
aria-labelledby="emptywork-logo-text"
9+
href="{{ link.website | development }}">
610
<div class="brand-logo">
711
{{ footer.brand.svg | svg | safe }}
812
<span aria-hidden="true" id="emptywork-logo-text" class="sr-only">Logo of EmptyWork</span>
@@ -22,41 +26,59 @@
2226
</ul>
2327
<div class="rightside">
2428
<button class="themes" aria-label="Switch the theme" data-theme-button>
25-
<svg data-sun fill="none" style="margin-bottom: -0.0625rem" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-label="Icon of sun">
26-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
29+
<svg data-sun
30+
fill="none"
31+
style="margin-bottom: -0.0625rem"
32+
stroke="currentColor"
33+
viewBox="0 0 24 24"
34+
xmlns="http://www.w3.org/2000/svg"
35+
aria-label="Icon of sun">
36+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z">
37+
</path>
2738
</svg>
28-
<svg data-moon fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-label="Icon of moon">
39+
<svg data-moon
40+
fill="currentColor"
41+
viewBox="0 0 20 20"
42+
xmlns="http://www.w3.org/2000/svg"
43+
aria-label="Icon of moon">
2944
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
3045
</svg>
3146
</button>
32-
<button aria-label="Open the mobile menu" aria-haspopup="true" aria-controls="mobile-menu-list" class="nav-mobile nav-mobile__tick" data-mobile-menu-button>
33-
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-label="Icon for menu hamburger">
47+
<button aria-label="Open the mobile menu"
48+
aria-haspopup="true"
49+
aria-controls="mobile-menu-list"
50+
class="nav-mobile nav-mobile__tick"
51+
data-mobile-menu-button>
52+
<svg fill="none"
53+
stroke="currentColor"
54+
viewBox="0 0 24 24"
55+
xmlns="http://www.w3.org/2000/svg"
56+
aria-label="Icon for menu hamburger">
3457
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
3558
</svg>
3659
</button>
3760
</div>
3861
</div>
3962
</nav>
40-
<ul id="mobile-menu-list" class="not-showing nav-mobile__section t-all" data-mobile-menu-section aria-label="List of mobile menu" role="menu">
63+
<ul id="mobile-menu-list"
64+
class="not-showing nav-mobile__section t-all"
65+
data-mobile-menu-section
66+
aria-label="List of mobile menu"
67+
aria-hidden="true"
68+
role="menu">
4169
<li data-mobile-menu-button role="menuitem">
4270
<a href="/">
43-
<div>
44-
Home
45-
</div>
71+
<div>Home</div>
4672
</a>
4773
</li>
4874
<li data-mobile-menu-button role="menuitem">
4975
<a href="/blog">
50-
<div>
51-
Blog
52-
</div>
76+
<div>Blog</div>
5377
</a>
5478
</li>
5579
<li data-mobile-menu-button role="menuitem">
5680
<a href="/contact">
57-
<div>
58-
Contact
59-
</div>
81+
<div>Contact</div>
6082
</a>
6183
</li>
62-
</ul>
84+
</ul>

0 commit comments

Comments
 (0)