Files
Fakel-Gym/blocks/contacts-block/contacts-block.php
GP_DEV 54eb8e266f init
2025-06-01 12:38:35 +03:00

131 lines
8.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Шаблон для блока преимуществ
*/
$blocks = parse_blocks(get_the_content());
$is_first_block = false;
if (!empty($blocks) && isset($blocks[0]['blockName']) && $blocks[0]['blockName'] === 'acf/contacts-block') {
$is_first_block = true;
}
$section_padding = $is_first_block ? "pt-[65px] max-[768px]:pt-[35px]" : "pt-[120px] max-[768px]:pt-[70px]";
?>
<style>
/* Скрываем, но лучше не нужно по копирайту */
.ymaps-2-1-79-copyright, .ymaps-2-1-79-gototech, .ymaps-2-1-79-gototaxi, .ymaps-2-1-79-gotoymaps,
.ymaps-2-1-79-map-copyrights-promo, .ymaps-2-1-79-copyright__wrap, .ymaps-2-1-79-copyright__content-cell,
[class*="ymaps-2"][class*="copyright"], [class*="ymaps-2"][class*="gototech"],
[class*="ymaps-2"][class*="gototaxi"], [class*="ymaps-2"][class*="gotoymaps"] {
display: none !important;
opacity: 0 !important;
visibility: hidden !important;
}
</style>
<section class="<?php echo $section_padding ?> full-layout">
<div class="max-[1200px]:max-w-[640px] max-[768px]:max-w-[340px] hidden max-[1200px]:block mx-auto mb-[-120px] bg-white w-full max-w-[378px] simple-shadow rounded-[25px] relative z-10">
<div class="max-[768px]:pl-[30px] max-[768px]:pt-[30px] max-[768px]:rounded-[20px] pl-[45px] pt-[40px] pb-[40px] relative rounded-[25px] overflow-hidden">
<svg class="absolute bottom-[-55px] right-[-65px]" width="126" height="129" viewBox="0 0 126 129"
fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="60.8145" width="82.2698" height="98.6297" transform="rotate(38.0681 60.8145 0)"
fill="url(#paint0_linear_2001_4983)"/>
<defs>
<linearGradient id="paint0_linear_2001_4983" x1="62.7686" y1="4.14594" x2="131.553" y2="37.4035"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F41C1B"/>
<stop offset="0.435" stop-color="#F72D2C"/>
<stop offset="1" stop-color="#FA4242"/>
</linearGradient>
</defs>
</svg>
<div class="py-[10px] px-[25px] w-full max-w-fit gap-[19px] border border-[#dedede] rounded-[1111px] flex items-center justify-center">
<?php
display_icon('dot');
?>
<span class="font-light text-[14px] leading-[140%] text-[#565656]">Связь с нами</span>
</div>
<div class="max-[768px]:max-w-[240px] flex flex-col gap-[20px]">
<h2 class="max-[768px]:text-[28px] font-bold mt-[25px] text-[45px] leading-[130%] text-[#3f3f3f]">
Контакты</h2>
<div class="max-[768px]:text-[24px] flex flex-col font-semibold text-[28px] leading-[165%] text-[#3f3f3f]">
<p class="max-[768px]:text-[15px] font-light text-[18px] text-[#828282]">Номер телефона:</p>
<a target="_blank" href="tel:<?php echo get_field('phones', 'options')['main_phone'] ?>"
class="hover:text-[#f62322] !decoration-transparent skip-ink transition-colors"
href="tel:+7(800)302-11-85"><?php echo get_field('phones', 'options')['main_phone'] ?></a>
<a target="_blank" href="tel:<?php echo get_field('phones', 'options')['phone'] ?>"
class="hover:text-[#f62322] !decoration-transparent skip-ink transition-colors"
href="tel:+7(911)098-59-77"><?php echo get_field('phones', 'options')['phone'] ?></a>
</div>
<div class="flex flex-col gap-[10px]">
<p class="max-[768px]:text-[15px] font-light text-[18px] text-[#828282]">Головной офис:</p>
<div class="max-[768px]:text-[19px] font-normal text-[23px] leading-[137%] text-[#3f3f3f]">
<?php echo get_field('address', 'options') ?>
</div>
</div>
<div class="flex flex-col gap-[10px]">
<p class="max-[768px]:text-[15px] font-light text-[18px] text-[#828282]">E-mail:</p>
<a class="max-[768px]:text-[19px] hover:text-[#f62322] !decoration-transparent skip-ink transition-colors font-normal text-[23px] leading-[137%] text-[#3f3f3f]"
href="mailto:info@mylogistika2010.ru"><?php echo get_field('email', 'options') ?></a>
</div>
</div>
</div>
</div>
<div id="map-container"
class="max-[1200px]:p-0 max-[1200px]:h-[600px] pt-[90px] pl-[62px] pb-[89px] rounded-[35px] relative">
<div id="map" class="absolute top-0 left-0 w-full h-full rounded-[35px] overflow-hidden z-0"></div>
<div class="max-[1200px]:hidden bg-white w-full max-w-[378px] simple-shadow rounded-[25px] relative z-10">
<div class=" pl-[45px] pt-[40px] pb-[40px] relative rounded-[25px] overflow-hidden">
<svg class="absolute bottom-[-55px] right-[-65px]" width="126" height="129" viewBox="0 0 126 129"
fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="60.8145" width="82.2698" height="98.6297" transform="rotate(38.0681 60.8145 0)"
fill="url(#paint0_linear_2001_4983)"/>
<defs>
<linearGradient id="paint0_linear_2001_4983" x1="62.7686" y1="4.14594" x2="131.553" y2="37.4035"
gradientUnits="userSpaceOnUse">
<stop stop-color="#F41C1B"/>
<stop offset="0.435" stop-color="#F72D2C"/>
<stop offset="1" stop-color="#FA4242"/>
</linearGradient>
</defs>
</svg>
<div class="py-[10px] px-[25px] w-full max-w-fit gap-[19px] border border-[#dedede] rounded-[1111px] flex items-center justify-center">
<?php
display_icon('dot');
?>
<span class="font-light text-[14px] leading-[140%] text-[#565656]">Свяжитесь с нами</span>
</div>
<div class="flex flex-col gap-[20px]">
<h2 class="max-[768px]:text-[28px] max-[1200px]:mb-[20px] font-bold mt-[25px] text-[45px] leading-[130%] text-[#3f3f3f]">
Контакты</h2>
<div class="flex flex-col font-semibold text-[28px] leading-[165%] text-[#3f3f3f]">
<p class=" font-light text-[18px] text-[#828282]">Номер телефона:</p>
<a target="_blank" href="tel:<?php echo get_field('phones', 'options')['main_phone'] ?>"
class="hover:text-[#f62322] !decoration-transparent skip-ink transition-colors"
href="tel:+7(800)302-11-85"><?php echo get_field('phones', 'options')['main_phone'] ?></a>
<a target="_blank" href="tel:<?php echo get_field('phones', 'options')['phone'] ?>"
class="hover:text-[#f62322] !decoration-transparent skip-ink transition-colors"
href="tel:+7(911)098-59-77"><?php echo get_field('phones', 'options')['phone'] ?></a>
</div>
<div class="flex flex-col gap-[10px]">
<p class="font-light text-[18px] text-[#828282]">Головной офис:</p>
<div class="font-normal text-[23px] leading-[137%] text-[#3f3f3f]">
<?php echo get_field('address', 'options') ?>
</div>
</div>
<div class="flex flex-col gap-[10px]">
<p class="font-light text-[18px] text-[#828282]">E-mail:</p>
<a class="hover:text-[#f62322] !decoration-transparent skip-ink transition-colors font-normal text-[23px] leading-[137%] text-[#3f3f3f]"
href="mailto:info@mylogistika2010.ru"><?php echo get_field('email', 'options') ?></a>
</div>
</div>
</div>
</div>
</div>
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&amp;apikey=03df01cd-1a4b-4cb2-9ae5-d32d62590767"
type="text/javascript"></script>
</section>