Fully working for old versions without i18n
This commit is contained in:
parent
e9af2f70d2
commit
10707b361e
3 changed files with 38 additions and 1 deletions
|
@ -13,6 +13,16 @@
|
|||
{{ end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ else if .Site.Data.sections }}
|
||||
<ul>
|
||||
{{- range sort .Site.Data.sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar)}}
|
||||
<li class="nav-item">
|
||||
<a class="smooth-scroll" href="/#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{ if .Site.Params.logo.inverted }}
|
||||
{{ $invertedLogo = .Site.Params.logo.inverted }}
|
||||
{{ end }}
|
||||
<a class="navbar-brand" href="{{ .Site.BaseURL }}/{{ .Site.Language.Lang }}">
|
||||
<a class="navbar-brand" href="{{ .Site.BaseURL }}{{ if .IsTranslated }}/{{ .Site.Language.Lang }}{{end}}">
|
||||
<img src="{{ $invertedLogo }}" id="logo">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
|
@ -35,6 +35,14 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ else if .Site.Data.sections }}
|
||||
{{ range sort .Site.Data.sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar)}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ $hasCustomMenus:= false }}
|
||||
{{ if and site.Params.customMenus }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue