From d251a4e3f670325569bb0ac5d4943b437c8a89bb Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 23 Sep 2025 10:33:07 +0800 Subject: refactor: size headings based on container font-size --- layouts/_markup/render-heading.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'layouts/_markup') diff --git a/layouts/_markup/render-heading.html b/layouts/_markup/render-heading.html index 7b076fed..52b2f3ff 100644 --- a/layouts/_markup/render-heading.html +++ b/layouts/_markup/render-heading.html @@ -1,7 +1,12 @@ -{{ $size := index (dict "1" "text-4xl" "2" "text-2xl my-8" "3" "text-xl" "4" "text-lg" "5" "text-base" "6" "text-sm") (printf "%d" .Level) }} - +{{ $size := index (dict + "1" "text-[1.5em] font-extrabold" + "2" "text-[1.25em] font-extrabold" + "3" "text-[1.125em] font-bold" + "4" "text-[1em] font-bold" + "5" "text-[0.9em] font-bold" + "6" "text-[0.875em]") (printf "%d" .Level) }} + {{- .Text -}} -- cgit v1.2.3