From 9e684fa313c3aef393b599f4b8c318281782f6a9 Mon Sep 17 00:00:00 2001 From: Floren Munteanu Date: Thu, 16 May 2024 19:24:41 -0400 Subject: [PATCH 1/2] Implement hextra hero-section --- layouts/shortcodes/hextra/hero-section.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 layouts/shortcodes/hextra/hero-section.html diff --git a/layouts/shortcodes/hextra/hero-section.html b/layouts/shortcodes/hextra/hero-section.html new file mode 100644 index 0000000..cf495d4 --- /dev/null +++ b/layouts/shortcodes/hextra/hero-section.html @@ -0,0 +1,8 @@ +{{- $style := .Get "style" -}} + +

+ {{ .Inner | markdownify }} +

From 368c20e935eb96e9a6a5998c5a2941b9416b286c Mon Sep 17 00:00:00 2001 From: Floren Munteanu Date: Fri, 17 May 2024 15:29:39 -0400 Subject: [PATCH 2/2] Implement header size --- layouts/shortcodes/hextra/hero-section.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/hextra/hero-section.html b/layouts/shortcodes/hextra/hero-section.html index cf495d4..09afa48 100644 --- a/layouts/shortcodes/hextra/hero-section.html +++ b/layouts/shortcodes/hextra/hero-section.html @@ -1,8 +1,10 @@ {{- $style := .Get "style" -}} +{{- $header := int (strings.TrimPrefix "h" (.Get "header" | default "h2")) -}} +{{- $size := cond (ge $header 4) "xl" (cond (eq $header 3) "2xl" "4xl") -}} -

{{ .Inner | markdownify }} -

+