mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
Merge pull request #2055 from ragibson/main
Rewrite templates/partials for Hugo v0.146.0
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||
"nav.skip_to_main" }}</a>
|
||||
</div>
|
||||
{{ $header := print "partials/header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists $header }}
|
||||
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $header ) }}
|
||||
{{ partial $header . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/header/basic.html" . }}
|
||||
{{ partial "header/basic.html" . }}
|
||||
{{ end }}
|
||||
<div class="relative flex flex-col grow">
|
||||
<main id="main-content" class="grow">
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.list.showHero | default false }}
|
||||
{{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.list.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
|
||||
{{ $heroStyle := .Params.heroStyle }}
|
||||
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
|
||||
{{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
{{ .Scratch.Set "scope" "term" }}
|
||||
{{ if .Site.Params.term.showHero | default false }}
|
||||
{{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
{{ .Scratch.Set "scope" "list" }}
|
||||
{{ if .Site.Params.taxonomy.showHero | default false }}
|
||||
{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists $heroStyle }}
|
||||
{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }}
|
||||
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
|
||||
{{ partial $heroStyle . }}
|
||||
{{ else }}
|
||||
{{ partial "partials/hero/basic.html" . }}
|
||||
{{ partial "hero/basic.html" . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user