hackertours/layouts/_partials/mobilemenu.html
Stefan Bethke 5c1b60fa3a
All checks were successful
/ build (pull_request) Successful in 32s
/ cleanup-staging (pull_request) Successful in 3s
Upgrade to Hugo 0.16x and zen theme v7.1.0
- Bump themes/zen from v5.7.0 to v7.1.0 (vanilla CSS, no libsass).
- Move layouts to Hugo's new template structure (_default -> root,
  index.html -> home.html, shortcodes -> _shortcodes).
- Replace deprecated language API in templates (Locale, Direction, Name)
  and sync base templates and mobile menu with theme v7.
- Config: languageName/languageCode -> label/locale; move copyright to
  the top-level key the v7 footer reads.
- Port _custom.scss to assets/css/_custom.css and map page/body
  backgrounds to v7's --color-body-bg/--color-page-bg.
- CI: build with hugomods/hugo:0.165.0.
2026-10-16 15:07:25 +02:00

22 lines
1.2 KiB
HTML

<div class="mobile-nav" dir="ltr" hidden>
<div class="mobile-nav__cover"></div>
<button class="mobile-nav__toggle button{{ if $.Param "mobilemenuoutline" }} button--outline{{ end }}" aria-expanded="false" aria-controls="sheet">
{{ i18n "menu_mobile" }}
<svg class="mobile-nav__hamburger" viewBox="0 0 100 100" focusable="false" aria-hidden="true">
<rect width="80" height="12" x="10" y="20" rx="5"></rect>
<rect width="80" height="12" x="10" y="45" rx="5"></rect>
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
</svg>
</button>
<div class="mobile-nav__sheet link-nav" id="sheet" data-theme="dark" aria-hidden="true">
<div class="mobile-nav__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
<ul class="mobile-nav__navbar">
{{ $currentPage := . -}}
{{ range site.Menus.main -}}
<li><a href="{{ .URL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} aria-current="page"{{ end }}>{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}</a></li>
{{ end -}}
</ul>
</nav>
</div>
</div>