Skip to content

Commit

Permalink
fix page-header conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Feb 5, 2020
1 parent 4c8c1a9 commit 59d94de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- BUGFIX
- fix default settings for some config parameters
- fix page-header conditions
7 changes: 4 additions & 3 deletions layouts/partials/page-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
{{ 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>
{{if $showBreadcrumb }}
<span class="breadcrumb">
Expand All @@ -28,7 +29,7 @@
{{ end }}
</span>
<span>
{{ if and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath }}
{{ if $showEdit }}
<svg class="icon code"><use xlink:href="#code"></use></svg>
<a href="{{ $geekdocRepo }}/{{ $geekdocEditPath }}/{{ $.Scratch.Get "geekdocFilePath" }}">
Edit this page
Expand Down

0 comments on commit 59d94de

Please sign in to comment.