summaryrefslogtreecommitdiff
path: root/themes/terminal/layouts/partials/menu.html
diff options
context:
space:
mode:
authorIndrajith K L2022-03-20 00:38:25 +0530
committerIndrajith K L2022-03-20 00:38:25 +0530
commit941642aee876a97dbb79666d8fabaa2b1feb9ff5 (patch)
tree6147d3027127466b312eaa0b34c75966743bf547 /themes/terminal/layouts/partials/menu.html
parent31fc0796a09e1c0b8acbee6ac2fbee17d525b528 (diff)
downloadexperimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.gz
experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.bz2
experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.zip
Theme changes
Diffstat (limited to 'themes/terminal/layouts/partials/menu.html')
-rw-r--r--themes/terminal/layouts/partials/menu.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/themes/terminal/layouts/partials/menu.html b/themes/terminal/layouts/partials/menu.html
new file mode 100644
index 0000000..17d39c8
--- /dev/null
+++ b/themes/terminal/layouts/partials/menu.html
@@ -0,0 +1,60 @@
+<nav class="menu">
+ <ul class="menu__inner menu__inner--desktop">
+ {{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
+ {{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
+ {{ if not .HasChildren }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ {{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
+ <ul class="menu__sub-inner">
+ <li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} ▾</li>
+
+ <ul class="menu__sub-inner-more hidden">
+ {{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
+ {{ if not .HasChildren }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ </ul>
+ {{ end }}
+ {{ else }}
+ {{ range $.Site.Menus.main }}
+ {{ if not .HasChildren }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+
+ {{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
+ <div class="spacer"></div>
+ <ul class="language-selector">
+ <ul class="language-selector-current">
+ <li>{{ .Language.LanguageName }} ▾</li>
+ </ul>
+ <ul class="language-selector__more hidden">
+ {{ range $.Site.Home.AllTranslations }}
+ <li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
+ {{ end }}
+ </ul>
+ </ul>
+ {{ end }}
+ </ul>
+
+ <ul class="menu__inner menu__inner--mobile">
+ {{ range $.Site.Menus.main }}
+ {{ if not .HasChildren }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ {{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
+ <hr />
+ {{ range $.Site.Home.AllTranslations }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
+ </li>
+ {{ end }}
+ {{ end }}
+ </ul>
+</nav>