Files
tehnobox/resources/views/components/footer.blade.php
ssww23 93a655235a
Some checks failed
Deploy / deploy (push) Has been cancelled
Initial commit
2026-03-10 00:55:37 +03:00

76 lines
3.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@php
$companyName = config('shop.company_name', config('app.name'));
$companyDescription = config('shop.company_description');
$contactPhone = trim((string) config('shop.contact_phone'));
$contactEmail = trim((string) config('shop.contact_email'));
$contactTelegram = trim((string) config('shop.contact_telegram'));
$contactHours = trim((string) config('shop.contact_hours'));
$telegramUrl = '';
$phoneUrl = '';
$emailUrl = '';
if ($contactPhone !== '') {
$phoneUrl = 'tel:' . preg_replace('/[^\d+]/', '', $contactPhone);
}
if ($contactEmail !== '') {
$emailUrl = 'mailto:' . $contactEmail;
}
if ($contactTelegram !== '') {
$telegramUrl = str_starts_with($contactTelegram, 'http://') || str_starts_with($contactTelegram, 'https://')
? $contactTelegram
: 'https://t.me/' . ltrim($contactTelegram, '@/');
}
@endphp
<footer class="pc-footer">
<div class="pc-footer-top">
<div class="pc-footer-brand">
<h3>{{ $companyName }}</h3>
<p>{{ $companyDescription }}</p>
</div>
<div class="pc-footer-columns">
<div class="pc-footer-col">
<h4>Каталог</h4>
<ul class="pc-footer-list">
<li><a href="{{ route('catalog.index') }}">Все категории</a></li>
<li><a href="{{ route('catalog.category', 'processors') }}">Процессоры</a></li>
<li><a href="{{ route('catalog.category', 'graphics-cards') }}">Видеокарты</a></li>
<li><a href="{{ route('catalog.category', 'laptops') }}">Ноутбуки</a></li>
</ul>
</div>
<div class="pc-footer-col">
<h4>Покупателю</h4>
<ul class="pc-footer-list">
<li><a href="{{ route('cart.index') }}">Корзина</a></li>
<li><a href="{{ route('favorites.index') }}">Избранное</a></li>
<li><a href="{{ route('compare.index') }}">Сравнение</a></li>
<li><a href="{{ route('pages.shipping-payment') }}">Доставка и оплата</a></li>
</ul>
</div>
<div class="pc-footer-col">
<h4>Контакты</h4>
<div class="pc-footer-contact">
@if ($phoneUrl !== '')
<span>Телефон: <a href="{{ $phoneUrl }}">{{ $contactPhone }}</a></span>
@endif
@if ($emailUrl !== '')
<span>Email: <a href="{{ $emailUrl }}">{{ $contactEmail }}</a></span>
@endif
@if ($telegramUrl !== '')
<span>Telegram: <a href="{{ $telegramUrl }}" target="_blank" rel="noopener noreferrer">{{ $contactTelegram }}</a></span>
@endif
@if ($contactHours !== '')
<span>{{ $contactHours }}</span>
@endif
</div>
</div>
</div>
</div>
<div class="pc-footer-bottom">
<span>(c) {{ date('Y') }} {{ $companyName }}. Все права защищены.</span>
<span><a href="{{ route('pages.about') }}">О компании</a> / <a href="{{ route('pages.contacts') }}">Контакты</a></span>
</div>
</footer>