Some adjustments for a newer hugo verion

main
Thomas Ba. 6 years ago
parent 956531f936
commit 819c447fe7

@ -52,8 +52,10 @@
<a href="mailto:{{ $.Site.Params.email }}"><i class="far fa-envelope-open pr-1" aria-hidden="true"></i></a>
{{ end }}
{{ if and $.Site.Params.include_rss $.RSSLink }}
<a href="{{ $.RSSLink }}"><i class="fas fa-rss pr-1" aria-hidden="true"></i></a>
{{ with .OutputFormats.Get "RSS" }}
{{ if and $.Site.Params.include_rss .RelPermalink }}
<a href="{{ .RelPermalink }}"><i class="fas fa-rss pr-1" aria-hidden="true"></i></a>
{{ end }}
{{ end }}
</div>
@ -74,7 +76,7 @@
<!-- Post list -->
<!-- <div class="pt-5 px-5 mx-5"> -->
<div class="col-md-9 mt-3">
{{ $totalpostscount := len (.Data.Pages) }}
{{ $totalpostscount := len (.Site.RegularPages) }}
{{ $latestpostscount := .Site.Params.latestpostscount | default $totalpostscount }}
{{ if gt $latestpostscount 0 }}
<!-- <div class='post-heading'>
@ -84,9 +86,9 @@
<p>
Die letzten Änderungen:
</p>
{{ range (first $latestpostscount .Data.Pages.ByPublishDate.Reverse ) }}
{{ range (first $latestpostscount .Site.RegularPages.ByPublishDate.Reverse ) }}
<div>
<h3><a href="{{ .Permalink }}">{{ .Parent.Title }} <i class="fas fa-angle-right"></i> {{ .Title }}</a></h3>
<h3><a href="{{ .Permalink }}">{{ with .Site.GetPage "section" .Section }}{{ .Title }}{{ end }} <i class="fas fa-angle-right"></i> {{ .Title }}</a></h3>
<p class="meta">
{{ if ne .Params.tags nil }}
Gepostet am {{ .Date.Format "2. January 2006" }} in:

@ -46,9 +46,11 @@
<a href="mailto:{{ $.Site.Params.email }}"><i class="far fa-envelope-open mr-3" aria-hidden="true"></i></a>
{{ end }}
{{ if and $.Site.Params.include_rss $.RSSLink }}
<a href="{{ $.RSSLink }}"><i class="fas fa-rss mr-3" aria-hidden="true"></i></a>
{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ if and $.Site.Params.include_rss .RelPermalink }}
<a href="{{ .RelPermalink }}"><i class="fas fa-rss mr-3" aria-hidden="true"></i></a>
{{ end }}
{{ end }}
{{ if and $.Site.Params.i18n_flags $.IsTranslated }}
{{ range .Translations }}

@ -1,4 +1,4 @@
{{ $url := .URL }}
{{ $url := .RelPermalink }}
{{ $type := .Type }}
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
@ -18,8 +18,8 @@
<a class="nav-link" href="{{ .Site.BaseURL }}">Home{{ if eq $url "/" }} <span class="sr-only">(current)</span>{{ end }}</a>
</li>
{{ range .Site.Menus.main }}
<li class="nav-item {{ if eq $type (substr .URL 1 -1) }} active {{ end }}">
<a class="nav-link" href="{{ .URL | absURL }}" >{{ .Name }} {{ if eq $type (substr .URL 1 -1) }} <span class="sr-only">(current)</span>{{ end }} </a>
<li class="nav-item {{ if eq $type (substr .URL 0 -1) }} active {{ end }}">
<a class="nav-link" href="{{ .URL | absURL }}" >{{ .Name }} {{ if eq $type (substr .URL 0 -1) }} <span class="sr-only">(current)</span>{{ end }} </a>
</li>
{{ end }}

Loading…
Cancel
Save