From 0c90c1aa500dd1da473c474202b38fb82bcb5188 Mon Sep 17 00:00:00 2001 From: Floren Munteanu Date: Tue, 10 Dec 2024 18:58:36 -0500 Subject: [PATCH] feat: add hextra hero-section shortcode (#390) * Implement hextra hero-section * Implement header size * Update layouts/shortcodes/hextra/hero-section.html * Update layouts/shortcodes/hextra/hero-section.html * Update layouts/shortcodes/hextra/hero-section.html * Update layouts/shortcodes/hextra/hero-section.html --------- Co-authored-by: Xin --- layouts/shortcodes/hextra/hero-section.html | 10 ++++++++++ 1 file changed, 10 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 00000000..bdb37bff --- /dev/null +++ b/layouts/shortcodes/hextra/hero-section.html @@ -0,0 +1,10 @@ +{{- $style := .Get "style" -}} +{{- $heading := int (strings.TrimPrefix "h" (.Get "heading" | default "h2")) -}} +{{- $size := cond (ge $heading 4) "xl" (cond (eq $heading 3) "2xl" "4xl") -}} + + + {{ .Inner | markdownify }} +