🐞 fix: Update Calls to Action field label and name, adjust layout settings, and enhance page hero services structure
This commit is contained in:
@@ -158,22 +158,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "field_60bfb8614a421",
|
"key": "field_60bfb8614a421",
|
||||||
"label": "Call to Actions",
|
"label": "Calls to Action",
|
||||||
"name": "call_to_actions",
|
"name": "ctas",
|
||||||
"aria-label": "",
|
"aria-label": "",
|
||||||
"type": "repeater",
|
"type": "repeater",
|
||||||
"instructions": "",
|
"instructions": "",
|
||||||
"required": 0,
|
"required": 0,
|
||||||
"conditional_logic": false,
|
"conditional_logic": 0,
|
||||||
"wrapper": {
|
"wrapper": {
|
||||||
"width": "",
|
"width": "",
|
||||||
"class": "",
|
"class": "",
|
||||||
"id": ""
|
"id": ""
|
||||||
},
|
},
|
||||||
"collapsed": "",
|
"layout": "table",
|
||||||
|
"pagination": 0,
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 0,
|
"max": 0,
|
||||||
"layout": "table",
|
"collapsed": "",
|
||||||
"button_label": "Add Call to Action",
|
"button_label": "Add Call to Action",
|
||||||
"rows_per_page": 20,
|
"rows_per_page": 20,
|
||||||
"sub_fields": [
|
"sub_fields": [
|
||||||
@@ -293,5 +294,5 @@
|
|||||||
"display_title": "",
|
"display_title": "",
|
||||||
"allow_ai_access": false,
|
"allow_ai_access": false,
|
||||||
"ai_description": "",
|
"ai_description": "",
|
||||||
"modified": 1783288661
|
"modified": 1784082334
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
background: linear-gradient(73.83deg, #8FC9E6 -8.7%, #006196 21.51%, #032F46 60.7%);
|
background: linear-gradient(73.83deg, #8FC9E6 -8.7%, #006196 21.51%, #032F46 60.7%);
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
margin-bottom: 10rem;
|
margin-bottom: 10rem;
|
||||||
min-height: clamp(31rem, 38vw, 36rem);
|
min-height: clamp(31rem, 38.5417vw, 46.25rem);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
max-height: none;
|
max-height: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 23vw;
|
right: 28vw;
|
||||||
top: 3rem;
|
top: 3rem;
|
||||||
width: auto;
|
width: auto;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -71,7 +71,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-hero-services__vector {
|
.page-hero-services__vector {
|
||||||
bottom: clamp(1.5rem, 4vw, 3rem);
|
/* bottom: clamp(1.5rem, 4vw, 3rem); */
|
||||||
|
bottom: 0;
|
||||||
height: auto;
|
height: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -14,23 +14,19 @@ $heading = get_field( 'heading' );
|
|||||||
$heroImage = get_field( 'hero_image' );
|
$heroImage = get_field( 'hero_image' );
|
||||||
$heroVector = get_field( 'hero_vector' );
|
$heroVector = get_field( 'hero_vector' );
|
||||||
$intro = get_field( 'intro' );
|
$intro = get_field( 'intro' );
|
||||||
|
$ctas = get_field( 'ctas' );
|
||||||
|
|
||||||
// Fallback for heading
|
// Fallback for heading
|
||||||
if ( ! $heading ) {
|
if ( ! $heading ) {
|
||||||
$heading = getTheTitle();
|
$heading = getTheTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional logic for dark mode (if needed)
|
|
||||||
if ( is_home() || is_single() || is_archive() || is_search() || is_404() ) {
|
|
||||||
$isDark = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The wrapper color is the gradient from .page-hero in page-hero.css. The
|
// The wrapper color is the gradient from .page-hero in page-hero.css. The
|
||||||
// editor's background_color ACF field overrides the gradient with a solid color.
|
// editor's background_color ACF field overrides the gradient with a solid color.
|
||||||
$wrapperStyle = $bgColor ? 'background-color: ' . esc_attr( $bgColor ) . ';' : '';
|
$wrapperStyle = $bgColor ? 'background-color: ' . esc_attr( $bgColor ) . ';' : '';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="page-hero-services text-light <?php echo $isDark ? 'dark' : ''; ?>" style="<?php echo esc_attr( $wrapperStyle ); ?>">
|
<div class="page-hero-services text-light" <?php if ( $wrapperStyle ) { // phpcs:ignore ?>style="<?php echo esc_attr( $wrapperStyle ); ?>"<?php } ?>>
|
||||||
<div class="page-hero-services__content container mx-auto px-0!">
|
<div class="page-hero-services__content container mx-auto px-0!">
|
||||||
<!-- <div id="breadcrumbs">
|
<!-- <div id="breadcrumbs">
|
||||||
<?php Breadcrumbs::render(); ?>
|
<?php Breadcrumbs::render(); ?>
|
||||||
@@ -45,6 +41,31 @@ $wrapperStyle = $bgColor ? 'background-color: ' . esc_attr( $bgColor ) . ';' : '
|
|||||||
<?php echo wp_kses_post( $intro ); ?>
|
<?php echo wp_kses_post( $intro ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ( $ctas ) : ?>
|
||||||
|
<div class="reset mt-4 sm:mt-6 flex flex-wrap justify-center lg:justify-start gap-4">
|
||||||
|
<?php foreach ( $ctas as $index => $cta ) : ?>
|
||||||
|
<?php
|
||||||
|
$ctaLink = $cta['link'];
|
||||||
|
$ctaURL = $ctaLink['url'] ?? '#';
|
||||||
|
$ctaTarget = $ctaLink['target'] ?? '_self';
|
||||||
|
$ctaTitle = $ctaLink['title'] ?? '';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<x-button
|
||||||
|
btnclasses="button text-center min-w-32 dark"
|
||||||
|
element="a"
|
||||||
|
url="<?php echo esc_url( $ctaURL ); ?>"
|
||||||
|
target="<?php echo esc_attr( $ctaTarget ); ?>"
|
||||||
|
title="<?php echo esc_attr( $ctaTitle ); ?>"
|
||||||
|
color="primary"
|
||||||
|
<?php if ( $index !== 0 ) { ?>
|
||||||
|
variant="outline"
|
||||||
|
<?php } ?>
|
||||||
|
></x-button>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ( $heroImage ) : ?>
|
<?php if ( $heroImage ) : ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user