fix some defaults and formatting

This commit is contained in:
Robert Kaussow 2020-02-05 09:40:05 +01:00
parent f2e64a6864
commit c93dafdece
2 changed files with 8 additions and 8 deletions

View File

@ -44,7 +44,7 @@
<div class="gdoc-page__footer flex flex-wrap justify-between">
{{ $showPrevNext := (and (not .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
{{ $showPrevNext := (and (default true .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
{{ if $showPrevNext }}
<span>
{{ with ($current.Scratch.Get "prevPage") }}

View File

@ -6,20 +6,20 @@
{{ $.Scratch.Set "geekdocFilePath" false }}
{{ end }}
{{define "breadcrumb"}}
{{ define "breadcrumb" }}
{{$parent := .page.Parent }}
{{ if $parent }}
{{ $value := (printf "<a href='%s'>%s</a> / %s" $parent.RelPermalink $parent.Title .value) }}
{{ template "breadcrumb" dict "page" $parent "value" $value }}
{{else}}
{{.value|safeHTML}}
{{end}}
{{end}}
{{ else }}
{{ .value | safeHTML }}
{{ end }}
{{ end }}
<div class="gdoc-page__header flex flex-wrap justify-between{{ if not $geekdocRepo }} hidden-mobile{{ end }}" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
{{$showBreadcrumb := (and (not .Page.Params.geekdocBreadcrumb) (not .Site.Params.geekdocBreadcrumb))}}
{{ $showBreadcrumb := (and (default true .Page.Params.geekdocBreadcrumb) (default true .Site.Params.geekdocBreadcrumb)) }}
<span>
{{if $showBreadcrumb}}
{{if $showBreadcrumb }}
<span class="breadcrumb">
<svg class="icon path"><use xlink:href="#path"></use></svg>
{{ $name := (partial "title" .) }}