This commit is contained in:
panr 2019-02-01 15:53:23 +01:00
parent 8402237a8d
commit ab9bb3b3fb
2 changed files with 6 additions and 4 deletions

View file

@ -8,6 +8,7 @@ paginate = 5
contentTypeName = "post" contentTypeName = "post"
# "light" or "dark" # "light" or "dark"
defaultTheme = "dark" defaultTheme = "dark"
showMenuItems = 2
[languages] [languages]
[languages.en] [languages.en]
@ -15,6 +16,7 @@ paginate = 5
subtitle = "A simple theme for Hugo" subtitle = "A simple theme for Hugo"
keywords = "" keywords = ""
copyright = "" copyright = ""
menuMore = "Show more"
writtenBy = "Written by" writtenBy = "Written by"
readMore = "Read more" readMore = "Read more"
readOtherPosts = "Read other posts" readOtherPosts = "Read other posts"

View file

@ -6,8 +6,8 @@
<li><a href="{{ .URL }}">{{ .Name }}</a></li> <li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
<ul class="menu__sub-inner"> {{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }} <ul class="menu__sub-inner">
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} <span class="menu__sub-inner-more-trigger-icon">></span></li> <li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} <span class="menu__sub-inner-more-trigger-icon">></span></li>
<ul class="menu__sub-inner-more hidden"> <ul class="menu__sub-inner-more hidden">
@ -17,8 +17,8 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>
{{ end }} </ul>
</ul> {{ end }}
{{ else }} {{ else }}
{{ range $.Site.Menus.main }} {{ range $.Site.Menus.main }}
{{ if not .HasChildren }} {{ if not .HasChildren }}