From 26d4df0d49a00b54f60f8dcb2dd70ee6d81c34cf Mon Sep 17 00:00:00 2001 From: Michael Squance Date: Tue, 4 Mar 2025 11:44:35 +0000 Subject: [PATCH] Adding white-bg to any component that we had made hard coded white to deal with the automatic handling of text on white-bgs --- app/components/cms/horizontal_card_component.rb | 2 +- .../horizontal_card_component/horizontal_card_component.scss | 1 - app/components/cms/resource_card_component.rb | 2 +- app/components/cms/split_horizontal_card_wrapper_component.rb | 2 +- .../split_horizontal_card_wrapper_component.html.erb | 2 +- .../split_horizontal_card_wrapper_component.scss | 1 - .../cms/testimonial_component/testimonial_component.html.erb | 2 +- .../strapi/queries/components/blocks/horizontal_card_spec.rb | 1 + 8 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/components/cms/horizontal_card_component.rb b/app/components/cms/horizontal_card_component.rb index 18d1c69bfb..97154bab37 100644 --- a/app/components/cms/horizontal_card_component.rb +++ b/app/components/cms/horizontal_card_component.rb @@ -26,7 +26,7 @@ def padding end def wrapper_classes - classes = ["horizontal-card-component__wrapper"] + classes = ["horizontal-card-component__wrapper white-bg"] if @color_theme classes << cms_color_theme_class(@color_theme, "left") classes << "#{@color_theme}-theme" diff --git a/app/components/cms/horizontal_card_component/horizontal_card_component.scss b/app/components/cms/horizontal_card_component/horizontal_card_component.scss index b389973fd8..482cb3c0d1 100644 --- a/app/components/cms/horizontal_card_component/horizontal_card_component.scss +++ b/app/components/cms/horizontal_card_component/horizontal_card_component.scss @@ -4,7 +4,6 @@ display: flex; padding: 28px; align-items: center; - background-color: white; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); border-width: 10px; diff --git a/app/components/cms/resource_card_component.rb b/app/components/cms/resource_card_component.rb index 29497c794e..fbfa4f76c8 100644 --- a/app/components/cms/resource_card_component.rb +++ b/app/components/cms/resource_card_component.rb @@ -11,7 +11,7 @@ def initialize(title:, body_text:, icon: nil, color_theme: nil, button_text: nil end def wrapper_classes - classes = ["cms-resource-card"] + classes = ["cms-resource-card", "white-bg"] classes << cms_color_theme_class(@color_theme, "top") if @color_theme classes end diff --git a/app/components/cms/split_horizontal_card_wrapper_component.rb b/app/components/cms/split_horizontal_card_wrapper_component.rb index 70de49fb8f..1f8ff68593 100644 --- a/app/components/cms/split_horizontal_card_wrapper_component.rb +++ b/app/components/cms/split_horizontal_card_wrapper_component.rb @@ -20,7 +20,7 @@ def wrapper_classes end def left_card_classes - classes = ["split-horizontal-card"] + classes = ["split-horizontal-card white-bg"] classes << cms_color_theme_class(@color_theme, "left") if @color_theme classes end diff --git a/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.html.erb b/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.html.erb index fb00f0bb15..6f95746660 100644 --- a/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.html.erb +++ b/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.html.erb @@ -13,7 +13,7 @@
<% if aside_card_content? %> -
+
<%= aside_card_content %>
<% end %> diff --git a/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.scss b/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.scss index 2af55b6f4a..0fa8e22147 100644 --- a/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.scss +++ b/app/components/cms/split_horizontal_card_wrapper_component/split_horizontal_card_wrapper_component.scss @@ -1,7 +1,6 @@ .cms-split-horizontal-card-wrapper { .split-horizontal-card { height: calc(100% - 40px); - background-color: #ffffff; padding: 20px; border-width: 10px; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); diff --git a/app/components/cms/testimonial_component/testimonial_component.html.erb b/app/components/cms/testimonial_component/testimonial_component.html.erb index 82552115dd..afaa969c59 100644 --- a/app/components/cms/testimonial_component/testimonial_component.html.erb +++ b/app/components/cms/testimonial_component/testimonial_component.html.erb @@ -1,5 +1,5 @@
-
+
<%= render @quote.render %>
diff --git a/spec/services/cms/providers/strapi/queries/components/blocks/horizontal_card_spec.rb b/spec/services/cms/providers/strapi/queries/components/blocks/horizontal_card_spec.rb index 3b1c610ecd..8ba81ef551 100644 --- a/spec/services/cms/providers/strapi/queries/components/blocks/horizontal_card_spec.rb +++ b/spec/services/cms/providers/strapi/queries/components/blocks/horizontal_card_spec.rb @@ -11,5 +11,6 @@ iconBlock spacing externalTitle + bkColor ] end