From f96661ac13450943742f0e5102bf3170456f2ad9 Mon Sep 17 00:00:00 2001 From: Chaoming Li Date: Tue, 19 Nov 2024 16:51:10 +1100 Subject: [PATCH] feat: add support for hex color values in feature badges --- layouts/shortcodes/feature.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/feature.html b/layouts/shortcodes/feature.html index 55e7d27..5318621 100644 --- a/layouts/shortcodes/feature.html +++ b/layouts/shortcodes/feature.html @@ -2,7 +2,7 @@ {{ $title := .Get "title" }} {{ $description := .Get "description" }} {{ $badge := .Get "badge" }} -{{ $badgeColor := .Get "badgeColor" | default "primary" }} +{{ $badgeColor := .Get "badgeColor" | default "#5573df" }} {{ $image := .Get "image" }} {{ $buttonText := .Get "buttonText" | default "Learn More" }} {{ $buttonLink := .Get "buttonLink" | default "#" }} @@ -10,7 +10,7 @@ {{ $features := split (.Get "features") "," }} -
+
{{ if eq $imagePosition "left" }}
{{ $title }} @@ -18,13 +18,22 @@ {{ end }}
-
{{ $badge }}
+ +
{{ $badge }}

{{ $title }}

{{ $description }}

    {{ range $features }}
  • - + {{ . | strings.TrimSpace }}