From 7b979949c36d30936b7c88dbcf396784d93a34b4 Mon Sep 17 00:00:00 2001 From: Chaoming Li Date: Wed, 20 Nov 2024 15:57:51 +1100 Subject: [PATCH] feat: Enhanced theme styling - Added gradient support to CTA shortcode (angle and colors) - Added gradient support to hero shortcode - Added background color support to testimonials shortcode - Updated btn-outline to use primary colors --- assets/css/main.css | 2 +- layouts/shortcodes/cta.html | 7 +++++-- layouts/shortcodes/hero.html | 6 ++++-- layouts/shortcodes/testimonials.html | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index c1e3558..83f7903 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -44,7 +44,7 @@ } .btn-outline { - @apply btn border-2 border-gray-200 hover:border-primary-600 hover:text-primary-600 hover:scale-105; + @apply btn border-2 border-primary-600 text-primary-600 hover:scale-105; } .container { diff --git a/layouts/shortcodes/cta.html b/layouts/shortcodes/cta.html index 7d943c8..0fd5ebf 100644 --- a/layouts/shortcodes/cta.html +++ b/layouts/shortcodes/cta.html @@ -1,8 +1,11 @@ {{/* CTA Shortcode */}}
-
-
+
+ {{ with .Get "background-image" }} +
+ {{ end }} +

{{ .Get "title" | default "Ready to Transform Your User Experience?" }}

{{ .Get "description" | default "Join thousands of companies already using our platform to drive growth." }}

diff --git a/layouts/shortcodes/hero.html b/layouts/shortcodes/hero.html index b65ad3c..586943a 100644 --- a/layouts/shortcodes/hero.html +++ b/layouts/shortcodes/hero.html @@ -6,9 +6,11 @@ {{ $secondary_button_url := .Get "secondary_button_url" }} {{ $hero_image := .Get "hero_image" }} {{ $background_image := .Get "background_image" }} -{{ $background_color_gradient := .Get "background_color_gradient" | default "from-gray-50 to-white" }} +{{ $gradient_from := .Get "gradient-from" }} +{{ $gradient_to := .Get "gradient-to" }} +{{ $gradient_angle := .Get "gradient-angle" | default "180" }} -
+
{{ if $background_image }}
Background diff --git a/layouts/shortcodes/testimonials.html b/layouts/shortcodes/testimonials.html index bbbae97..d5469e6 100644 --- a/layouts/shortcodes/testimonials.html +++ b/layouts/shortcodes/testimonials.html @@ -1,4 +1,5 @@ -
+{{ $background_color := .Get "background-color" }} +

{{ .Get "title" | default "Loved by Teams Worldwide" }}