feat: let a specific page have no navbar

```
header:
  navbar:
    enable: false
 ```
This commit is contained in:
George Cushen committed 2022-01-19 22:30:30 +00:00
1 parent 61ce4e59a3
commit 6d6b4b4c83
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
{{ partial "site_head" . }}
{{ $show_navbar := site.Params.header.navbar.enable | default true }}
{{ $show_navbar := ((site.Params.header.navbar.enable | default true) | and (ne .Params.header.navbar.enable false)) | or .Params.header.navbar.enable }}
{{- $highlight_active_link := site.Params.header.navbar.highlight_active_link | default true -}}
<body id="top" data-spy="scroll" {{ if $show_navbar }}data-offset="70"{{end}} data-target="{{ if or .IsHome (eq .Type "widget_page") | and $highlight_active_link }}#navbar-main{{else}}#TableOfContents{{end}}" class="page-wrapper {{with .Params.design.css_class}}{{.}}{{end}} {{ if not (.Scratch.Get "light") }}dark{{end}} {{ if not $show_navbar }}no-navbar{{end}}" {{with .File}}data-wc-page-id="{{.File.UniqueID}}"{{end}} {{with .Params.design.css_style}}style="{{. | safeCSS}}"{{end}}>
+1 -1
View File
@@ -1,4 +1,4 @@
{{ $show_navbar := site.Params.header.navbar.enable | default true }}
{{ $show_navbar := ((site.Params.header.navbar.enable | default true) | and (ne .Params.header.navbar.enable false)) | or .Params.header.navbar.enable }}
{{ if $show_navbar }}
{{ $current_page := . }}