From 0a60bd40ccbd9aba347a9ce181a750a53688931a Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 8 Mar 2023 07:20:22 -0500 Subject: [PATCH] [BSv5] blocks/cover row/col fix --- assets/scss/blocks/_cover.scss | 1 + layouts/shortcodes/blocks/cover.html | 74 +++++++++---------- userguide/content/en/_index.html | 2 +- .../en/docs/adding-content/iconsimages.md | 2 +- 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/assets/scss/blocks/_cover.scss b/assets/scss/blocks/_cover.scss index 703ef43e2b..38709fbf6a 100644 --- a/assets/scss/blocks/_cover.scss +++ b/assets/scss/blocks/_cover.scss @@ -17,6 +17,7 @@ } & > .byline { + @extend .small; position: absolute; bottom: 2px; right: 4px; diff --git a/layouts/shortcodes/blocks/cover.html b/layouts/shortcodes/blocks/cover.html index 48e3192372..c3e357f058 100644 --- a/layouts/shortcodes/blocks/cover.html +++ b/layouts/shortcodes/blocks/cover.html @@ -1,50 +1,50 @@ -{{ $_hugo_config := `{ "version": 1 }` }} -{{ $blockID := printf "td-cover-block-%d" .Ordinal }} -{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }} -{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }} -{{ $col_id := .Get "color" | default "dark" }} -{{ $image_anchor := .Get "image_anchor" | default "smart" }} -{{ $logo_anchor := .Get "logo_anchor" | default "smart" }} -{{/* Height can be one of: auto, min, med, max, full. */}} -{{ $height := .Get "height" | default "max" }} -{{ $byline := .Get "byline" | default "" }} -{{ with $promo_image }} -{{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) }} -{{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) }} +{{ $_hugo_config := `{ "version": 1 }` -}} +{{ $blockID := printf "td-cover-block-%d" .Ordinal -}} +{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" -}} +{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" -}} +{{ $col_id := .Get "color" | default "dark" -}} +{{ $image_anchor := .Get "image_anchor" | default "smart" -}} +{{ $logo_anchor := .Get "logo_anchor" | default "smart" -}} +{{/* Height can be one of: auto, min, med, max, full. */ -}} +{{ $height := .Get "height" | default "max" -}} + +{{ with $promo_image -}} +{{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) -}} +{{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) -}} -{{ end }} -
-
-
-
-
- {{ with .Get "title" }}

{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}{{ end }}{{ $title | html }}

{{ end }} - {{ with .Get "subtitle" }}

{{ . | html }}

{{ end }} -
- {{ if eq .Page.File.Ext "md" }} - {{ .Inner | markdownify }} - {{ else }} - {{ .Inner | htmlUnescape | safeHTML }} - {{ end }} -
+{{ end -}} + +
+
+
+
+ {{ with .Get "title" }}

{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}{{ end }}{{ $title | html }}

{{ end }} + {{ with .Get "subtitle" }}

{{ . | html }}

{{ end }} +
+ {{ if eq .Page.File.Ext "md" }} + {{ .Inner | markdownify }} + {{ else }} + {{ .Inner | htmlUnescape | safeHTML }} + {{ end }}
- {{ if $byline }} - - {{ end }} + {{ with .Get "byline" | default "" -}} + + {{- end }}
+{{/**/ -}} diff --git a/userguide/content/en/_index.html b/userguide/content/en/_index.html index 835f233176..163ac94af6 100644 --- a/userguide/content/en/_index.html +++ b/userguide/content/en/_index.html @@ -2,7 +2,7 @@ title: Docsy --- -{{< blocks/cover title="Welcome to Docsy!" image_anchor="top" height="full" color="orange" >}} +{{< blocks/cover title="Welcome to Docsy!" image_anchor="top" height="full" >}}