You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
258 lines
12 KiB
258 lines
12 KiB
{% set current_path = template_path ~ '/modules/footer' %}
|
|
<footer class="footer">
|
|
<div class="wrapper">
|
|
<div class="footer-top">
|
|
<div class="footer-content__wrap">
|
|
<div class="footer-content">
|
|
<a href="/" class="logo">
|
|
<img src="{{ current_path }}/assets/img/logo-green.svg" alt="">
|
|
<span>сosmopet</span>
|
|
</a>
|
|
<p class="footer-content__address">
|
|
{{adres}}
|
|
</p>
|
|
<ul>
|
|
{% for item in email_list %}
|
|
<li>
|
|
<p>{{item.name}}</p>
|
|
<a href="mailto:{{item.email}}">{{item.email}}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="footer-top__link">
|
|
<a href="https://t.me/cosmopet_bot" class="link-black">{{ function('pll_e', 'Чат бот с ветеринаром') }}</a>
|
|
</div>
|
|
</div>
|
|
<form class="footer-contact form-process" action="contact_form">
|
|
<h3 class="footer-contact__title">{{ function('pll_e', 'Форма обратной связи') }}</h3>
|
|
<input name="name" type="text" placeholder="{{ function('pll_e', 'Ваше имя') }}" class="form-inp">
|
|
<input name="email" type="email" placeholder="{{ function('pll_e', 'Эл.почта') }}" class="form-inp">
|
|
<textarea name="message" class="form-textarea" name="" placeholder="{{ function('pll_e', 'Текст обращения') }}" id=""></textarea>
|
|
<input type="hidden" name="from_url" value="{{ current_url }}">
|
|
<input type="hidden" name="form_name" value="Contact form in footer">
|
|
<button class="footer-contact__submit" type="submit">{{ function('pll_e', 'Отправить') }}</button>
|
|
</form>
|
|
</div>
|
|
<div class="footer-bottom">
|
|
<ul class="footer-network">
|
|
{% for item in social %}
|
|
<li>
|
|
<a href="{{item.link}}" target="_blank">
|
|
<img class="social-media__icon" src="{{item.img}}">
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% for item in links %}
|
|
<a href="{{item.link}}">{{item.name}}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
|
|
<!-- Footer end -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mform mform-success" style="display: none;">
|
|
<div class="mform-content">
|
|
<div class="close-button">×</div>
|
|
<h2 class="mform-title">{{ fn('pll_e', 'ВАША ЗАЯВКА ПРИНЯТА!') }}</h2>
|
|
<div class="mform-message">
|
|
<p>{{ fn('pll_e', 'Спасибо! Сообщение успешно отправлено.') }}</p>
|
|
<p>{{ fn('pll_e', 'Наш менеджер скоро свяжемся с вами<br>для уточнения деталей.') }}</p>
|
|
</div>
|
|
|
|
<div class="mform-button-container">
|
|
<a href="/" class="submit-button">{{ fn('pll_e', 'Вернуться на сайт') }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% verbatim %}
|
|
<div class="mform mform-offer modal-offer" style="display: none;">
|
|
<div class="mform-content">
|
|
<div class="close-button">×</div>
|
|
<h2 class="mform-title">ПРЕДЛОЖИТЕ СТАТЬЮ</h2>
|
|
<p class="mform-subtitle">или станьте автором</p>
|
|
|
|
<form class="mform-form form-process" action="contact_form">
|
|
<div class="form-group full-width">
|
|
<input type="text" name="name" placeholder="Ваше имя *" required>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group half-width">
|
|
<input type="tel" name="phone" placeholder="Телефон *" required>
|
|
</div>
|
|
<div class="form-group half-width">
|
|
<input type="text" name="telegram" placeholder="Telegram">
|
|
</div>
|
|
</div>
|
|
<div class="form-group half-width message-container">
|
|
<textarea name="message" placeholder="Текст обращения"></textarea>
|
|
|
|
</div>
|
|
<div class="form-group half-width">
|
|
<button type="submit" class="submit-button">Отправить</button>
|
|
</div>
|
|
<div class="author-image">
|
|
<img src="/wp-content/uploads/2025/06/rectangle.png" alt="Автор">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{% endverbatim %}
|
|
|
|
<script>
|
|
function onTelegramAuth(user) {
|
|
console.log(123)
|
|
var data = {
|
|
action: 'ontelegramauth',
|
|
userid: user.id,
|
|
username: user.username,
|
|
fname: user.first_name,
|
|
lname: user.last_name
|
|
}
|
|
jQuery.ajax({
|
|
type: 'POST',
|
|
url: '/wp-admin/admin-ajax.php',
|
|
data: data,
|
|
success: function(){
|
|
location.href = '/my-account';
|
|
},
|
|
|
|
});
|
|
}
|
|
function linkTelegram(user) {
|
|
var data = {
|
|
action: 'linktelegram',
|
|
userid: user.id,
|
|
username: user.username,
|
|
fname: user.first_name,
|
|
lname: user.last_name
|
|
}
|
|
jQuery.ajax({
|
|
type: 'POST',
|
|
url: '/wp-admin/admin-ajax.php',
|
|
data: data,
|
|
success: function(){
|
|
jQuery('.cabinet-accounts').html('<svg width="40px" height="40px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>');
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Получаем все формы на странице
|
|
const forms = document.querySelectorAll('form');
|
|
|
|
// Текущий URL страницы
|
|
const currentUrl = window.location.href;
|
|
|
|
// Перебираем все формы
|
|
forms.forEach(function(form) {
|
|
// Проверяем, нет ли уже такого поля в форме
|
|
const existingInput = form.querySelector('input[name="url"]');
|
|
if (!existingInput) {
|
|
// Создаем скрытое поле input
|
|
const urlInput = document.createElement('input');
|
|
urlInput.type = 'hidden';
|
|
urlInput.name = 'url';
|
|
urlInput.value = currentUrl;
|
|
|
|
// Добавляем поле в форму
|
|
form.appendChild(urlInput);
|
|
}
|
|
});
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Общая функция для открытия модальных окон
|
|
function modalOpen(triggerSelector, modalSelector) {
|
|
const triggers = document.querySelectorAll(triggerSelector);
|
|
const modalLogin = document.querySelector('.modal');
|
|
const modalItem = document.querySelector(modalSelector);
|
|
const modalAside = modalItem ? modalItem.querySelector('.modal__aside') : null;
|
|
|
|
triggers.forEach(trigger => {
|
|
trigger.addEventListener('click', (e) => {
|
|
e.preventDefault(); // Предотвращаем стандартное поведение
|
|
|
|
// Сбрасываем стили и классы для всех модальных окон
|
|
document.querySelectorAll('.modal__item').forEach(item => {
|
|
item.classList.remove('active');
|
|
item.style.cssText = ''; // Сбрасываем opacity, filter и другие стили
|
|
const aside = item.querySelector('.modal__aside');
|
|
if (aside) {
|
|
aside.style.width = '';
|
|
}
|
|
});
|
|
|
|
// Открываем нужное модальное окно
|
|
if (modalLogin && modalItem) {
|
|
modal.classList.add('active');
|
|
modalItem.classList.add('active');
|
|
modalItem.style.opacity = '1'; // Устанавливаем видимость
|
|
modalItem.style.filter = 'blur(0px)'; // Убираем размытие
|
|
if (modalAside) {
|
|
modalAside.style.width = '500px'; // Устанавливаем ширину
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
// Общая функция для закрытия модальных окон
|
|
function modalClose(closeSelector) {
|
|
const closes = document.querySelectorAll(closeSelector);
|
|
const modalLogin = document.querySelector('.modal');
|
|
|
|
closes.forEach(close => {
|
|
close.addEventListener('click', () => {
|
|
document.querySelectorAll('.modal__item').forEach(item => {
|
|
item.classList.remove('active');
|
|
item.style.cssText = ''; // Сбрасываем opacity, filter и другие стили
|
|
const aside = item.querySelector('.modal__aside');
|
|
if (aside) {
|
|
aside.style.width = '';
|
|
}
|
|
});
|
|
if (modalLogin) {
|
|
modal.classList.remove('active');
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
// Обработчик клика по фону модального окна
|
|
const modalLogin = document.querySelector('.modal');
|
|
if (modalLogin) {
|
|
modal.addEventListener('click', (event) => {
|
|
if (event.target.classList.contains('modal')) {
|
|
const modalItem = modal.querySelector('.modal__item.active');
|
|
if (modalItem) {
|
|
const aside = modalItem.querySelector('.modal__aside');
|
|
if (aside) {
|
|
aside.style.width = '0px';
|
|
}
|
|
modalItem.style.opacity = '0'; // Анимация закрытия
|
|
modalItem.style.filter = 'blur(10px)';
|
|
setTimeout(() => {
|
|
modalItem.classList.remove('active');
|
|
modalItem.style.cssText = ''; // Сбрасываем все стили после анимации
|
|
modal.classList.remove('active');
|
|
}, 300);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
{{ function ('tgScript') }}
|
|
|