mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-31 08:57:15 +00:00
More compatibility issues
This commit is contained in:
parent
38301a171f
commit
329d426d86
2 changed files with 8 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ with (index (index .Site.Sections .Section) 0) }}
|
{{ with (index (index .Site.Sections .Section) 0) }}
|
||||||
{{ .Page.Content }}
|
{{ .Page.Content }}
|
||||||
|
{{ $.Scratch.Set "uniqueId" .Page.UniqueID }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ if $.Site.Params.autoNav }}
|
||||||
{{ $.Scratch.Set "_sectionpages" (slice) }}
|
{{ $.Scratch.Set "_sectionpages" (slice) }}
|
||||||
{{ if $.Site.Params.menu }}
|
{{ if $.Site.Params.menu }}
|
||||||
{{ range $sname := $.Site.Params.menu }}
|
{{ range $sname := $.Site.Params.menu }}
|
||||||
|
@ -26,11 +27,14 @@
|
||||||
{{ $.Scratch.Add "_allpages" .Page }}
|
{{ $.Scratch.Add "_allpages" .Page }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $allpages := $.Scratch.Get "_allpages" }}
|
{{ end }}
|
||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
|
{{ if $.Site.Params.autoNav }}
|
||||||
|
{{ $allpages := $.Scratch.Get "_allpages" }}
|
||||||
{{ range $index, $element := $allpages }}
|
{{ range $index, $element := $allpages }}
|
||||||
{{if eq $element.UniqueID $.UniqueID }}
|
{{ $uniqueid := ($.Scratch.Get "uniqueId" | default $.UniqueID ) }}
|
||||||
|
{{if eq $element.UniqueID $uniqueid }}
|
||||||
{{ if not (isset $.Params "prev") }}
|
{{ if not (isset $.Params "prev") }}
|
||||||
{{ with index $allpages (sub $index 1) }}
|
{{ with index $allpages (sub $index 1) }}
|
||||||
<a class="nav nav-prev" href="{{ $.Site.BaseURL }}{{ .URL }}"> <i class="fa fa-chevron-left"></i></a>
|
<a class="nav nav-prev" href="{{ $.Site.BaseURL }}{{ .URL }}"> <i class="fa fa-chevron-left"></i></a>
|
||||||
|
@ -43,6 +47,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ with .Params.prev }}<a class="nav nav-prev" href="{{ $.Site.BaseURL }}{{ . }}"> <i class="fa fa-chevron-left"></i></a>{{ end }}
|
{{ with .Params.prev }}<a class="nav nav-prev" href="{{ $.Site.BaseURL }}{{ . }}"> <i class="fa fa-chevron-left"></i></a>{{ end }}
|
||||||
{{ with .Params.next }}<a class="nav nav-next" href="{{ $.Site.BaseURL }}{{ . }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>{{ end }}
|
{{ with .Params.next }}<a class="nav nav-next" href="{{ $.Site.BaseURL }}{{ . }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue