init
This commit is contained in:
90
modals/modal-club-card.php
Normal file
90
modals/modal-club-card.php
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
<div class="bg-white max-w-lg w-full rounded-[8px]">
|
||||
<div class="p-[24px]">
|
||||
<h2 class="text-[24px] font-bold text-gray-900 mb-[16px]">
|
||||
Заказать клубную карту
|
||||
</h2>
|
||||
|
||||
<form class="space-y-[16px]">
|
||||
<div>
|
||||
<label for="name" class="block text-[14px] font-medium text-gray-700 mb-[8px]">
|
||||
Имя *
|
||||
</label>
|
||||
<input type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
required
|
||||
class="w-full px-[12px] py-[8px] border border-gray-300 rounded-[6px] focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="email" class="block text-[14px] font-medium text-gray-700 mb-[8px]">
|
||||
Email *
|
||||
</label>
|
||||
<input type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
required
|
||||
class="w-full px-[12px] py-[8px] border border-gray-300 rounded-[6px] focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="phone" class="block text-[14px] font-medium text-gray-700 mb-[8px]">
|
||||
Телефон *
|
||||
</label>
|
||||
<input type="tel"
|
||||
id="phone"
|
||||
name="phone"
|
||||
required
|
||||
class="w-full px-[12px] py-[8px] border border-gray-300 rounded-[6px] focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="card-type" class="block text-[14px] font-medium text-gray-700 mb-[8px]">
|
||||
Тип карты
|
||||
</label>
|
||||
<select id="card-type"
|
||||
name="card-type"
|
||||
class="w-full px-[12px] py-[8px] border border-gray-300 rounded-[6px] focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">Выберите тип карты</option>
|
||||
<option value="basic">Базовая</option>
|
||||
<option value="premium">Премиум</option>
|
||||
<option value="vip">VIP</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="message" class="block text-[14px] font-medium text-gray-700 mb-[8px]">
|
||||
Комментарий
|
||||
</label>
|
||||
<textarea id="message"
|
||||
name="message"
|
||||
rows="3"
|
||||
class="w-full px-[12px] py-[8px] border border-gray-300 rounded-[6px] focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
<input type="checkbox"
|
||||
id="agreement"
|
||||
name="agreement"
|
||||
required
|
||||
class="mr-[8px] w-[16px] h-[16px] text-blue-600 border-gray-300 rounded focus:ring-blue-500">
|
||||
<label for="agreement" class="text-[14px] text-gray-700">
|
||||
Я согласен с обработкой персональных данных *
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="flex justify-end gap-[12px] mt-[24px]">
|
||||
<button data-modal-close
|
||||
type="button"
|
||||
class="px-[24px] py-[12px] bg-gray-500 text-white rounded-[6px] hover:bg-gray-600 transition-colors duration-[300ms]">
|
||||
Отмена
|
||||
</button>
|
||||
<button type="submit"
|
||||
class="px-[24px] py-[12px] bg-blue-500 text-white rounded-[6px] hover:bg-blue-600 transition-colors duration-[300ms]">
|
||||
Отправить заявку
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
33
modals/modal-example.php
Normal file
33
modals/modal-example.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
?>
|
||||
<div class="bg-white max-w-lg w-full">
|
||||
<div class="p-6">
|
||||
<h2 class="text-xl font-bold text-gray-900 mb-4">О нашей компании 2</h2>
|
||||
|
||||
<div class="text-gray-600 space-y-4">
|
||||
<p>
|
||||
Мы работаем на рынке более 10 лет и знаем, как решать самые сложные задачи наших клиентов.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Наша команда состоит из опытных специалистов, которые постоянно совершенствуют свои навыки.
|
||||
</p>
|
||||
|
||||
<div class="bg-blue-50 p-4 rounded-lg">
|
||||
<h3 class="font-semibold text-blue-900 mb-2">Наши преимущества:</h3>
|
||||
<ul class="text-blue-800 space-y-1">
|
||||
<li>• Высокое качество работ</li>
|
||||
<li>• Соблюдение сроков</li>
|
||||
<li>• Индивидуальный подход</li>
|
||||
<li>• Конкурентные цены</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-6">
|
||||
<button data-modal-close class="px-6 py-2 rounded-md">
|
||||
Понятно
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
modals/modal-form.php
Normal file
3
modals/modal-form.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
echo do_shortcode('[fluentform id="2"]')
|
||||
?>
|
||||
261
modals/modal-room.php
Normal file
261
modals/modal-room.php
Normal file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Выбор языка (направления) в виде карточек
|
||||
* Необходим плагин Polylang
|
||||
*/
|
||||
|
||||
// Проверяем существование функций Polylang
|
||||
if (!function_exists('pll_languages_list') || !function_exists('pll_current_language')) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<style>
|
||||
.language-selector {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
background: #f5f5f5;
|
||||
border-radius: 20px;
|
||||
padding: 40px 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.language-selector__title {
|
||||
font-size: 42px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
|
||||
.language-selector__subtitle {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
margin: 0 0 40px 0;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.language-cards {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.language-card {
|
||||
padding: 50px 30px;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 320px;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.language-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.language-card--dark {
|
||||
background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.language-card--light {
|
||||
background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.language-card__header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.language-card__title {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.language-card__subtitle {
|
||||
font-size: 16px;
|
||||
opacity: 0.8;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.language-card__content {
|
||||
flex-grow: 1;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.language-card__description {
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
opacity: 0.9;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.language-card__footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.language-card__button {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: inherit;
|
||||
padding: 12px 32px;
|
||||
border-radius: 50px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.language-card--dark .language-card__button {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.language-card--light .language-card__button {
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
border-color: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.language-card__button:hover {
|
||||
transform: translateY(-2px);
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
border-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.language-card--light .language-card__button:hover {
|
||||
background: rgba(0, 0, 0, 0.12);
|
||||
border-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
/* Мобильная адаптация */
|
||||
@media (max-width: 768px) {
|
||||
.language-cards {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.language-selector {
|
||||
padding: 30px 20px;
|
||||
}
|
||||
|
||||
.language-selector__title {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.language-selector__subtitle {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.language-card {
|
||||
padding: 40px 25px;
|
||||
min-height: 280px;
|
||||
}
|
||||
|
||||
.language-card__title {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="language-selector">
|
||||
<h2 class="language-selector__title">Fakel</h2>
|
||||
<p class="language-selector__subtitle">Какое направление<br>вас интересует?</p>
|
||||
|
||||
<div class="language-cards">
|
||||
<?php
|
||||
$languages = pll_languages_list();
|
||||
$current_lang = pll_current_language('slug');
|
||||
|
||||
// Определяем конфигурацию языков
|
||||
$lang_config = array(
|
||||
'fitness' => array(
|
||||
'title' => 'Fakel Fitness',
|
||||
'subtitle' => 'Фитнес-центр',
|
||||
'description' => 'Фитнес-центр мировых стандартов 2500 м². Оборудование из США, большая кардио-зона, более 45 направлений групповых программ, сауна, кафе, зона релакса и мн. др.',
|
||||
'button_text' => 'Фитнес-центр',
|
||||
'style' => 'light'
|
||||
),
|
||||
'gym' => array(
|
||||
'title' => 'Fakel Gym',
|
||||
'subtitle' => 'Тренажерный зал',
|
||||
'description' => 'Пространство для работы с весами, головными тренажерами и ничего лишнего. Идеальное соотношение цены и комфорта, если Вам необходим лишь тренажерный зал.',
|
||||
'button_text' => 'Тренажерный зал',
|
||||
'style' => 'dark'
|
||||
)
|
||||
);
|
||||
|
||||
if ($languages) {
|
||||
foreach ($languages as $lang_slug) {
|
||||
// Получаем URL для языка
|
||||
$lang_url = '';
|
||||
if (function_exists('pll_home_url')) {
|
||||
if (is_singular() && function_exists('pll_get_post')) {
|
||||
$translated_post_id = pll_get_post(get_the_ID(), $lang_slug);
|
||||
if ($translated_post_id) {
|
||||
$lang_url = get_permalink($translated_post_id);
|
||||
} else {
|
||||
$lang_url = pll_home_url($lang_slug);
|
||||
}
|
||||
} else {
|
||||
$lang_url = pll_home_url($lang_slug);
|
||||
}
|
||||
}
|
||||
|
||||
// Используем конфигурацию если есть, иначе дефолтные значения
|
||||
if (isset($lang_config[$lang_slug])) {
|
||||
$config = $lang_config[$lang_slug];
|
||||
} else {
|
||||
// Получаем название языка
|
||||
$lang_names = pll_languages_list(array('fields' => 'name'));
|
||||
$lang_slugs = pll_languages_list(array('fields' => 'slug'));
|
||||
$lang_index = array_search($lang_slug, $lang_slugs);
|
||||
$lang_name = ($lang_index !== false && isset($lang_names[$lang_index]))
|
||||
? $lang_names[$lang_index]
|
||||
: strtoupper($lang_slug);
|
||||
|
||||
$config = array(
|
||||
'title' => $lang_name,
|
||||
'subtitle' => 'Версия сайта',
|
||||
'description' => 'Перейти на ' . $lang_name . ' версию сайта',
|
||||
'button_text' => 'Перейти',
|
||||
'style' => ($lang_slug === 'gym') ? 'dark' : 'light'
|
||||
);
|
||||
}
|
||||
|
||||
echo sprintf(
|
||||
'<a href="%s" class="language-card language-card--%s" data-lang="%s">
|
||||
<div class="language-card__header">
|
||||
<h3 class="language-card__title">%s</h3>
|
||||
<p class="language-card__subtitle">%s</p>
|
||||
</div>
|
||||
<div class="language-card__content">
|
||||
<p class="language-card__description">%s</p>
|
||||
</div>
|
||||
<div class="language-card__footer">
|
||||
<span class="language-card__button">%s</span>
|
||||
</div>
|
||||
</a>',
|
||||
esc_url($lang_url),
|
||||
esc_attr($config['style']),
|
||||
esc_attr($lang_slug),
|
||||
esc_html($config['title']),
|
||||
esc_html($config['subtitle']),
|
||||
esc_html($config['description']),
|
||||
esc_html($config['button_text'])
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
13
modals/modal-time.php
Normal file
13
modals/modal-time.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
?>
|
||||
<div class="bg-white max-w-lg w-full">
|
||||
<div class="p-6">
|
||||
<h2 class="text-xl font-bold text-gray-900 mb-4">Расписание</h2>
|
||||
|
||||
<div class="flex justify-end mt-6">
|
||||
<button data-modal-close class="border w-full">
|
||||
Понятно
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user