Merge pull request #60 from bhamill638/updating-nav-bar
Having no menu items in config results in empty nav bar with a different background colour on small screens
This commit is contained in:
commit
95e5785c72
@ -1,9 +1,13 @@
|
||||
<h1 class="site-title">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
<nav>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ if .Site.Menus.main }}
|
||||
<nav>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ else }}
|
||||
<nav></nav>
|
||||
{{ end }}
|
||||
|
@ -473,7 +473,7 @@ ul.language-select > li {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header nav {
|
||||
header nav:not(:empty){
|
||||
background: var(--pagination-bg-color);
|
||||
margin-top: 1em;
|
||||
max-width: 100%;
|
||||
|
Loading…
Reference in New Issue
Block a user