initial commit
This commit is contained in:
commit
b710cfda80
98 changed files with 9669 additions and 0 deletions
60
layouts/partials/page-footer.html
Normal file
60
layouts/partials/page-footer.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
{{ $current := . }}
|
||||
{{ $site := .Site }}
|
||||
{{ $current.Scratch.Set "prev" false }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
|
||||
{{ $current.Scratch.Set "nextPage" false }}
|
||||
{{ $current.Scratch.Set "prevPage" false }}
|
||||
|
||||
{{ template "menu_nextprev" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
|
||||
|
||||
{{ define "menu_nextprev" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
{{ range sort (default (seq 0) .sect) "weight" "desc" }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
|
||||
{{ $ref := default false .ref }}
|
||||
{{ if $ref}}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := $site.GetPage .ref }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
|
||||
{{ if $current.Scratch.Get "getNext" }}
|
||||
{{ $current.Scratch.Set "nextPage" $this }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $current $this }}
|
||||
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
|
||||
{{ $current.Scratch.Set "getNext" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ $current.Scratch.Set "prev" $this }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="gdoc-page__footer flex justify-between">
|
||||
{{ $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev) .Site.Params.GeekdocMenuBundle) }}
|
||||
{{ if $showPrevNext }}
|
||||
<span>
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a class="gdoc-page__nav--prev" href="{{.RelPermalink}}" title="{{.Title}}"> {{ .Name }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span>
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a class="gdoc-page__nav-next" href="{{.RelPermalink}}" title="{{.Title}}">{{ .Name }} </a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue