diff --git a/app/Utilities/CssClasses.php b/app/Utilities/CssClasses.php index a71f2aa..8d578cb 100644 --- a/app/Utilities/CssClasses.php +++ b/app/Utilities/CssClasses.php @@ -30,17 +30,17 @@ class CssClasses { 'tint' => $props['bg_tint'], ]); - if(($knockout && $Colour->is_dark($hex) || $props['contrast'] == 'light')) + if(($props['contrast'] && $knockout)) $classes[] = 'knockout'; - if($props['padding_top']) + if(!$props['padding_top']) $classes[] = 'section-zero-top'; - if($props['padding_bottom']) + if(!$props['padding_bottom']) $classes[] = 'section-zero-bottom'; if($props['bg_image']) - $classes[] = "bg-watermarked"; + $classes[] = "has-bg-image"; return $classes; } @@ -89,7 +89,7 @@ class CssClasses { if($args['align']) $classes[] = 'align-' . $args['align']; - if(($Colour->is_dark($hex) || $bg_props['contrast'] == 'light')) + if(($bg_props['contrast'])) $classes[] = 'knockout'; return $classes; diff --git a/resources/acf/group_clone_background_settings.json b/resources/acf/group_clone_background_settings.json index 56dd612..7613685 100644 --- a/resources/acf/group_clone_background_settings.json +++ b/resources/acf/group_clone_background_settings.json @@ -17,9 +17,12 @@ "id": "" }, "choices": { - "0": "auto", + "0": "None", "primary": "<\/i> Punch", + "secondary": "<\/i> Atlantis", + "tertiary": "<\/i> Purple Heart", "white": "<\/i> White", + "grey": "<\/i> Gray", "black": "<\/i> Black" }, "default_value": 0, @@ -91,10 +94,10 @@ }, { "key": "field_67350f526abf1", - "label": "Text Contrast", + "label": "", "name": "contrast", "aria-label": "", - "type": "select", + "type": "true_false", "instructions": "", "required": 0, "conditional_logic": 0, @@ -103,20 +106,12 @@ "class": "", "id": "" }, - "choices": { - "0": "Auto", - "dark": "Force dark text", - "light": "Force light text" - }, + "message": "Text Contrast", "default_value": 0, - "return_format": "value", - "multiple": 0, - "allow_null": 0, - "ui": 0, - "ajax": 0, - "placeholder": "", - "create_options": 0, - "save_options": 0 + "allow_in_bindings": 0, + "ui_on_text": "Light", + "ui_off_text": "Dark", + "ui": 1 } ], "location": [ @@ -137,5 +132,6 @@ "active": true, "description": "", "show_in_rest": 0, - "modified": 1765746167 + "display_title": "", + "modified": 1767548180 } diff --git a/resources/acf/group_clone_block_settings.json b/resources/acf/group_clone_block_settings.json index 3ee386f..a8a1dda 100644 --- a/resources/acf/group_clone_block_settings.json +++ b/resources/acf/group_clone_block_settings.json @@ -36,56 +36,6 @@ }, "layout": "block", "sub_fields": [ - { - "key": "field_67350eb62cdf9", - "label": "Top Padding", - "name": "padding_top", - "aria-label": "", - "type": "radio", - "instructions": "", - "required": 0, - "conditional_logic": 0, - "wrapper": { - "width": "50", - "class": "", - "id": "" - }, - "choices": [ - "On", - "Off" - ], - "default_value": "", - "return_format": "value", - "allow_null": 0, - "other_choice": 0, - "layout": "horizontal", - "save_other_choice": 0 - }, - { - "key": "field_673510c1dc830", - "label": "Bottom Padding", - "name": "padding_bottom", - "aria-label": "", - "type": "radio", - "instructions": "", - "required": 0, - "conditional_logic": 0, - "wrapper": { - "width": "50", - "class": "", - "id": "" - }, - "choices": [ - "On", - "Off" - ], - "default_value": "", - "return_format": "value", - "allow_null": 0, - "other_choice": 0, - "layout": "horizontal", - "save_other_choice": 0 - }, { "key": "field_6800097e61765", "label": "Container Width", @@ -119,6 +69,66 @@ "create_options": 0, "save_options": 0 }, + { + "key": "field_67350eb62cdf9", + "label": "", + "name": "padding_top", + "aria-label": "", + "type": "true_false", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "message": "Top Padding", + "default_value": 1, + "allow_in_bindings": 0, + "ui_on_text": "On", + "ui_off_text": "Off", + "ui": 1 + }, + { + "key": "field_673510c1dc830", + "label": "", + "name": "padding_bottom", + "aria-label": "", + "type": "true_false", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "message": "Bottom Padding", + "default_value": 1, + "allow_in_bindings": 0, + "ui_on_text": "On", + "ui_off_text": "Off", + "ui": 1 + }, + { + "key": "field_695aa550e16d4", + "label": "Background", + "name": "", + "aria-label": "", + "type": "message", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "message": "", + "new_lines": "wpautop", + "esc_html": 0 + }, { "key": "field_67350aeb146ca", "label": "Background", @@ -181,5 +191,5 @@ "description": "", "show_in_rest": 0, "display_title": "", - "modified": 1765815052 + "modified": 1767548583 }