76 lines
3.6 KiB
PHP
76 lines
3.6 KiB
PHP
@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) :year :company. Все права защищены.', ['year' => date('Y'), 'company' => $companyName]) }}</span>
|
||
<span><a href="{{ route('pages.about') }}">{{ __('О компании') }}</a> / <a href="{{ route('pages.contacts') }}">{{ __('Контакты') }}</a></span>
|
||
</div>
|
||
</footer>
|