From 368c20e935eb96e9a6a5998c5a2941b9416b286c Mon Sep 17 00:00:00 2001 From: Floren Munteanu Date: Fri, 17 May 2024 15:29:39 -0400 Subject: [PATCH] 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 }} -

+