Skip to content

Commit 6a53f43

Browse files
committed
refactor: Move menu partial into header partial
1 parent 45f04b6 commit 6a53f43

File tree

2 files changed

+60
-61
lines changed

2 files changed

+60
-61
lines changed

layouts/partials/header.html

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
{{ partial "menu" (dict "menuID" "main" "page" .) }}
1+
2+
{{ $logo := resources.Get "images/logo.svg" }}
3+
<div class="o-container o-header__wrapper">
4+
<a id="skip-link" class="o-header__skip-link" href="#content">{{ T "skipToContent" }}</a>
5+
<a href="/" aria-label="{{ T "home-page-text" }}" class="o-header__logo">
6+
<img aria-hidden="true" src="{{ $logo.RelPermalink }}" alt="">
7+
</a>
8+
<div class="o-header__curtain"></div>
9+
<div class="o-header__nav o-container">
10+
<li class="o-header__item a-theme-toggle--mobile">
11+
{{ partial "theme-toggle" }}
12+
</li>
13+
<button class="o-nav__menu-button" title="Menü öffnen" aria-expanded="false" aria-haspopup="true">
14+
<span>{{ T "menu-open" }}</span>
15+
{{ partial "icon" "menu" }}
16+
</button>
17+
<nav>
18+
<button class="o-nav__close-button" title="Menü schließen">
19+
<span>{{ T "menu-close" }}</span>
20+
{{ partial "icon" "close" }}
21+
</button>
22+
<menu>
23+
<li class="o-header__item">
24+
<button class="o-header__expand-button" aria-haspopup="true" aria-expanded="false">
25+
<span>{{ T "countries.selection" }}</span>
26+
{{ partial "icon" "keyboard_arrow_down" }}
27+
</button>
28+
<span id="menu-country-list-title">{{ T "country" }}</span>
29+
<menu class="o-header__item-countries" aria-describedby="menu-country-list-title">
30+
{{ range where site.RegularPages "Section" "country"}}
31+
<li class="o-header__item">
32+
<a href="{{ .Permalink }}">{{ .Title }}</a>
33+
</li>
34+
{{ end }}
35+
</menu>
36+
</li>
37+
<li class="o-header__item">
38+
<span id="menu-general-list-title">{{ T "general" }}</span>
39+
<ul aria-describedby="menu-general-list-title">
40+
<li class="o-header__item a-theme-toggle--desktop">
41+
{{ partial "theme-toggle" }}
42+
</li>
43+
{{ $news := site.GetPage "news" }}
44+
{{ if $news }}
45+
<li class="o-header__item">
46+
<a href="{{ $news.RelPermalink }}">{{ $news.Title }}</a>
47+
</li>
48+
{{ end }}
49+
{{ $informationPage := site.GetPage "generalInformation" }}
50+
{{ if $informationPage }}
51+
<li class="o-header__item">
52+
<a href="{{ $informationPage.RelPermalink }}">{{ $informationPage.Title }}</a>
53+
</li>
54+
{{ end }}
55+
</ul>
56+
</li>
57+
</menu>
58+
</nav>
59+
</div>
60+
</div>

layouts/partials/menu.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)