Files
tehnobox/resources/views/pages/contacts.blade.php
ssww23 0ee9f05416
Some checks failed
Deploy / deploy (push) Has been cancelled
1
2026-03-17 01:59:00 +03:00

82 lines
3.8 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.
@extends('layouts.shop')
@section('meta_title', __('Контакты'))
@section('meta_description', __('Контакты магазина: телефон, email, адрес и часы работы поддержки.'))
@section('meta_keywords', __('контакты магазина, телефон, email, адрес'))
@section('meta_canonical', route('pages.contacts'))
@section('content')
@php
$companyName = config('shop.company_name', config('app.name'));
$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
@include('partials.breadcrumbs', [
'items' => [
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Контакты'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>{{ __('Поможем с вашей сборкой.') }}</h2>
<p>{{ __('Оставьте заявку — поможем подобрать комплектующие и ответим по доставке.') }}</p>
</div>
<div class="pc-grid pc-grid-2">
<article class="pc-card">
<div class="pc-card-meta">{{ __('Поддержка') }}</div>
<h3>{{ __(':company — поддержка клиентов', ['company' => $companyName]) }}</h3>
@if ($phoneUrl !== '')
<p>{{ __('Телефон:') }} <a class="pc-contact-link" href="{{ $phoneUrl }}">{{ $contactPhone }}</a></p>
@endif
@if ($emailUrl !== '')
<p>{{ __('Почта:') }} <a class="pc-contact-link" href="{{ $emailUrl }}">{{ $contactEmail }}</a></p>
@endif
@if ($telegramUrl !== '')
<p>Telegram: <a class="pc-contact-link" href="{{ $telegramUrl }}" target="_blank" rel="noopener noreferrer">{{ $contactTelegram }}</a></p>
@endif
@if ($contactHours !== '')
<p>{{ __('Часы:') }} {{ $contactHours }}</p>
@endif
</article>
<form class="pc-card pc-form" method="post" action="{{ route('pages.contacts.submit') }}">
@csrf
<label>
{{ __('Имя') }}
<input type="text" name="name" value="{{ old('name') }}" placeholder="{{ __('Ваше имя') }}" required />
</label>
<label>
{{ __('Почта') }}
<input type="email" name="email" value="{{ old('email') }}" placeholder="mail@example.com" required />
</label>
<label>
{{ __('Сообщение') }}
<textarea name="message" placeholder="{{ __('Расскажите о вашей сборке') }}" required>{{ old('message') }}</textarea>
</label>
<button type="submit" class="pc-btn primary">{{ __('Отправить сообщение') }}</button>
</form>
</div>
</section>
@endsection