From f4b919681e43955b35be36078753575c8ffc1d51 Mon Sep 17 00:00:00 2001 From: Anton Antonov Date: Sun, 20 Nov 2022 15:14:18 +0200 Subject: [PATCH] :sparkles: 266: Added option to disable the space between the header and the body when using heroStyle: background --- config/_default/params.toml | 2 ++ layouts/partials/hero/background.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/_default/params.toml b/config/_default/params.toml index bad1d72c..4f99dcf3 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -45,6 +45,7 @@ enableCodeCopy = true showHero = true heroStyle = "basic" # valid options: basic, big, background layoutBackgroundBlur = false # only used when heroStyle equals background + layoutBackgroundMoreSpaceBetweenHeaderAndBody = true # only used when heroStyle equals background showBreadcrumbs = true showDraftLabel = true showEdit = true @@ -65,6 +66,7 @@ enableCodeCopy = true [list] #showHero = true #heroStyle = "background" # valid options: basic, big, background + #layoutBackgroundMoreSpaceBetweenHeaderAndBody = true # only used when heroStyle equals background showBreadcrumbs = false showSummary = false #showViews = true diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index 01893a07..fe16c4cf 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -4,7 +4,9 @@ {{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} {{- with $featured -}} {{ with .Resize "1200x" }} +{{ if $.Site.Params.article.layoutBackgroundMoreSpaceBetweenHeaderAndBody | default true }}
+{{ end }}