fix page-header conditions

uci-hugo-doc
Robert Kaussow 2020-02-05 10:13:04 +01:00
parent 4c8c1a915e
commit 59d94de023
2 changed files with 5 additions and 3 deletions

View File

@ -1,2 +1,3 @@
- BUGFIX - BUGFIX
- fix default settings for some config parameters - fix default settings for some config parameters
- fix page-header conditions

View File

@ -16,8 +16,9 @@
{{ end }} {{ end }}
{{ 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 (default true .Page.Params.geekdocBreadcrumb) (default true .Site.Params.geekdocBreadcrumb)) }} {{ $showBreadcrumb := (and (default true .Page.Params.geekdocBreadcrumb) (default true .Site.Params.geekdocBreadcrumb)) }}
{{ $showEdit := (and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath) }}
<div class="gdoc-page__header flex flex-wrap justify-between{{ if not $showEdit }} hidden-mobile{{ end }}{{ if (and (not $showBreadcrumb) (not $showEdit)) }} hidden {{ end }}" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<span> <span>
{{if $showBreadcrumb }} {{if $showBreadcrumb }}
<span class="breadcrumb"> <span class="breadcrumb">
@ -28,7 +29,7 @@
{{ end }} {{ end }}
</span> </span>
<span> <span>
{{ if and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath }} {{ if $showEdit }}
<svg class="icon code"><use xlink:href="#code"></use></svg> <svg class="icon code"><use xlink:href="#code"></use></svg>
<a href="{{ $geekdocRepo }}/{{ $geekdocEditPath }}/{{ $.Scratch.Get "geekdocFilePath" }}"> <a href="{{ $geekdocRepo }}/{{ $geekdocEditPath }}/{{ $.Scratch.Get "geekdocFilePath" }}">
Edit this page Edit this page