1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 09:02:18 +01:00

Added 'header_visible' parameter to allow switching off the header.

This commit is contained in:
Cosmin Humeniuc 2018-08-25 18:11:15 +03:00
parent 2981031e4f
commit aab50230aa
No known key found for this signature in database
GPG Key ID: 097BA5071395C7EE
2 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,9 @@ paginate = 5
# Description/subtitle for homepage (can be Markdown) # Description/subtitle for homepage (can be Markdown)
description = "A simple Hugo theme based on the Bootstrap v4 blog example." description = "A simple Hugo theme based on the Bootstrap v4 blog example."
# Show header (default: true)
#header_visible = true
# Format dates with Go's time formatting # Format dates with Go's time formatting
date_format = "Mon Jan 02, 2006" date_format = "Mon Jan 02, 2006"

View File

@ -47,6 +47,7 @@
{{ end }} {{ end }}
{{ block "header" . }} {{ block "header" . }}
{{ if (ne ($.Param "header_visible") false) }}
<header class="blog-header"> <header class="blog-header">
<div class="container"> <div class="container">
<h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1> <h1 class="blog-title"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
@ -54,6 +55,7 @@
</div> </div>
</header> </header>
{{ end }} {{ end }}
{{ end }}
{{ block "body" . }} {{ block "body" . }}
<div class="container"> <div class="container">