navbar: Hide mobile toggle button if there are no menu items (#307)

This commit is contained in:
George Cushen 2017-10-13 23:20:17 +01:00
commit 25baf85bca

View file

@ -3,6 +3,7 @@
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
{{ if or .Site.Menus.main .IsTranslated }}
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target=".navbar-collapse" aria-expanded="false">
<span class="sr-only">{{ i18n "toggle_navigation" }}</span>
@ -10,6 +11,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{{ end }}
<a class="navbar-brand" href="{{ "/" | relLangURL }}">{{ .Site.Title }}</a>
</div>