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">
|
<h1 class="site-title">
|
||||||
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
<nav>
|
{{ if .Site.Menus.main }}
|
||||||
|
<nav>
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
{{ else }}
|
||||||
|
<nav></nav>
|
||||||
|
{{ end }}
|
||||||
|
@ -473,7 +473,7 @@ ul.language-select > li {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header nav {
|
header nav:not(:empty){
|
||||||
background: var(--pagination-bg-color);
|
background: var(--pagination-bg-color);
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
Loading…
Reference in New Issue
Block a user