Fix navbar issue when no section is configured + fix next-prev navigator

This commit is contained in:
hossainemruz 2020-06-30 00:38:40 +06:00
parent 9a95163b7d
commit b783f11318
2 changed files with 12 additions and 10 deletions

View file

@ -19,12 +19,14 @@
<li class="nav-item">
<a class="nav-link smooth-scroll" href="#home">Home</a>
</li>
{{- range sort .Site.Data.sections "section.weight" }}
{{ if .section.showOnNavbar }}
<li class="nav-item">
<a class="nav-link smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
</li>
{{ end }}
{{- if .Site.Data.sections }}
{{- range sort .Site.Data.sections "section.weight" }}
{{ if .section.showOnNavbar }}
<li class="nav-item">
<a class="nav-link smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
</li>
{{ end }}
{{- end }}
{{- end }}
{{ $hasCustomMenus:= false }}
{{ if and site.Params.customMenus }}