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.
175 lines
8.1 KiB
175 lines
8.1 KiB
{% set current_path = template_path ~ '/modules/footer' %}
|
|
<footer class="footer {% if site_region == 'ae' %}footer_ae{% endif %}">
|
|
<div class="footer__wrapper wrapper">
|
|
|
|
|
|
{# Для ОАЭ сайта #}
|
|
{% if site_region == 'ae' %}
|
|
|
|
<div class="footer-content">
|
|
<a href="/" class="logo">
|
|
<img src="/wp-content/themes/cosmopet/static/img/svg/logo/logo-gradient.svg" alt="">
|
|
</a>
|
|
<p class="footer-content__address">
|
|
{{adres}}
|
|
</p>
|
|
<ul class="footer__list">
|
|
{% for item in email_list_ae %}
|
|
<li class="footer-list__item">
|
|
<p>{{item.name}}</p>
|
|
<a href="mailto:{{item.email}}">{{item.email}}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<div class="footer-bottom footer__about">
|
|
<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>
|
|
<a href="/privacy-policy/" class="footer-about__text">Privacy Policy</a>
|
|
<a href="/shipping-policy/" class="footer-about__text">Shipping Policy</a>
|
|
<a href="/terms-conditions/" class="footer-about__text">Terms and Conditions</a>
|
|
</div>
|
|
</div>
|
|
|
|
{% include 'forms/footer-form.twig' %}
|
|
|
|
|
|
{# Для РУ-сайта #}
|
|
{% elseif site_region == 'ru' %}
|
|
|
|
<div class="footer-top">
|
|
<div class="footer-content__wrap">
|
|
<div class="footer-content">
|
|
<a href="/" class="logo">
|
|
<img src="/wp-content/themes/cosmopet/static/img/svg/logo/logo-gradient.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">
|
|
{# {{ dump( social ) }} #}
|
|
{% for item in social %}
|
|
<li>
|
|
<a href="{{item.link}}" target="_blank">
|
|
<img class="social-media__icon" src="{{item.img}}">
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<a href="/privacy-policy/" class="footer-about__text" target="_blank">{{ function('pll_e', 'Соглашение о конфиденциальности') }}</a>
|
|
<a href="/wp-content/uploads/2025/06/declaration_korm.pdf" class="footer-about__text" target="_blank">{{ function('pll_e', 'Декларация соответствия корма') }}</a>
|
|
<a href="/wp-content/uploads/2025/06/declaration_lakomstva.pdf" class="footer-about__text" target="_blank">{{ function('pll_e', 'Декларация соответствия лакомств') }}</a>
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
</div>
|
|
</footer>
|
|
|
|
|
|
<!-- Footer end -->
|
|
|
|
|
|
|
|
{% include 'forms/form-thx.twig' %}
|
|
{% include 'forms/author-form.twig' %}
|
|
|
|
<script>
|
|
{# TO_DO перенсти в модуль соответвующий #}
|
|
|
|
function onTelegramAuth(user) {
|
|
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>');
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
{# TO_DO вынести логику в шаблоны форм на беке, а не через JS переобходить #}
|
|
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);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
{{ function ('tgScript') }}
|
|
|