This commit is contained in:
GP_DEV
2025-08-01 10:07:08 +03:00
parent 21562852ca
commit 7d7a28e789
54 changed files with 4554 additions and 6928 deletions

View File

@@ -5,6 +5,7 @@ Template Name: Страница клубных карт
get_header();
if (!function_exists('get_club_cards_for_current_language')) {
function get_club_cards_for_current_language()
{
@@ -27,13 +28,21 @@ $cards = get_club_cards_for_current_language();
?>
<section class="pt-[96px]">
<section class="max-[768px]:pt-[45px] pt-[96px]">
<div class="container mx-auto">
<?php if ($cards): ?>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-[24px]">
<div class="max-[768px]:grid-cols-1 max-[1100px]:grid-cols-2 grid grid-cols-3 gap-[24px]">
<?php foreach ($cards as $card): ?>
<div class="bg-[#ffffff] rounded-[12px] p-[28px] pb-[16px] h-[258px] shadow-[0_2px_32px_0_rgba(16,_15,_15,_0.03)]">
<div class="flex flex-col h-full">
<div class="border border-transparent hover:border-[#e21e24] transition max-[1300px]:h-auto max-[1050px]:p-[20px] bg-[#ffffff] rounded-[12px] p-[28px] pb-[16px] h-[258px] shadow-[0_2px_32px_0_rgba(16,_15,_15,_0.03)]">
<div class="flex flex-col h-full relative">
<?php $card_attribute = get_field('attr', $card->ID);
if ($card_attribute): ?>
<div class="max-[768px]:top-[-29px] absolute top-[-14px] right-[-14px] px-[12px] py-[4px] rounded-[32px] bg-[linear-gradient(90deg,_#ffd65a_39.42%,_#ffe595_92.9%)]">
<span class="font-[600] text-[14px] leading-[125%]">
<?php echo($card_attribute); ?>
</span>
</div>
<?php endif; ?>
<div class="flex gap-[16px] items-center">
<?php
$card_image = get_field('image', $card->ID);
@@ -46,7 +55,7 @@ $cards = get_club_cards_for_current_language();
<?php endif; ?>
<?php $card_heading = get_field('heading', $card->ID); ?>
<?php if ($card_heading): ?>
<h3 class="text-[24px] font-[600] leading-[125%]">
<h3 class="max-[768px]:text-[20px] text-[24px] font-[600] leading-[125%]">
<?php echo esc_html($card_heading); ?>
</h3>
<?php endif; ?>
@@ -54,14 +63,14 @@ $cards = get_club_cards_for_current_language();
<?php $card_description = get_field('description', $card->ID); ?>
<?php if ($card_description): ?>
<div class="text-[16px] leading-[145%] font-[500] mt-[16px]">
<div class="min-h-[47px] text-[16px] leading-[145%] font-[500] mt-[16px]">
<?php echo wp_kses_post($card_description); ?>
</div>
<?php endif; ?>
<div class="flex mt-auto pt-[16px] border-t border-t-[#f1f1f1] justify-between items-center gap-[12px] flex-wrap">
<div class="justify-end flex-row-reverse max-[1100px]:mt-[16px] flex mt-auto pt-[16px] border-t border-t-[#f1f1f1] items-center gap-[16px] flex-wrap">
<?php $popup_button = get_field('popup_button', $card->ID); ?>
<?php $card_price = get_field('price', $card->ID) ?: ($card_prices['1_month']['day'] ?? ''); ?>
<?php $card_price = get_field('price', $card->ID) ?: ($card_prices['1_month']['day'] ?? ''); ?>
<?php
$card_prices = [];
if (have_rows('card_prices', $card->ID)) {
@@ -95,29 +104,28 @@ $cards = get_club_cards_for_current_language();
}
}
?>
<div>
<?php if ($card_price): ?>
<div class="flex items-center text-[20px] font-[600] leading-[125%]">
от
<div class="rounded-[32px] px-[12px] h-[36px] flex items-center bg-[linear-gradient(90deg,_rgba(43,_44,_53,_0.06)_39.42%,_rgba(110,_121,_150,_0.06)_92.9%)]">
<span class="bg-[linear-gradient(90deg,_#2b2c35_67.31%,_#4f5870_92.9%)] text-[24px] flex items-center justify-center font-[600] bg-clip-text text-transparent"> <?php echo esc_html($card_price); ?> ₽ </span>
</div>
в день
</div>
<?php endif; ?>
<div class="max-[1300px]:w-full">
<button
data-modal="club-card"
data-card-id="<?php echo $card->ID; ?>"
data-card-title="<?php echo esc_attr($card_heading); ?>"
data-card-prices='<?php echo esc_attr(json_encode($card_prices)); ?>'
data-card-time='<?php echo esc_attr(json_encode($card_time));
?>'
class="red-gradient-hover cursor-pointer flex text-[#f8f8f8] text-[18px] text-[#fff] font-[600] justify-center h-[59px] w-[160px] rounded-[90px] flex items-center">
data-card-time='<?php echo esc_attr(json_encode($card_time)); ?>'
data-card-attr='<?php echo esc_attr($card_attribute); ?>'
class="max-[1300px]:w-full max-[768px]:h-[53px] max-[768px]:text-[16px] red-gradient-hover cursor-pointer flex text-[#f8f8f8] text-[18px] text-[#fff] font-[600] justify-center h-[59px] w-[160px] rounded-[90px] flex items-center">
<?php echo 'Оформить' ?>
</button>
</div>
<?php if ($card_price): ?>
<div class="flex items-center text-[20px] font-[600] leading-[125%]">
от 
<div class="rounded-[32px] px-[12px] h-[36px] flex items-center bg-[linear-gradient(90deg,_rgba(43,_44,_53,_0.06)_39.42%,_rgba(110,_121,_150,_0.06)_92.9%)]">
<span class="bg-[linear-gradient(90deg,_#2b2c35_67.31%,_#4f5870_92.9%)] text-[24px] flex items-center justify-center font-[600] bg-clip-text text-transparent"> <?php echo esc_html($card_price); ?> ₽ </span>
</div>
 в день
</div>
<?php endif; ?>
</div>
</div>
@@ -127,9 +135,9 @@ $cards = get_club_cards_for_current_language();
<?php endif; ?>
</div>
</section>
<section class="pt-[96px]">
<section class="dark:py-[90px] dark:max-[768px]:py-[45px] max-[768px]:pt-[45px] pt-[90px]">
<div class="container mx-auto">
<div class="p-[40px] dark:!border-none radial-gradient rounded-[24px] border-b-[4px] border-r-[0px] border-[#e21e24]"
<div class="max-[768px]:p-[20px] p-[40px] dark:!border-none radial-gradient rounded-[24px] border-b-[4px] border-r-[0px] border-[#e21e24]"
<?php
if (get_current_room() === 'fitness') {
echo ' style="background: linear-gradient(180deg, #f9f9f9 69.59%, #ededed 100%);"';
@@ -138,7 +146,7 @@ $cards = get_club_cards_for_current_language();
}
?>
>
<h2 class="font-[500] text-[32px] leading-[115%] text-[#222] dark:text-[#f8f8f8]">
<h2 class="max-[768px]:text-[20px] font-[500] text-[32px] leading-[115%] text-[#222] dark:text-[#f8f8f8]">
<strong>В клубные карты</strong> входит
</h2>
<div class="mt-[24px] flex flex-wrap gap-[12px] w-full">
@@ -531,7 +539,7 @@ $cards = get_club_cards_for_current_language();
$card_svg = $card['svg'];
$card_heading = $card['heading'];
?>
<div class="small-shadow w-full bg-[#f8f8f8] rounded-[12px] border border-[#fff] h-[78px] max-w-[301px] px-[24px] flex items-center gap-[12px]">
<div class="max-[768px]:px-[16px] max-[768px]:max-w-full small-shadow w-full bg-[#f8f8f8] rounded-[12px] border border-[#fff] h-[78px] max-w-[301px] px-[24px] flex items-center gap-[12px]">
<div class="[&>svg]:min-w-fit"> <?php echo $card_svg; ?></div>
<div class="flex items-center gap-[8px] text-[16px] font-[600] leading-[145%] text-[#222]">
<?php echo $card_heading; ?>
@@ -737,32 +745,42 @@ $additional_services = [
'description' => 'Для спортсменов на территории клуба так же находится магазин спортивного питания. Широкий ассортимент порадует даже профессионалов и не даст уйти с пустыми руками!'
]
];
?>
<section class="py-[96px]">
$excluded_for_gym = [2, 3, 4];
$current_room = get_current_room();
if ($current_room === 'gym') {
foreach (array_reverse($excluded_for_gym) as $index) {
unset($additional_services[$index]);
}
$additional_services = array_values($additional_services);
}
if ($current_room === 'fitness') {
?>
<section class="max-[768px]:py-[45px] py-[90px]">
<div class="container mx-auto">
<div class="mt-[24px] grid grid-cols-3 gap-[24px]">
<div class="flex flex-col gap-[32px] [&>img]:w-[294px] mt-[28px]">
<?php display_icon(get_current_room() === 'gym' ? 'dark_logo_name_gym' : 'light_logo_name'); ?>
<h2 class="text-[40px] leading-[120%] font-[500]"><strong>Дополнительные</strong>
услуги</h2>
<div class="max-[768px]:grid-cols-1 max-[1300px]:grid-cols-2 mt-[24px] grid grid-cols-3 gap-[24px]">
<div class="max-[768px]:px-[20px] max-[1050px]:h-auto h-[305px]">
<div class="max-[768px]:mt-0 flex flex-col h-full gap-[16px] [&>img]:w-[294px] max-[768px]:[&>img]:w-fit mt-[20px]">
<?php display_icon(get_current_room() === 'gym' ? 'dark_logo_name_gym' : 'light_logo_name'); ?>
<h2 class="max-[1050px]:text-[36px] max-[768px]:max-[768px]:text-[24px] text-[40px] leading-[120%] font-[500]">
<strong>Дополнительные</strong> услуги</h2>
</div>
</div>
<?php foreach ($additional_services as $service): ?>
<div class="bg-[#ffffff] rounded-[12px] p-[28px] pb-[16px] h-[305px] shadow-[0_2px_32px_0_rgba(16,_15,_15,_0.03)]">
<div class="max-[768px]:px-[20px] max-[1050px]:h-auto bg-[#ffffff] rounded-[12px] p-[28px] pb-[16px] h-[305px] shadow-[0_2px_32px_0_rgba(16,_15,_15,_0.03)]">
<div class="flex flex-col h-full gap-[12px]">
<div class="flex flex-col gap-[24px]">
<div class="overflow-hidden mx-auto [&>svg]:min-w-fit w-[76px] h-[76px] grid place-items-center rounded-[12px] radial-gradient small-shadow">
<div class="max-[768px]:gap-[16px] flex flex-col gap-[24px]">
<div class="max-[768px]:mx-0 overflow-hidden [&>svg]:min-w-fit w-[76px] h-[76px] grid place-items-center rounded-[12px] radial-gradient small-shadow">
<?php echo $service['svg']; ?>
</div>
<h3 class="text-[24px] font-[600] leading-[125%]">
<h3 class="max-[768px]:text-[20px] text-[24px] font-[600] leading-[125%]">
<?php echo esc_html($service['heading']); ?>
</h3>
</div>
<div class="text-[16px] leading-[145%] font-[500] text-[#6c6b6b]">
<div class="max-[768px]:text-[15px] text-[16px] leading-[145%] font-[500] text-[#6c6b6b]">
<?php echo esc_html($service['description']); ?>
</div>
</div>
@@ -771,5 +789,10 @@ $additional_services = [
</div>
</div>
</section>
<?php
}
?>
<?php get_footer(); ?>