final
This commit is contained in:
@@ -12,14 +12,40 @@ if (!empty($block['className'])) {
|
||||
if (!empty($block['align'])) {
|
||||
$classes .= ' align' . $block['align'];
|
||||
}
|
||||
$third_tile_bg_url = '';
|
||||
if (have_rows('tiles_group')) :
|
||||
while (have_rows('tiles_group')) : the_row();
|
||||
if (have_rows('third_tile')) :
|
||||
while (have_rows('third_tile')) : the_row();
|
||||
$bg = get_sub_field('bg');
|
||||
if ($bg && !empty($bg['url'])) {
|
||||
$third_tile_bg_url = esc_url($bg['url']);
|
||||
}
|
||||
endwhile;
|
||||
endif;
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
?>
|
||||
<?php if (!empty($third_tile_bg_url)) : ?>
|
||||
<style>
|
||||
@media (max-width: 767px) {
|
||||
.fourth-tile-mobile-bg {
|
||||
background-image: url('<?php echo $third_tile_bg_url; ?>') !important;
|
||||
background-size: cover !important;
|
||||
background-position: center !important;
|
||||
}
|
||||
.dark .fourth-tile-mobile-bg {
|
||||
background-image: url('<?php echo $third_tile_bg_url; ?>') !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
<section id="<?php echo esc_attr($id); ?>" class="<?php echo esc_attr($classes); ?>">
|
||||
<div class="container mx-auto py-[90px]">
|
||||
|
||||
<div class="container mx-auto py-[90px] max-[768px]:py-[45px]">
|
||||
<?php if (get_field('heading')) : ?>
|
||||
<h2 class="text-[48px] font-[500] text-[#1f2937] mb-[40px]">
|
||||
<h2 class="font-[500] leading-[110%] max-[1330px]:text-[36px] max-[768px]:text-[24px] text-[48px]">
|
||||
<?php echo get_field('heading'); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
@@ -28,14 +54,14 @@ if (!empty($block['align'])) {
|
||||
<?php while (have_rows('tiles_group')) :
|
||||
the_row(); ?>
|
||||
|
||||
<div class="grid grid-cols-3 gap-[24px]">
|
||||
<div class="max-[768px]:grid-cols-1 max-[1050px]:grid-cols-2 grid grid-cols-3 max-[1050px]:gap-[12px] gap-[24px] mt-[40px]">
|
||||
|
||||
|
||||
<!-- Первая колонка: First Tile -->
|
||||
<div>
|
||||
<?php if (have_rows('first_tile')) : ?>
|
||||
<?php while (have_rows('first_tile')) :
|
||||
the_row(); ?>
|
||||
<div class="relative h-[512px] rounded-[12px] p-[24px] overflow-hidden"
|
||||
<div class="relative max-[768px]:h-[290px] h-[512px] rounded-[12px] p-[24px] overflow-hidden"
|
||||
<?php
|
||||
$image = get_sub_field('image');
|
||||
if ($image) : ?>
|
||||
@@ -47,11 +73,11 @@ if (!empty($block['align'])) {
|
||||
|
||||
<div class="relative flex flex-col gap-[12px] h-full justify-end z-10">
|
||||
<?php if (get_sub_field('heading')) : ?>
|
||||
<h3 class="text-[32px] font-[600] leading-[115%] text-[#f8f8f8]"><?php echo esc_html(get_sub_field('heading')); ?></h3>
|
||||
<h3 class="max-[768px]:text-[24px] text-[32px] font-[600] leading-[115%] text-[#f8f8f8]"><?php echo esc_html(get_sub_field('heading')); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('text')) : ?>
|
||||
<div class="text-[16px] font-[500] leading-[145%] text-[#e0e0e0]"><?php echo wp_kses_post(get_sub_field('text')); ?></div>
|
||||
<div class="max-[768px]:text-[14px] text-[16px] font-[500] leading-[145%] text-[#e0e0e0]"><?php echo wp_kses_post(get_sub_field('text')); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,18 +85,17 @@ if (!empty($block['align'])) {
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Вторая колонка: Second и Third Tiles -->
|
||||
<div class="flex flex-col gap-[24px]">
|
||||
<!-- Second Tile -->
|
||||
<div class="flex max-[1050px]:justify-between flex-col max-[1050px]:gap-[12px] gap-[24px]">
|
||||
|
||||
<?php if (have_rows('second_tile')) : ?>
|
||||
<?php while (have_rows('second_tile')) :
|
||||
the_row(); ?>
|
||||
<div class="h-[244px] relative border border-[#e0e0e0] dark:border-transparent bg-transparent dark:bg-white rounded-[12px] p-[24px] overflow-hidden">
|
||||
<div class=" h-[244px] max-[768px]:h-auto relative border border-[#e0e0e0] dark:border-transparent bg-transparent dark:bg-white rounded-[12px] p-[24px] overflow-hidden">
|
||||
<?php
|
||||
if (get_current_room() === 'fitness') {
|
||||
?>
|
||||
<div class="absolute right-[24px] top-[24px]">
|
||||
<img alt="decoration"
|
||||
<img class="max-[768px]:h-[36px] max-[768px]:w-[107px]" alt="decoration"
|
||||
src="<?php echo get_template_directory_uri() . '/assets/images/masonry-decor.png'; ?>">
|
||||
</div>
|
||||
<?php
|
||||
@@ -79,7 +104,7 @@ if (!empty($block['align'])) {
|
||||
|
||||
<div class="flex flex-col h-full justify-end">
|
||||
<?php if (get_sub_field('heading')) : ?>
|
||||
<h3 class="font-[600] text-[62px] dark:text-[42px] leading-[115%]">
|
||||
<h3 class="max-[768px]:text-[42px] font-[600] text-[62px] max-[768px]:dark:text-[24px] dark:text-[42px] leading-[115%]">
|
||||
<span class="bg-[linear-gradient(90deg,#2b2c35_67.31%,#4f5870_92.9%)] bg-clip-text text-transparent">
|
||||
<?php echo esc_html(get_sub_field('heading')); ?>
|
||||
</span>
|
||||
@@ -87,11 +112,11 @@ if (!empty($block['align'])) {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('underheading')) : ?>
|
||||
<p class="text-[20px] leading-[140%] text-[#222]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<p class="max-[768px]:font-[600] max-[768px]:text-[16px] text-[20px] leading-[140%] text-[#222]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('text')) : ?>
|
||||
<div class="mt-[12px] text-[16px] leading-[145%] text-[#6c6b6b]"
|
||||
<div class="max-[768px]:mt-[8px] mt-[12px] max-[768px]:text-[14px] text-[16px] leading-[145%] text-[#6c6b6b]"
|
||||
><?php echo wp_kses_post(get_sub_field('text')); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -99,10 +124,10 @@ if (!empty($block['align'])) {
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Third Tile -->
|
||||
|
||||
<?php if (have_rows('third_tile')) : ?>
|
||||
<?php while (have_rows('third_tile')) : the_row(); ?>
|
||||
<div class="h-[244px] rounded-[12px] p-[24px] overflow-hidden"
|
||||
<div class="max-[768px]:hidden h-[244px] max-[768px]:h-auto rounded-[12px] p-[24px] overflow-hidden"
|
||||
<?php
|
||||
$bg = get_sub_field('bg');
|
||||
if ($bg) : ?>
|
||||
@@ -113,14 +138,12 @@ if (!empty($block['align'])) {
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Третья колонка: Fourth и Fifth Tiles -->
|
||||
<div class="flex flex-col gap-[24px]">
|
||||
<!-- Fourth Tile -->
|
||||
|
||||
<div class="max-[1050px]:col-span-2 max-[768px]:col-span-1 max-[768px]:flex-col max-[1050px]:flex-row flex flex-col max-[1050px]:gap-[12px] gap-[24px]">
|
||||
<?php if (have_rows('fourth_tile')) : ?>
|
||||
<?php while (have_rows('fourth_tile')) :
|
||||
the_row(); ?>
|
||||
<div class="h-[244px] relative rounded-[12px] p-[24px] overflow-hidden dark:bg-[linear-gradient(90deg,_#2b2c35_53.4%,_#4f5870_100%)] bg-[linear-gradient(90deg,_#9d9994_39.42%,_#bbb7b1_92.9%)]">
|
||||
<div class="absolute right-[24px] top-[24px]">
|
||||
<?php while (have_rows('fourth_tile')) : the_row(); ?>
|
||||
<div class="relative max-[768px]:w-full fourth-tile-mobile-bg max-[1050px]:w-[calc(50%-6px)] h-[244px] max-[768px]:h-auto relative rounded-[12px] p-[24px] overflow-hidden dark:bg-[linear-gradient(90deg,_#2b2c35_53.4%,_#4f5870_100%)] bg-[linear-gradient(90deg,_#9d9994_39.42%,_#bbb7b1_92.9%)]">
|
||||
<div class="max-[768px]:hidden absolute right-[24px] top-[24px]">
|
||||
<svg width="87" height="50" viewBox="0 0 87 50" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_4015_3641)">
|
||||
@@ -138,17 +161,18 @@ if (!empty($block['align'])) {
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex h-full justify-end flex-col text-[#f8f8f8]">
|
||||
<div class="max-[768px]:block hidden absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"></div>
|
||||
<div class="max-[768px]:text-[#fff] flex h-full justify-end flex-col text-[#f8f8f8]">
|
||||
<?php if (get_sub_field('heading')) : ?>
|
||||
<h3 class="text-[42px] leading-[115%]"><?php echo esc_html(get_sub_field('heading')); ?></h3>
|
||||
<h3 class="max-[768px]:font-[600] relative z-[1] max-[768px]:text-[24px] text-[42px] leading-[115%]"><?php echo esc_html(get_sub_field('heading')); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('underheading')) : ?>
|
||||
<p class=" text-[20px] leading-[140%]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<p class="relative z-[1] max-[768px]:font-[600] max-[768px]:text-[16px] text-[20px] leading-[140%]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('text')) : ?>
|
||||
<div class="mt-[12px] text-[16px] leading-[145%] text-[#e0e0e0]">
|
||||
<div class="relative z-[1] max-[768px]:text-[#fff] max-[768px]:mt-[8px] mt-[12px] max-[768px]:text-[14px] text-[16px] leading-[145%] text-[#e0e0e0]">
|
||||
<?php echo wp_kses_post(get_sub_field('text')); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -157,13 +181,13 @@ if (!empty($block['align'])) {
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Fifth Tile -->
|
||||
|
||||
<?php if (have_rows('fifth_tile')) : ?>
|
||||
<?php while (have_rows('fifth_tile')) : the_row(); ?>
|
||||
<div class="h-[244px] border border-[#e0e0e0] dark:border-transparent bg-transparent dark:bg-white rounded-[12px] p-[24px] overflow-hidden">
|
||||
<div class="flex flex-col h-full justify-end">
|
||||
<div class="max-[768px]:w-full max-[1050px]:w-[calc(50%-6px)] h-[244px] max-[768px]:h-auto border border-[#e0e0e0] dark:border-transparent bg-transparent dark:bg-white rounded-[12px] p-[24px] overflow-hidden">
|
||||
<div class="max-[768px]:justify-center flex flex-col h-full justify-end">
|
||||
<?php if (get_sub_field('heading')) : ?>
|
||||
<h3 class="font-[600] text-[42px] leading-[115%]">
|
||||
<h3 class="font-[600] max-[768px]:text-[24px] text-[42px] leading-[115%]">
|
||||
<span class="bg-[linear-gradient(90deg,#2b2c35_67.31%,#4f5870_92.9%)] bg-clip-text text-transparent">
|
||||
<?php echo esc_html(get_sub_field('heading')); ?>
|
||||
</span>
|
||||
@@ -171,11 +195,11 @@ if (!empty($block['align'])) {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('underheading')) : ?>
|
||||
<p class="text-[20px] leading-[140%] text-[#222]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<p class="max-[768px]:font-[600] max-[768px]:text-[16px] text-[20px] leading-[140%] text-[#222]"><?php echo esc_html(get_sub_field('underheading')); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (get_sub_field('text')) : ?>
|
||||
<div class="mt-[12px] text-[16px] leading-[145%] text-[#6c6b6b]"
|
||||
<div class="max-[768px]:mt-[8px] mt-[12px] max-[768px]:text-[14px] text-[16px] leading-[145%] text-[#6c6b6b]"
|
||||
"><?php echo wp_kses_post(get_sub_field('text')); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user