mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-05 10:39:47 +00:00
♻️ heroStyle in front-matter
This commit is contained in:
1 parent
9a424d8f06
commit
1643b7ffc7
2 files changed
+10
-12
No files matched your search
@@ -3,17 +3,15 @@
|
||||
|
||||
<article>
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Site.Params.article.heroStyle }}
|
||||
{{ if .Params.heroStyle }}
|
||||
{{ $heroStyle = .Params.heroStyle }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
<header id="single_header" class="mt-5 max-w-prose">
|
||||
{{ if .Params.showBreadcrumbs | default (.Site.Params.article.showBreadcrumbs | default false) }}
|
||||
|
||||
Reference in new issue
Block a user