forked from tsc-vfl/hugo-page
Create basic structure for mobile menu in HTML DOM
This commit is contained in:
parent
1ab1a7b084
commit
f477fa5450
@ -17,6 +17,10 @@
|
||||
{{- block "main" . -}}{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-menu">
|
||||
<a id="mobile-menu"></a>
|
||||
{{- partial "page/mobile-menu" . -}}
|
||||
</div>
|
||||
{{- partial "page/footer.html" . -}}
|
||||
</div>
|
||||
<div id="overlay" class="hidden">
|
||||
|
@ -42,4 +42,5 @@
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
<a class="mobile-menu-link" href="#mobile-menu">Menu</a>
|
||||
</div>
|
||||
|
6
themes/tsc_vfl/layouts/partials/page/mobile-menu.html
Normal file
6
themes/tsc_vfl/layouts/partials/page/mobile-menu.html
Normal file
@ -0,0 +1,6 @@
|
||||
{{ range .Site.Menus.main }}
|
||||
<div class="level-1"><a href="{{ .URL }}" class="menu-link{{ if $.IsMenuCurrent "main" . }} active{{ end }}">{{ .Title }}</a></div>
|
||||
{{ range .Children }}
|
||||
<div class="level-2"><a href="{{ .URL }}" class="menu-link{{ if $.IsMenuCurrent "main" .}} active{{ end}}">{{ .Title }}</a></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in New Issue
Block a user