This commit is contained in:
@@ -2,6 +2,32 @@
|
|||||||
"key": "group_60bfdb328901d",
|
"key": "group_60bfdb328901d",
|
||||||
"title": "Homepage Hero",
|
"title": "Homepage Hero",
|
||||||
"fields": [
|
"fields": [
|
||||||
|
{
|
||||||
|
"key": "field_6a84d6008c2b1",
|
||||||
|
"label": "Hero Image",
|
||||||
|
"name": "hero_image",
|
||||||
|
"aria-label": "",
|
||||||
|
"type": "image",
|
||||||
|
"instructions": "",
|
||||||
|
"required": 0,
|
||||||
|
"conditional_logic": 0,
|
||||||
|
"wrapper": {
|
||||||
|
"width": "",
|
||||||
|
"class": "",
|
||||||
|
"id": ""
|
||||||
|
},
|
||||||
|
"return_format": "array",
|
||||||
|
"library": "all",
|
||||||
|
"min_width": "",
|
||||||
|
"min_height": "",
|
||||||
|
"min_size": "",
|
||||||
|
"max_width": "",
|
||||||
|
"max_height": "",
|
||||||
|
"max_size": "",
|
||||||
|
"mime_types": "",
|
||||||
|
"allow_in_bindings": 0,
|
||||||
|
"preview_size": "medium"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "field_60bfdb328cfae",
|
"key": "field_60bfdb328cfae",
|
||||||
"label": "Heading",
|
"label": "Heading",
|
||||||
@@ -102,5 +128,8 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"description": "",
|
"description": "",
|
||||||
"show_in_rest": 0,
|
"show_in_rest": 0,
|
||||||
"modified": 1742332828
|
"display_title": "",
|
||||||
|
"allow_ai_access": false,
|
||||||
|
"ai_description": "",
|
||||||
|
"modified": 1787090455
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
namespace KsPortfolio;
|
namespace KsPortfolio;
|
||||||
|
|
||||||
// Retrieve ACF fields
|
// Retrieve ACF fields
|
||||||
|
$imgHero = get_field( 'hero_image' );
|
||||||
$heading = get_field( 'heading' );
|
$heading = get_field( 'heading' );
|
||||||
$intro = get_field( 'intro' );
|
$intro = get_field( 'intro' );
|
||||||
$ctas = get_field( 'calls_to_action' );
|
$ctas = get_field( 'calls_to_action' );
|
||||||
@@ -17,16 +18,16 @@ $wrapper = blockWrapperAttributes( $classes, $is_preview );
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<section <?php echo wp_kses_post( $wrapper ); ?>>
|
<section <?php echo wp_kses_post( $wrapper ); ?>>
|
||||||
<div class="container content-wrapper">
|
<div class="container content-wrapper flex flex-col lg:flex-row items-start justify-between">
|
||||||
<div class="max-w-lg sm:text-center lg:text-left lg:items-center ml-0">
|
<div class="max-w-2xl sm:text-center lg:text-left lg:items-center ml-0">
|
||||||
<?php if ( ! empty( $heading ) ) : ?>
|
<?php if ( ! empty( $heading ) ) : ?>
|
||||||
<h1 class="text-4xl lg:text-5xl font-bold leading-tight mb-4">
|
<h1 class="text-45px font-bold leading-tight mb-4">
|
||||||
<?php echo esc_html( $heading ); ?>
|
<?php echo esc_html( $heading ); ?>
|
||||||
</h1>
|
</h1>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( ! empty( $intro ) ) : ?>
|
<?php if ( ! empty( $intro ) ) : ?>
|
||||||
<div class="mt-3 text-base text-light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl with:max-w-full">
|
<div class="mt-3 text-20p text-light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl with:max-w-full">
|
||||||
<?php echo wp_kses_post( $intro ); ?>
|
<?php echo wp_kses_post( $intro ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -62,5 +63,17 @@ $wrapper = blockWrapperAttributes( $classes, $is_preview );
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-1 max-w-2xl">
|
||||||
|
<?php if ( ! empty( $imgHero ) ) : ?>
|
||||||
|
<div class="">
|
||||||
|
<img
|
||||||
|
src="<?php echo esc_url( $imgHero['url'] ); ?>"
|
||||||
|
alt="<?php echo esc_attr( $imgHero['alt'] ); ?>"
|
||||||
|
class="w-full h-full object-cover rounded-lg shadow-lg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user