mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
Merge pull request #318 from nunocoracao/312-taxonomy-add-hero-image
✨Taxonomy add hero image
This commit is contained in:
commit
f4b5413c05
4 changed files with 18 additions and 8 deletions
|
@ -15,6 +15,8 @@ enableCodeCopy = true
|
||||||
# mainSections = ["section1", "section2"]
|
# mainSections = ["section1", "section2"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
|
#defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
layout = "basic" # valid options: basic, fixed
|
layout = "basic" # valid options: basic, fixed
|
||||||
|
|
||||||
|
@ -85,8 +87,6 @@ enableCodeCopy = true
|
||||||
showTermCount = true
|
showTermCount = true
|
||||||
#showHero = true
|
#showHero = true
|
||||||
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
#layoutBackgroundBlur = true # only used when heroStyle equals background
|
|
||||||
#layoutBackgroundHeaderSpace = false
|
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
#showViews = false
|
#showViews = false
|
||||||
#showLikes = false
|
#showLikes = false
|
||||||
|
@ -96,8 +96,6 @@ enableCodeCopy = true
|
||||||
[term]
|
[term]
|
||||||
#showHero = true
|
#showHero = true
|
||||||
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
#layoutBackgroundBlur = true # only used when heroStyle equals background
|
|
||||||
#layoutBackgroundHeaderSpace = false
|
|
||||||
#showViews = false
|
#showViews = false
|
||||||
#showLikes = false
|
#showLikes = false
|
||||||
#showTableOfContents = true
|
#showTableOfContents = true
|
||||||
|
|
|
@ -15,6 +15,8 @@ enableCodeCopy = true
|
||||||
mainSections = ["docs"]
|
mainSections = ["docs"]
|
||||||
# robots = ""
|
# robots = ""
|
||||||
|
|
||||||
|
defaultBackgroundImage = "/img/iceland.jpg"
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
layout = "fixed" # valid options: basic, fixed
|
layout = "fixed" # valid options: basic, fixed
|
||||||
|
|
||||||
|
@ -84,8 +86,6 @@ mainSections = ["docs"]
|
||||||
showTermCount = true
|
showTermCount = true
|
||||||
showHero = true
|
showHero = true
|
||||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
layoutBackgroundBlur = true # only used when heroStyle equals background
|
|
||||||
layoutBackgroundHeaderSpace = false
|
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showViews = true
|
showViews = true
|
||||||
showLikes = true
|
showLikes = true
|
||||||
|
@ -95,8 +95,6 @@ mainSections = ["docs"]
|
||||||
[term]
|
[term]
|
||||||
showHero = true
|
showHero = true
|
||||||
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
layoutBackgroundBlur = true # only used when heroStyle equals background
|
|
||||||
layoutBackgroundHeaderSpace = false
|
|
||||||
showSummary = false
|
showSummary = false
|
||||||
showViews = true
|
showViews = true
|
||||||
showLikes = true
|
showLikes = true
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 950 KiB |
|
@ -1,4 +1,18 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ .Scratch.Set "scope" "list" }}
|
||||||
|
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||||
|
{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||||
|
{{ if templates.Exists $heroStyle }}
|
||||||
|
{{ partial $heroStyle . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ partial "partials/hero/basic.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
|
||||||
|
.TableOfContents "<ul") }}
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
{{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
|
||||||
{{ partial "breadcrumbs.html" . }}
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
|
Loading…
Reference in a new issue