Task 10121 | fix: поправили прайсы цен для карт, которые некорректно выводятся при заполнении из админки

This commit is contained in:
Боевой сайт - fakel
2025-11-21 21:11:51 +03:00
parent 21562852ca
commit 2ac2340779
57 changed files with 7935 additions and 14019 deletions

View File

@@ -1,4 +1,24 @@
<?php
$excluded_page_ids = array(763, 724, 732, 585, 582);
if (!is_front_page() &&
!is_404() &&
!in_array(get_the_ID(), $excluded_page_ids)) {
$front_page_id = get_option('page_on_front');
if ($front_page_id) {
$page_content = get_post_field('post_content', $front_page_id);
$blocks = parse_blocks($page_content);
foreach ($blocks as $block) {
if ($block['blockName'] === 'acf/form-block') {
echo render_block($block);
break;
}
}
}
}
?>
<div class="text-white relative min-h-[330px] bg-[linear-gradient(180deg,_#f9f9f9_69.59%,_#ededed_100%)] dark:bg-none dark:bg-[#141419]">
<?php if (get_current_room() === 'gym'): ?>
@@ -6,12 +26,16 @@
<svg class="absolute right-0 top-0 z-[0] pointer-events-none" width="621" height="330" viewBox="0 0 621 330"
fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.04" clip-path="url(#clip0_4018_16537)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M621 -0.00390625C506.463 285.064 258.06 133.205 63.4795 202.474C120.06 42.623 222.18 13.317 336.721 11.9849C422.28 10.6528 542.342 19.9775 621 -0.00390625Z" fill="#F8F8F8" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M426.423 206.469C338.102 424.931 149.041 303.71 0 356.995C77.2817 138.532 253.922 250.428 426.423 206.469Z" fill="#F8F8F8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M621 -0.00390625C506.463 285.064 258.06 133.205 63.4795 202.474C120.06 42.623 222.18 13.317 336.721 11.9849C422.28 10.6528 542.342 19.9775 621 -0.00390625Z"
fill="#F8F8F8"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M426.423 206.469C338.102 424.931 149.041 303.71 0 356.995C77.2817 138.532 253.922 250.428 426.423 206.469Z"
fill="#F8F8F8"/>
</g>
<defs>
<clipPath id="clip0_4018_16537">
<rect width="621" height="357" fill="white" />
<rect width="621" height="357" fill="white"/>
</clipPath>
</defs>
</svg>
@@ -41,13 +65,71 @@
<?php display_icon(get_current_room() === 'gym' ? 'dark_logo' : 'light_logo'); ?>
</a>
<div class="mt-[12px]"> <?php get_template_part('template-parts/la-components/language-switcher'); ?></div>
<button data-modal="time"
class="mt-[24px] text-[#222] dark:text-[#f8f8f8] dark:border-[rgba(248,_248,_248,_0.2)] font-[600] flex gap-[8px] h-[44px] px-[20px] items-center cursor-pointer border border-[#e0e0e0] rounded-[90px]"
>
<span class="dark:bg-[#f8f8f8] w-[8px] h-[8px] rounded-full bg-[#e21e24]"></span>
Расписание
</button>
<div class="mt-[24px] text-[#222] dark:text-[#f8f8f8] text-[14px] leading-[125%] font-[600]">
<div class="hidden max-[800px]:block mt-[24px]">
<div class="flex w-full flex-wrap gap-y-[16px] gap-x-[40px]"> <?php
$menu_items = get_simple_menu_items();
foreach ($menu_items as $item):
?>
<a class="!no-underline text-[#222] dark:text-[#f8f8f8] dark:hover:text-[#c7c7c7] hover:text-[#555] hover:text-[#555] font-[600] leading-[125%] text-[16px]"
href="<?php echo esc_url($item['url']); ?>">
<?php echo esc_html($item['title']); ?>
</a>
<?php endforeach; ?></div>
</div>
<div class="hidden max-[1000px]:flex mt-[24px] flex items-center gap-[12px] text-[#222] dark:text-[#f8f8f8]">
<div class="leading-[145%] inline-flex text-[16px] font-[600]">
<p>г. Томск, </p>
<p>ул. Красноармейская, 120</p>
</div>
</div>
<div class="max-[1000px]:block hidden mt-[12px] text-[#222] dark:text-[#f8f8f8] text-[14px] leading-[125%] font-[600]">
<?php
$work_time = get_field('work_time', 'option');
echo $work_time[get_current_room()];
?>
</div>
<div class="hidden max-[1000px]:flex mt-[12px] justify-between flex-wrap items-center gap-[6px]">
<a class="font-[700] dark:hover:text-[#c7c7c7] hover:text-[#555] text-[24px] leading-[125%] !decoration-transparent text-[#222] dark:text-[#f8f8f8] transition-colors"
href="tel:+783822990019">
+7 (3822) 99-00-19
</a>
<div class="flex gap-[4px]">
<a class="[&>img]:w-[30px] dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="https://t.me/FakelGym_bot">
<?php display_icon(get_current_room() === 'gym' ? 'tg_dark' : 'tg'); ?>
</a>
<a class="[&>img]:w-[30px] dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="https://wa.me/79832321319">
<?php display_icon(get_current_room() === 'gym' ? 'whatsapp_dark' : 'whatsapp'); ?>
</a>
</div>
</div>
<div class="flex gap-[12px] items-center mt-[24px] ">
<?php
$page = get_page_by_path('lk');
?>
<a href="
<?php
echo get_permalink(pll_get_post($page->ID, pll_current_language()) ?: $page->ID);
?>
"
class="max-[768px]:px-[14px] max-[768px]:text-[14px] !no-underline max-[1000px]:flex hidden font-[600] dark:text-[#222] text-[#f8f8f8] dark-gradient-hover dark:!bg-none dark:!bg-[#f8f8f8] gap-[8px] h-[44px] px-[20px] items-center cursor-pointer rounded-[90px]"
>
<svg class="min-w-fit" width="16" height="17" viewBox="0 0 16 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path class="dark:fill-[#222222] fill-[#f8f8f8]"
d="M8 0.5C9.06087 0.5 10.0783 0.921427 10.8284 1.67157C11.5786 2.42172 12 3.43913 12 4.5C12 5.56087 11.5786 6.57828 10.8284 7.32843C10.0783 8.07857 9.06087 8.5 8 8.5C6.93913 8.5 5.92172 8.07857 5.17157 7.32843C4.42143 6.57828 4 5.56087 4 4.5C4 3.43913 4.42143 2.42172 5.17157 1.67157C5.92172 0.921427 6.93913 0.5 8 0.5ZM8 10.5C12.42 10.5 16 12.29 16 14.5V16.5H0V14.5C0 12.29 3.58 10.5 8 10.5Z"
/>
</svg>
Личный кабинет
</a>
<button data-modal="time"
class="dark:hidden max-[768px]:px-[14px] max-[768px]:text-[14px] text-[#222] dark:text-[#f8f8f8] dark:border-[rgba(248,_248,_248,_0.2)] font-[600] flex gap-[8px] h-[44px] px-[20px] items-center cursor-pointer border border-[#e0e0e0] rounded-[90px]"
>
<span class="dark:bg-[#f8f8f8] w-[8px] h-[8px] rounded-full bg-[#e21e24]"></span>
Расписание
</button>
</div>
<div class="max-[1000px]:hidden mt-[24px] text-[#222] dark:text-[#f8f8f8] text-[14px] leading-[125%] font-[600]">
<?php
$work_time = get_field('work_time', 'option');
@@ -56,7 +138,7 @@
</div>
</div>
<div>
<div class="max-[800px]:hidden">
<div class="flex w-full max-w-[424px] flex-wrap gap-y-[16px] gap-x-[40px]"> <?php
$menu_items = get_simple_menu_items();
foreach ($menu_items as $item):
@@ -68,16 +150,24 @@
<?php endforeach; ?></div>
</div>
<div class="flex flex-col items-end">
<button
class="font-[600] dark:text-[#222] text-[#f8f8f8] dark-gradient-hover dark:!bg-none dark:!bg-[#f8f8f8] flex gap-[8px] h-[44px] px-[20px] items-center cursor-pointer rounded-[90px]"
<div class="max-[1000px]:hidden flex flex-col items-end">
<?php
$page = get_page_by_path('lk');
?>
<a href="
<?php
echo get_permalink(pll_get_post($page->ID, pll_current_language()) ?: $page->ID);
?>
"
class="!no-underline font-[600] dark:text-[#222] text-[#f8f8f8] dark-gradient-hover dark:!bg-none dark:!bg-[#f8f8f8] flex gap-[8px] h-[44px] px-[20px] items-center cursor-pointer rounded-[90px]"
>
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="dark:fill-[#222222] fill-[#f8f8f8]" d="M8 0.5C9.06087 0.5 10.0783 0.921427 10.8284 1.67157C11.5786 2.42172 12 3.43913 12 4.5C12 5.56087 11.5786 6.57828 10.8284 7.32843C10.0783 8.07857 9.06087 8.5 8 8.5C6.93913 8.5 5.92172 8.07857 5.17157 7.32843C4.42143 6.57828 4 5.56087 4 4.5C4 3.43913 4.42143 2.42172 5.17157 1.67157C5.92172 0.921427 6.93913 0.5 8 0.5ZM8 10.5C12.42 10.5 16 12.29 16 14.5V16.5H0V14.5C0 12.29 3.58 10.5 8 10.5Z"
/>
<path class="dark:fill-[#222222] fill-[#f8f8f8]"
d="M8 0.5C9.06087 0.5 10.0783 0.921427 10.8284 1.67157C11.5786 2.42172 12 3.43913 12 4.5C12 5.56087 11.5786 6.57828 10.8284 7.32843C10.0783 8.07857 9.06087 8.5 8 8.5C6.93913 8.5 5.92172 8.07857 5.17157 7.32843C4.42143 6.57828 4 5.56087 4 4.5C4 3.43913 4.42143 2.42172 5.17157 1.67157C5.92172 0.921427 6.93913 0.5 8 0.5ZM8 10.5C12.42 10.5 16 12.29 16 14.5V16.5H0V14.5C0 12.29 3.58 10.5 8 10.5Z"
/>
</svg>
Личный кабинет
</button>
</a>
<div class="mt-[24px] flex items-center gap-[12px] text-[#222] dark:text-[#f8f8f8]">
@@ -93,10 +183,10 @@
</a>
</div>
<div class="mt-[12px] flex gap-[4px]">
<a class="dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="#">
<a class="dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="https://t.me/FakelGym_bot">
<?php display_icon(get_current_room() === 'gym' ? 'tg_dark' : 'tg'); ?>
</a>
<a class="dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="#">
<a class="dark:hover:[&>img]:brightness-90 hover:[&>img]:brightness-150 transition" href="https://wa.me/79832321319">
<?php display_icon(get_current_room() === 'gym' ? 'whatsapp_dark' : 'whatsapp'); ?>
</a>
</div>
@@ -104,14 +194,14 @@
</div>
</div>
<div class="text-[#222] dark:text-[#f8f8f8] font-[500] text-[14px] leading-[125%] grid grid-cols-3 pt-[16px] pb-[16px] border-t border-[#e0e0e0]">
<div class="max-[768px]:grid-cols-1 max-[768px]:gap-[12px] max-[768px]:items-start max-[768px]:justify-start text-[#222] dark:text-[#f8f8f8] font-[500] text-[14px] leading-[125%] grid grid-cols-3 pt-[16px] pb-[16px] border-t border-[#e0e0e0]">
<div class="flex items-center">© 2025 fakelgym.ru. Все права защищены.</div>
<div class="flex items-center justify-center">
<div class="flex items-center justify-center max-[768px]:justify-start">
<a class="hover:!no-underline skip-ink" href="/policy" target="_blank">
Политика Конфиденциальности
</a>
</div>
<div class="flex items-center justify-end">
<div class="flex items-center justify-end max-[768px]:justify-start">
<a href="https://vk.ru/fakelgym" target="_blank">
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">