full
This commit is contained in:
@@ -10,24 +10,44 @@ $current_url = home_url($_SERVER['REQUEST_URI']);
|
||||
$page_title = get_the_title() ?: 'Главная страница';
|
||||
$form_name = $form_title;
|
||||
|
||||
$room = get_current_room();
|
||||
if ($room === 'gym') {
|
||||
$section_classes = 'bg-cover bg-center bg-no-repeat';
|
||||
$bg_image = get_template_directory_uri() . '/assets/images/form-bg-dark.png';
|
||||
$style_attr = 'style="background-image: url(' . esc_url($bg_image) . ')"';
|
||||
} else {
|
||||
$section_classes = 'bg-cover bg-center bg-no-repeat';
|
||||
$bg_image = get_template_directory_uri() . '/assets/images/form-bg-light.png';
|
||||
$style_attr = 'style="background-image: url(' . esc_url($bg_image) . ')"';
|
||||
}
|
||||
|
||||
$hidden_value = "Форма: {$form_name} | Страница: {$page_title} | URL: {$current_url}";
|
||||
?>
|
||||
|
||||
<section class="container mx-auto mt-[22px]" id="<?php echo esc_attr($unique_id); ?>">
|
||||
<div class="text-[24px] font-[700] mb-[20px] text-[#374151]">
|
||||
<?php echo esc_html($form_title); ?>
|
||||
</div>
|
||||
<section class="mt-[22px] bg-[linear-gradient(180deg,_#f2f2f2_69.59%,_#ededed_100%)] bg-cover" id="<?php echo esc_attr($unique_id); ?> "
|
||||
<?php echo $style_attr; ?>
|
||||
>
|
||||
|
||||
<div class="form-block-wrapper bg-white p-[30px] rounded-[12px] max-w-[300px]"
|
||||
data-form-id="<?php echo esc_attr($form_id); ?>"
|
||||
data-submit-text="<?php echo esc_attr($submit_button_text); ?>"
|
||||
data-hidden-value="<?php echo esc_attr($hidden_value); ?>">
|
||||
<?php echo do_shortcode('[fluentform id="' . esc_attr($form_id) . '"]'); ?>
|
||||
<div class="container mx-auto py-[48px] flex relative">
|
||||
<img class="absolute right-0 bottom-0 pointer-events-none z-0" src="<?php echo esc_url(get_template_directory_uri() . '/assets/images/form-image-trainer.png'); ?>" alt="Изображение тренера">
|
||||
<div class="form-block-wrapper relative z-[1] border border-[2px] border-[#fff] p-[48px] bg-[#f8f8f8] rounded-[32px] w-full max-w-[590px]"
|
||||
data-form-id="<?php echo esc_attr($form_id); ?>"
|
||||
data-submit-text="<?php echo esc_attr($submit_button_text); ?>"
|
||||
data-hidden-value="<?php echo esc_attr($hidden_value); ?>">
|
||||
<h3 class="font-[500] text-[40px] leading-[120%] text-[#222]">Пробная <strong class="font-[700]">персональная
|
||||
тренировка</strong>
|
||||
<span class="bg-[linear-gradient(90deg,_#9d9994_39.42%,_#ccc9c4_92.9%)] rounded-[32px] h-[43px] inline-flex items-center pr-[16px] pl-[16px] font-[600] text-[32px] leading-[115%] text-[#fff]">за 1200 ₽</span>
|
||||
</h3>
|
||||
<p class="mt-[16px] mb-[24px] font-[500] text-[20px] leading-[140%] text-[#222]">Познакомимся, покажем зал и
|
||||
<strong class="font-[600]">подберём
|
||||
оптимальные для вас тренировки!</strong></p>
|
||||
<?php echo do_shortcode('[fluentform id="' . esc_attr($form_id) . '"]'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const section = document.getElementById('<?php echo esc_js($unique_id); ?>');
|
||||
if (!section) return;
|
||||
|
||||
@@ -68,6 +88,6 @@ $hidden_value = "Форма: {$form_name} | Страница: {$page_title} | UR
|
||||
}, 150);
|
||||
}
|
||||
|
||||
block.addEventListener('focusin', updateForm, { once: true });
|
||||
block.addEventListener('focusin', updateForm, {once: true});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user