mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-17 17:57:04 +01:00
layouts/_default/baseof.html: Don't create whitespace
Cleans up some template logic so that extra, unnecessary whitespace isn't created during site generation.
This commit is contained in:
parent
77671af35d
commit
e7749e9bde
@ -35,16 +35,16 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<nav class="nav blog-nav">
|
<nav class="nav blog-nav">
|
||||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
||||||
{{ $currentURL := .URL | absLangURL }}
|
{{- $currentURL := .URL | absLangURL -}}
|
||||||
{{ if .Site.Params.custom_navbar }}
|
{{ if .Site.Params.custom_navbar }}
|
||||||
{{ range .Site.Menus.navbar }}
|
{{ range .Site.Menus.navbar }}
|
||||||
{{ $menuURL := .URL | absLangURL }}
|
{{ $menuURL := .URL | absLangURL }}
|
||||||
<a class="nav-link {{ if eq $menuURL $currentURL }}active{{ end }}" href="{{.URL | absURL }}">{{ .Name }}</a>
|
<a class="nav-link{{ if eq $menuURL $currentURL }} active{{ end }}" href="{{.URL | absURL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ range where .Site.RegularPages "Type" "!=" "post" }}
|
{{ range where .Site.RegularPages "Type" "!=" "post" }}
|
||||||
{{ $permalinkURL := .Permalink | absLangURL }}
|
{{ $permalinkURL := .Permalink | absLangURL }}
|
||||||
<a class="nav-link {{ if eq $permalinkURL $currentURL }}active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a>
|
<a class="nav-link{{ if eq $permalinkURL $currentURL }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
Loading…
Reference in New Issue
Block a user