Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/surajmandalcell/potato-dark.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/menu.html')
-rw-r--r--layouts/partials/menu.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
new file mode 100644
index 0000000..5707fbe
--- /dev/null
+++ b/layouts/partials/menu.html
@@ -0,0 +1,24 @@
+{{ if .Site.Menus.main }}
+<nav class="l-nav p-menu">
+ <ul class="p-menu__lists">
+ {{ range .Site.Menus.main.ByWeight }}
+ {{ if .HasChildren }}
+ <li class="p-menu__listitem p-menu__parent">
+ <span>{{ .Name }}</span>
+ <ul>
+ {{ range .Children }}
+ <li class="p-menu__listitem p-menu__child"><a href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+ </li>
+ {{ else }}
+ <li class="p-menu__listitem">
+ <a href="{{ .URL }}">
+ {{- .Name -}}
+ </a>
+ </li>
+ {{ end }}
+ {{ end }}
+ </ul>
+</nav>
+{{ end }}