diff --git a/public/modules/custom/helfi_kasko_content/helfi_kasko_content.module b/public/modules/custom/helfi_kasko_content/helfi_kasko_content.module index d43d282d..f1945c0f 100644 --- a/public/modules/custom/helfi_kasko_content/helfi_kasko_content.module +++ b/public/modules/custom/helfi_kasko_content/helfi_kasko_content.module @@ -108,9 +108,18 @@ function helfi_kasko_content_preprocess_block(&$variables) { } $first_paragraph_gray = &$variables['content']['hero_block']['#first_paragraph_grey']; - // Check if the content field first paragraph is High school search + // Check if the content field first paragraph is unit search clone // and add classes accordingly. - if ($paragraph->getType() === 'high_school_search') { + $paragraph_types = [ + 'after_school_activity_search', + 'daycare_search', + 'high_school_search', + 'playground_search', + 'school_search', + 'vocational_school_search', + ]; + + if (in_array($paragraph->getType(), $paragraph_types)) { $first_paragraph_gray = 'has-first-gray-bg-block'; // If lead_in field has value, unset 1st gray paragraph class. diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--after-school-activity-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--after-school-activity-search.html.twig index fef60da3..b6540ab5 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--after-school-activity-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--after-school-activity-search.html.twig @@ -1,7 +1,7 @@ {% block paragraph %} {% embed "@hdbt/misc/component.twig" with { - component_classes: [ 'component--unit-search' ], + component_classes: [ 'component--full-width', 'component--unit-search' ], component_title: content.field_after_school_search_title, component_description: content.field_after_school_search_desc, component_content_class: 'unit-search unit-search--after-school-activity-search', diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--daycare-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--daycare-search.html.twig index 1c6bb269..5379846f 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--daycare-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--daycare-search.html.twig @@ -1,7 +1,7 @@ {% block paragraph %} {% embed "@hdbt/misc/component.twig" with { - component_classes: [ 'component--unit-search' ], + component_classes: [ 'component--full-width', 'component--unit-search' ], component_title: content.field_daycare_search_title, component_description: content.field_daycare_search_description, component_content_class: 'unit-search unit-search--daycare-search', diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--high-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--high-school-search.html.twig index 5f3a20eb..4113c788 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--high-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--high-school-search.html.twig @@ -1,7 +1,7 @@ {% block paragraph %} {% embed "@hdbt/misc/component.twig" with { - component_classes: [ 'component--unit-search' ], + component_classes: [ 'component--full-width', 'component--unit-search' ], component_title: content.field_hs_search_title, component_description: content.field_hs_search_description, component_content_class: 'unit-search unit-search--high-school', diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--playground-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--playground-search.html.twig index 9606ea8b..cc3b52a7 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--playground-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--playground-search.html.twig @@ -1,7 +1,7 @@ {% block paragraph %} {% embed "@hdbt/misc/component.twig" with { - component_classes: [ 'component--unit-search' ], + component_classes: [ 'component--full-width', 'component--unit-search' ], component_title: content.field_playground_search_title, component_description: content.field_playground_search_desc, component_content_class: 'unit-search unit-search--playground-search', diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--school-search.html.twig index 959ccc88..fdf36c6c 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--school-search.html.twig @@ -2,6 +2,7 @@ {% embed "@hdbt/misc/component.twig" with { component_classes: [ + 'component--full-width', 'component--react-search', 'component--react-search--schools' ], diff --git a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--vocational-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--vocational-school-search.html.twig index c8bf1a3c..dfa6c9d4 100644 --- a/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--vocational-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--vocational-school-search.html.twig @@ -1,7 +1,7 @@ {% block paragraph %} {% embed "@hdbt/misc/component.twig" with { - component_classes: [ 'component--unit-search' ], + component_classes: [ 'component--full-width', 'component--unit-search' ], component_title: content.field_vs_search_title, component_description: content.field_vs_search_description, component_content_class: 'unit-search unit-search--vocational-school',