1
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
ssww23
2026-03-17 01:59:00 +03:00
parent 93a655235a
commit 0ee9f05416
48 changed files with 1193 additions and 413 deletions

View File

@@ -3,24 +3,24 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Личный кабинет', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Личный кабинет'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Личный кабинет</h2>
<p>Управляйте данными профиля и просматривайте историю заказов.</p>
<h2>{{ __('Личный кабинет') }}</h2>
<p>{{ __('Управляйте данными профиля и просматривайте историю заказов.') }}</p>
</div>
<div class="pc-grid pc-grid-2">
<div class="pc-card">
<form class="pc-form" method="post" action="{{ route('account.update') }}">
@csrf
<h3>Данные аккаунта</h3>
<h3>{{ __('Данные аккаунта') }}</h3>
<label>
Имя
{{ __('Имя') }}
<input type="text" name="name" value="{{ old('name', $user->name) }}" required>
</label>
<label>
@@ -28,25 +28,25 @@
<input type="email" name="email" value="{{ old('email', $user->email) }}" required>
</label>
<div class="pc-product-actions">
<button class="pc-btn primary" type="submit">Сохранить</button>
<button class="pc-btn primary" type="submit">{{ __('Сохранить') }}</button>
</div>
</form>
<form method="post" action="{{ route('logout') }}">
@csrf
<button class="pc-btn ghost" type="submit">Выйти</button>
<button class="pc-btn ghost" type="submit">{{ __('Выйти') }}</button>
</form>
</div>
<div class="pc-card">
<h3>Мои заказы</h3>
<h3>{{ __('Мои заказы') }}</h3>
@if ($orders->isEmpty())
<p>Пока нет заказов.</p>
<a class="pc-btn ghost" href="{{ route('catalog.index') }}">Перейти в каталог</a>
<p>{{ __('Пока нет заказов.') }}</p>
<a class="pc-btn ghost" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
@else
<div class="pc-account-orders">
@foreach ($orders as $order)
<a class="pc-account-order" href="{{ route('account.orders.show', $order) }}">
<span>Заказ #{{ $order->id }}</span>
<span>{{ __('Заказ #:number', ['number' => $order->id]) }}</span>
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
</a>
@endforeach

View File

@@ -3,15 +3,15 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Вход', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Вход'), 'url' => null],
],
])
<section class="pc-section pc-auth-section">
<div class="pc-section-title">
<h2>Вход</h2>
<p>Введите email и пароль для доступа к заказам и профилю.</p>
<h2>{{ __('Вход') }}</h2>
<p>{{ __('Введите email и пароль для доступа к заказам и профилю.') }}</p>
</div>
<form class="pc-card pc-form pc-auth-form" method="post" action="{{ route('login.attempt') }}">
@@ -21,20 +21,20 @@
<input type="email" name="email" value="{{ old('email') }}" required>
</label>
<label>
Пароль
{{ __('Пароль') }}
<input type="password" name="password" required>
</label>
<label>
Капча: решите пример {{ $captchaQuestion }}
{{ __('Капча: решите пример :question', ['question' => $captchaQuestion]) }}
<input type="text" name="captcha" inputmode="numeric" autocomplete="off" required>
</label>
<label class="pc-checkbox">
<input type="checkbox" name="remember" value="1" @checked(old('remember'))>
<span>Запомнить меня</span>
<span>{{ __('Запомнить меня') }}</span>
</label>
<div class="pc-product-actions">
<button class="pc-btn primary" type="submit">Войти</button>
<a class="pc-btn ghost" href="{{ route('register') }}">Создать аккаунт</a>
<button class="pc-btn primary" type="submit">{{ __('Войти') }}</button>
<a class="pc-btn ghost" href="{{ route('register') }}">{{ __('Создать аккаунт') }}</a>
</div>
</form>
</section>

View File

@@ -3,21 +3,21 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Регистрация', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Регистрация'), 'url' => null],
],
])
<section class="pc-section pc-auth-section">
<div class="pc-section-title">
<h2>Регистрация</h2>
<p>Создайте аккаунт, чтобы отслеживать заказы и сохранять избранное.</p>
<h2>{{ __('Регистрация') }}</h2>
<p>{{ __('Создайте аккаунт, чтобы отслеживать заказы и сохранять избранное.') }}</p>
</div>
<form class="pc-card pc-form pc-auth-form" method="post" action="{{ route('register.store') }}">
@csrf
<label>
Имя
{{ __('Имя') }}
<input type="text" name="name" value="{{ old('name') }}" required>
</label>
<label>
@@ -25,20 +25,20 @@
<input type="email" name="email" value="{{ old('email') }}" required>
</label>
<label>
Пароль
{{ __('Пароль') }}
<input type="password" name="password" required>
</label>
<label>
Подтверждение пароля
{{ __('Подтверждение пароля') }}
<input type="password" name="password_confirmation" required>
</label>
<label>
Капча: решите пример {{ $captchaQuestion }}
{{ __('Капча: решите пример :question', ['question' => $captchaQuestion]) }}
<input type="text" name="captcha" inputmode="numeric" autocomplete="off" required>
</label>
<div class="pc-product-actions">
<button class="pc-btn primary" type="submit">Зарегистрироваться</button>
<a class="pc-btn ghost" href="{{ route('login') }}">Уже есть аккаунт</a>
<button class="pc-btn primary" type="submit">{{ __('Зарегистрироваться') }}</button>
<a class="pc-btn ghost" href="{{ route('login') }}">{{ __('Уже есть аккаунт') }}</a>
</div>
</form>
</section>

View File

@@ -3,21 +3,21 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Корзина', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Корзина'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Товары в корзине</h2>
<h2>{{ __('Товары в корзине') }}</h2>
</div>
@if ($items->isEmpty())
<div class="pc-card">
<h3>Корзина пустая</h3>
<p>Добавьте товары из каталога, чтобы оформить заказ.</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
<h3>{{ __('Корзина пустая') }}</h3>
<p>{{ __('Добавьте товары из каталога, чтобы оформить заказ.') }}</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
</div>
@else
<div class="pc-cart-layout">
@@ -38,13 +38,13 @@
@csrf
@method('patch')
<input type="number" name="quantity" min="1" max="{{ max(1, $product->stock) }}" value="{{ $item['quantity'] }}">
<button class="pc-btn ghost" type="submit">Обновить</button>
<button class="pc-btn ghost" type="submit">{{ __('Обновить') }}</button>
</form>
<strong class="pc-cart-subtotal">{{ number_format($item['subtotal'], 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
<form method="post" action="{{ route('cart.remove', $product) }}" data-preserve-scroll="true">
@csrf
@method('delete')
<button class="pc-btn ghost" type="submit">Удалить</button>
<button class="pc-btn ghost" type="submit">{{ __('Удалить') }}</button>
</form>
</div>
</article>
@@ -52,16 +52,16 @@
</div>
<aside class="pc-card pc-cart-summary">
<h3>Итого</h3>
<h3>{{ __('Итого') }}</h3>
<div class="pc-cart-summary-row">
<span>Товаров</span>
<span>{{ __('Товаров') }}</span>
<strong>{{ $itemsCount }}</strong>
</div>
<div class="pc-cart-summary-row">
<span>Сумма</span>
<span>{{ __('Сумма') }}</span>
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
</div>
<a class="pc-btn primary" href="{{ route('checkout.show') }}">Перейти к оформлению</a>
<a class="pc-btn primary" href="{{ route('checkout.show') }}">{{ __('Перейти к оформлению') }}</a>
</aside>
</div>
@endif

View File

@@ -9,15 +9,15 @@
'@type' => 'ListItem',
'position' => $index + 1,
'url' => route('catalog.category', $category),
'name' => $category->name,
'name' => __($category->name),
])
->all();
$catalogSchema = [
'@context' => 'https://schema.org',
'@type' => 'CollectionPage',
'name' => 'Каталог товаров',
'name' => __('Каталог товаров'),
'url' => route('catalog.index'),
'description' => 'Каталог компьютерных комплектующих и техники.',
'description' => __('Каталог компьютерных комплектующих и техники.'),
'mainEntity' => [
'@type' => 'ItemList',
'numberOfItems' => count($catalogCategoryList),
@@ -25,14 +25,14 @@
],
];
@endphp
@section('meta_title', $searchQuery !== '' ? "Поиск: {$searchQuery}" : 'Каталог товаров')
@section('meta_title', $searchQuery !== '' ? __('Поиск: :query', ['query' => $searchQuery]) : __('Каталог товаров'))
@section(
'meta_description',
$searchQuery !== ''
? "Результаты поиска по запросу «{$searchQuery}». Подберите нужные комплектующие по наименованию."
: 'Каталог компьютерных комплектующих: процессоры, материнские платы, видеокарты, память, накопители и ноутбуки.'
? __('Результаты поиска по запросу «:query». Подберите нужные комплектующие по наименованию.', ['query' => $searchQuery])
: __('Каталог компьютерных комплектующих: процессоры, материнские платы, видеокарты, память, накопители и ноутбуки.')
)
@section('meta_keywords', 'каталог комплектующих, поиск товаров, процессоры, материнские платы, видеокарты')
@section('meta_keywords', __('каталог комплектующих, поиск товаров, процессоры, материнские платы, видеокарты'))
@section('meta_canonical', route('catalog.index'))
@section('meta_robots', $hasCatalogQuery ? 'noindex,follow' : 'index,follow')
@@ -45,24 +45,24 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Каталог', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Каталог'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Категории товаров</h2>
<h2>{{ __('Категории товаров') }}</h2>
</div>
<div class="pc-grid pc-grid-4 pc-category-grid">
@forelse ($categories as $category)
<a class="pc-card pc-category-card pc-category-link" href="{{ route('catalog.category', $category) }}">
<div class="pc-category-image" role="img" aria-label="{{ $category->name }}"></div>
<h3 class="pc-category-title">{{ $category->name }}</h3>
<div class="pc-category-image" role="img" aria-label="{{ __($category->name) }}"></div>
<h3 class="pc-category-title">{{ __($category->name) }}</h3>
</a>
@empty
<div class="pc-card">Категории пока не добавлены.</div>
<div class="pc-card">{{ __('Категории пока не добавлены.') }}</div>
@endforelse
</div>
</section>
@@ -71,16 +71,16 @@
<section class="pc-section">
<div class="pc-category-toolbar">
<div class="pc-section-title">
<h2>Результаты по запросу: "{{ request('q') }}"</h2>
<h2>{{ __('Результаты по запросу: ":query"', ['query' => request('q')]) }}</h2>
</div>
<p class="pc-muted">Найдено: <strong>{{ $products->total() }}</strong></p>
<p class="pc-muted">{{ __('Найдено:') }} <strong>{{ $products->total() }}</strong></p>
</div>
<div class="pc-products-grid">
@forelse ($products as $product)
@include('partials.product-card', ['product' => $product])
@empty
<div class="pc-card">По вашему запросу ничего не найдено.</div>
<div class="pc-card">{{ __('По вашему запросу ничего не найдено.') }}</div>
@endforelse
</div>

View File

@@ -1,6 +1,8 @@
@extends('layouts.shop')
@php
$translatedCategoryName = __($category->name);
$translatedCategoryDescription = $category->description ? __($category->description) : __('Категория товаров :category', ['category' => $translatedCategoryName]);
$hasSeoFilters = request()->filled('q')
|| request()->filled('sort')
|| request()->filled('page')
@@ -24,9 +26,9 @@
$categorySchema = [
'@context' => 'https://schema.org',
'@type' => 'CollectionPage',
'name' => $category->name,
'name' => $translatedCategoryName,
'url' => route('catalog.category', $category),
'description' => $category->description ?: 'Категория товаров ' . $category->name,
'description' => $translatedCategoryDescription,
'mainEntity' => [
'@type' => 'ItemList',
'numberOfItems' => $products->total(),
@@ -35,9 +37,9 @@
];
@endphp
@section('meta_title', $category->name)
@section('meta_description', ($category->description ?: 'Товары категории ' . $category->name . '.') . ' Фильтры и сортировка для быстрого подбора.')
@section('meta_keywords', $category->name . ', комплектующие, купить, фильтры товаров')
@section('meta_title', $translatedCategoryName)
@section('meta_description', __('Товары категории :category. Фильтры и сортировка для быстрого подбора.', ['category' => $translatedCategoryName]))
@section('meta_keywords', __(':category, комплектующие, купить, фильтры товаров', ['category' => $translatedCategoryName]))
@section('meta_canonical', route('catalog.category', $category))
@section('meta_robots', $hasSeoFilters ? 'noindex,follow' : 'index,follow')
@@ -50,15 +52,15 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Каталог', 'url' => route('catalog.index')],
['label' => $category->name, 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Каталог'), 'url' => route('catalog.index')],
['label' => $translatedCategoryName, 'url' => null],
],
])
<section class="pc-section pc-category-page">
<div class="pc-section-title">
<h2>{{ $category->name }}</h2>
<h2>{{ $translatedCategoryName }}</h2>
</div>
@php
@@ -69,7 +71,7 @@
if (request()->filled('price_from') || request()->filled('price_to')) {
$priceFromLabel = trim((string) request('price_from', ''));
$priceToLabel = trim((string) request('price_to', ''));
$activeFilters->push("Цена: {$priceFromLabel} - {$priceToLabel}");
$activeFilters->push(__('Цена: :from - :to', ['from' => $priceFromLabel, 'to' => $priceToLabel]));
}
foreach ((array) ($filters ?? []) as $filter) {
@@ -90,12 +92,16 @@
$fromLabel = trim((string) request($fromParam, ''));
$toLabel = trim((string) request($toParam, ''));
$activeFilters->push(($filter['label'] ?? $rangeKey) . ": {$fromLabel} - {$toLabel}");
$activeFilters->push(__(':label: :from - :to', [
'label' => __($filter['label'] ?? $rangeKey),
'from' => $fromLabel,
'to' => $toLabel,
]));
}
@endphp
<div class="pc-category-toolbar">
<p class="pc-muted">Найдено товаров: <strong>{{ $products->total() }}</strong></p>
<p class="pc-muted">{{ __('Найдено товаров:') }} <strong>{{ $products->total() }}</strong></p>
<div class="pc-category-toolbar-controls">
<form class="pc-sort-form" method="get">
@foreach ((array) ($appliedFilters ?? []) as $key => $value)
@@ -124,12 +130,12 @@
@if (request()->filled('q'))
<input type="hidden" name="q" value="{{ request('q') }}">
@endif
<label for="sort">Сортировка:</label>
<label for="sort">{{ __('Сортировка:') }}</label>
<select id="sort" name="sort" onchange="this.form.submit()">
<option value="newest" @selected($sort === 'newest')>Сначала новые</option>
<option value="price_asc" @selected($sort === 'price_asc')>Сначала дешевле</option>
<option value="price_desc" @selected($sort === 'price_desc')>Сначала дороже</option>
<option value="name_asc" @selected($sort === 'name_asc')>По названию</option>
<option value="newest" @selected($sort === 'newest')>{{ __('Сначала новые') }}</option>
<option value="price_asc" @selected($sort === 'price_asc')>{{ __('Сначала дешевле') }}</option>
<option value="price_desc" @selected($sort === 'price_desc')>{{ __('Сначала дороже') }}</option>
<option value="name_asc" @selected($sort === 'name_asc')>{{ __('По названию') }}</option>
</select>
</form>
<button
@@ -142,7 +148,7 @@
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M4 6h16v2H4V6zm3 5h10v2H7v-2zm3 5h4v2h-4v-2z"></path>
</svg>
<span>Фильтр</span>
<span>{{ __('Фильтр') }}</span>
@if ($activeFilters->isNotEmpty())
<span class="pc-filter-toggle-count">{{ $activeFilters->count() }}</span>
@endif
@@ -161,7 +167,7 @@
<aside class="pc-filters">
<div id="pc-category-filters" class="pc-filter-details {{ $activeFilters->isNotEmpty() ? 'is-open' : '' }}">
<form method="get">
<div class="pc-filter-title">Фильтры</div>
<div class="pc-filter-title">{{ __('Фильтры') }}</div>
@if ($sort !== 'newest')
<input type="hidden" name="sort" value="{{ $sort }}">
@endif
@@ -169,7 +175,7 @@
<input type="hidden" name="q" value="{{ request('q') }}">
@endif
<label class="pc-filter-block">
<span>Цена</span>
<span>{{ __('Цена') }}</span>
<div class="pc-range-fields">
<input
type="number"
@@ -178,7 +184,7 @@
value="{{ $priceFilter['from'] ?? '' }}"
@if (!empty($priceFilter['min'])) min="{{ $priceFilter['min'] }}" @endif
@if (!empty($priceFilter['max'])) max="{{ $priceFilter['max'] }}" @endif
placeholder="От"
placeholder="{{ __('От') }}"
>
<input
type="number"
@@ -187,7 +193,7 @@
value="{{ $priceFilter['to'] ?? '' }}"
@if (!empty($priceFilter['min'])) min="{{ $priceFilter['min'] }}" @endif
@if (!empty($priceFilter['max'])) max="{{ $priceFilter['max'] }}" @endif
placeholder="До"
placeholder="{{ __('До') }}"
>
</div>
</label>
@@ -200,7 +206,7 @@
@continue($filterKey === '')
@if ($isRangeFilter)
<label class="pc-filter-block">
<span>{{ $filter['label'] }}</span>
<span>{{ __($filter['label']) }}</span>
<div class="pc-range-fields">
<input
type="number"
@@ -209,7 +215,7 @@
value="{{ $rangeData['from'] ?? '' }}"
@if (!empty($rangeData['min'])) min="{{ $rangeData['min'] }}" @endif
@if (!empty($rangeData['max'])) max="{{ $rangeData['max'] }}" @endif
placeholder="От"
placeholder="{{ __('От') }}"
>
<input
type="number"
@@ -218,33 +224,33 @@
value="{{ $rangeData['to'] ?? '' }}"
@if (!empty($rangeData['min'])) min="{{ $rangeData['min'] }}" @endif
@if (!empty($rangeData['max'])) max="{{ $rangeData['max'] }}" @endif
placeholder="До"
placeholder="{{ __('До') }}"
>
</div>
</label>
@else
<label class="pc-filter-block">
<span>{{ $filter['label'] }}</span>
<span>{{ __($filter['label']) }}</span>
<select name="filters[{{ $filterKey }}]">
<option value="">Все</option>
<option value="">{{ __('Все') }}</option>
@foreach ($filterOptions[$filterKey] ?? [] as $option)
@php
$optionValue = trim((string) $option);
@endphp
@continue($optionValue === '')
<option value="{{ $optionValue }}" @selected(($appliedFilters[$filterKey] ?? '') === $optionValue)>
{{ $optionValue }}
{{ __($optionValue) }}
</option>
@endforeach
</select>
</label>
@endif
@empty
<p class="pc-muted">Для этой категории фильтры пока не заданы.</p>
<p class="pc-muted">{{ __('Для этой категории фильтры пока не заданы.') }}</p>
@endforelse
<div class="pc-filter-actions">
<button type="submit" class="pc-btn primary">Показать</button>
<a class="pc-btn ghost" href="{{ route('catalog.category', $category) }}">Сбросить</a>
<button type="submit" class="pc-btn primary">{{ __('Показать') }}</button>
<a class="pc-btn ghost" href="{{ route('catalog.category', $category) }}">{{ __('Сбросить') }}</a>
</div>
</form>
</div>
@@ -254,7 +260,7 @@
@forelse ($products as $product)
@include('partials.product-card', ['product' => $product])
@empty
<div class="pc-card">Пока нет товаров в этой категории.</div>
<div class="pc-card">{{ __('Пока нет товаров в этой категории.') }}</div>
@endforelse
</div>
</div>

View File

@@ -3,22 +3,22 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Корзина', 'url' => route('cart.index')],
['label' => 'Данные получателя', 'url' => route('checkout.show')],
['label' => 'Реквизиты для оплаты', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Корзина'), 'url' => route('cart.index')],
['label' => __('Данные получателя'), 'url' => route('checkout.show')],
['label' => __('Реквизиты для оплаты'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Реквизиты для оплаты</h2>
<p>Переведите сумму заказа по реквизитам ниже и подтвердите оформление.</p>
<h2>{{ __('Реквизиты для оплаты') }}</h2>
<p>{{ __('Переведите сумму заказа по реквизитам ниже и подтвердите оформление.') }}</p>
</div>
<div class="pc-cart-layout">
<div class="pc-card">
<h3>Данные получателя</h3>
<h3>{{ __('Данные получателя') }}</h3>
<p><strong>{{ $customer['customer_name'] }}</strong></p>
<p>{{ $customer['email'] }}</p>
@if (!empty($customer['phone']))
@@ -26,16 +26,16 @@
@endif
<p>{{ $customer['address'] }}</p>
@if (!empty($customer['comment']))
<p>Комментарий: {{ $customer['comment'] }}</p>
<p>{{ __('Комментарий:') }} {{ $customer['comment'] }}</p>
@endif
<div class="pc-product-actions">
<a class="pc-btn ghost" href="{{ route('checkout.show') }}">Изменить данные</a>
<a class="pc-btn ghost" href="{{ route('checkout.show') }}">{{ __('Изменить данные') }}</a>
</div>
</div>
<aside class="pc-card pc-cart-summary">
<h3>Ваш заказ</h3>
<h3>{{ __('Ваш заказ') }}</h3>
<div class="pc-account-orders">
@foreach ($items as $item)
<div class="pc-account-order">
@@ -45,11 +45,11 @@
@endforeach
</div>
<div class="pc-cart-summary-row">
<span>Товаров</span>
<span>{{ __('Товаров') }}</span>
<strong>{{ $itemsCount }}</strong>
</div>
<div class="pc-cart-summary-row">
<span>Итого</span>
<span>{{ __('Итого') }}</span>
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
</div>
</aside>
@@ -57,13 +57,13 @@
@include('partials.payment-requisites', [
'amount' => $total,
'purpose' => 'Номер заказа будет присвоен после подтверждения',
'purpose' => __('Номер заказа будет присвоен после подтверждения'),
'showHelp' => true,
])
<form method="post" action="{{ route('checkout.store') }}">
@csrf
<button class="pc-btn primary" type="submit">Подтвердить оформление заказа</button>
<button class="pc-btn primary" type="submit">{{ __('Подтвердить оформление заказа') }}</button>
</form>
</section>
@endsection

View File

@@ -3,28 +3,28 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Заказ оформлен', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Заказ оформлен'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-card">
<h2>Заказ {{ $order->id }} успешно оформлен</h2>
<p>Мы приняли заказ в обработку. Статус заказа: <strong>{{ $order->status }}</strong>.</p>
<p>Способ оплаты: <strong>{{ $order->payment_method_label }}</strong>.</p>
<p>Сумма заказа: <strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>.</p>
<h2>{{ __('Заказ №:number успешно оформлен', ['number' => $order->id]) }}</h2>
<p>{{ __('Мы приняли заказ в обработку. Статус заказа:') }} <strong>{{ $order->status_label }}</strong>.</p>
<p>{{ __('Способ оплаты:') }} <strong>{{ $order->payment_method_label }}</strong>.</p>
<p>{{ __('Сумма заказа:') }} <strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>.</p>
@include('partials.payment-requisites', [
'amount' => $order->total,
'purpose' => 'Заказ #' . $order->id,
'purpose' => __('Заказ #:number', ['number' => $order->id]),
'showHelp' => true,
])
<div class="pc-product-actions">
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Продолжить покупки</a>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Продолжить покупки') }}</a>
@auth
<a class="pc-btn ghost" href="{{ route('account.orders.show', $order) }}">Открыть заказ</a>
<a class="pc-btn ghost" href="{{ route('account.orders.show', $order) }}">{{ __('Открыть заказ') }}</a>
@endauth
</div>
</div>

View File

@@ -3,23 +3,23 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Корзина', 'url' => route('cart.index')],
['label' => 'Данные получателя', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Корзина'), 'url' => route('cart.index')],
['label' => __('Данные получателя'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Данные получателя</h2>
<p>Заполните контакты и перейдите на страницу с реквизитами для оплаты.</p>
<h2>{{ __('Данные получателя') }}</h2>
<p>{{ __('Заполните контакты и перейдите на страницу с реквизитами для оплаты.') }}</p>
</div>
<div class="pc-cart-layout">
<form class="pc-card pc-form" method="post" action="{{ route('checkout.prepare') }}">
@csrf
<label>
Имя получателя
{{ __('Имя получателя') }}
<input type="text" name="customer_name" value="{{ old('customer_name', session('checkout.customer.customer_name', auth()->user()->name ?? '')) }}" required>
</label>
<label>
@@ -27,22 +27,22 @@
<input type="email" name="email" value="{{ old('email', session('checkout.customer.email', auth()->user()->email ?? '')) }}" required>
</label>
<label>
Телефон
{{ __('Телефон') }}
<input type="text" name="phone" value="{{ old('phone', session('checkout.customer.phone')) }}">
</label>
<label>
Адрес доставки
{{ __('Адрес доставки') }}
<textarea name="address" required>{{ old('address', session('checkout.customer.address')) }}</textarea>
</label>
<label>
Комментарий к заказу
{{ __('Комментарий к заказу') }}
<textarea name="comment">{{ old('comment', session('checkout.customer.comment')) }}</textarea>
</label>
<button class="pc-btn primary" type="submit">Перейти к реквизитам</button>
<button class="pc-btn primary" type="submit">{{ __('Перейти к реквизитам') }}</button>
</form>
<aside class="pc-card pc-cart-summary">
<h3>Ваш заказ</h3>
<h3>{{ __('Ваш заказ') }}</h3>
<div class="pc-account-orders">
@foreach ($items as $item)
<div class="pc-account-order">
@@ -52,11 +52,11 @@
@endforeach
</div>
<div class="pc-cart-summary-row">
<span>Товаров</span>
<span>{{ __('Товаров') }}</span>
<strong>{{ $itemsCount }}</strong>
</div>
<div class="pc-cart-summary-row">
<span>Итого</span>
<span>{{ __('Итого') }}</span>
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
</div>
</aside>

View File

@@ -3,28 +3,28 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Сравнение', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Сравнение'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Сравнение товаров</h2>
<h2>{{ __('Сравнение товаров') }}</h2>
</div>
@if ($products->isEmpty())
<div class="pc-card">
<h3>Список сравнения пуст</h3>
<p>Добавьте товары в сравнение из карточек каталога.</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
<h3>{{ __('Список сравнения пуст') }}</h3>
<p>{{ __('Добавьте товары в сравнение из карточек каталога.') }}</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
</div>
@else
<div class="pc-compare-actions">
<form method="post" action="{{ route('compare.clear') }}" data-preserve-scroll="true">
@csrf
@method('delete')
<button class="pc-btn ghost" type="submit">Очистить сравнение</button>
<button class="pc-btn ghost" type="submit">{{ __('Очистить сравнение') }}</button>
</form>
</div>
@@ -40,7 +40,7 @@
<table class="pc-compare-table">
<thead>
<tr>
<th>Характеристика</th>
<th>{{ __('Характеристика') }}</th>
@foreach ($products as $product)
<th>{{ $product->name }}</th>
@endforeach
@@ -49,9 +49,9 @@
<tbody>
@foreach ($specKeys as $key)
<tr>
<th>{{ $specLabels[$key] ?? $key }}</th>
<th>{{ __($specLabels[$key] ?? $key) }}</th>
@foreach ($products as $product)
<td>{{ data_get($product->specs, $key, '—') }}</td>
<td>{{ __(strval(data_get($product->specs, $key, '—'))) }}</td>
@endforeach
</tr>
@endforeach

View File

@@ -3,21 +3,21 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Избранное', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Избранное'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Избранные товары</h2>
<h2>{{ __('Избранные товары') }}</h2>
</div>
@if ($products->isEmpty())
<div class="pc-card">
<h3>Список пуст</h3>
<p>Добавьте товары в избранное из каталога или со страницы товара.</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
<h3>{{ __('Список пуст') }}</h3>
<p>{{ __('Добавьте товары в избранное из каталога или со страницы товара.') }}</p>
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
</div>
@else
<div class="pc-products-grid">

View File

@@ -1,8 +1,8 @@
@extends('layouts.shop')
@section('meta_title', 'Главная')
@section('meta_description', 'Интернет-магазин комплектующих для ПК: процессоры, материнские платы, видеокарты, ноутбуки и периферия.')
@section('meta_keywords', 'интернет-магазин пк, комплектующие, процессоры, видеокарты, ноутбуки')
@section('meta_title', __('Главная'))
@section('meta_description', __('Интернет-магазин комплектующих для ПК: процессоры, материнские платы, видеокарты, ноутбуки и периферия.'))
@section('meta_keywords', __('интернет-магазин пк, комплектующие, процессоры, видеокарты, ноутбуки'))
@section('meta_canonical', route('home'))
@section('content')
@@ -10,62 +10,62 @@
@include('partials.home-slider', [
'slides' => $leftSlides,
'sliderClass' => 'is-main',
'fallbackTitle' => 'Собирайте ПК быстрее',
'fallbackText' => 'Процессоры, материнские платы, видеокарты, ноутбуки и периферия в одном каталоге.',
'fallbackTitle' => __('Собирайте ПК быстрее'),
'fallbackText' => __('Процессоры, материнские платы, видеокарты, ноутбуки и периферия в одном каталоге.'),
'fallbackUrl' => route('catalog.index'),
'fallbackButton' => 'Перейти в каталог',
'fallbackButton' => __('Перейти в каталог'),
])
@include('partials.home-slider', [
'slides' => $rightSlides,
'sliderClass' => 'is-side',
'fallbackTitle' => 'Доставка и оплата',
'fallbackText' => 'Узнайте сроки доставки и способы оплаты заказа.',
'fallbackTitle' => __('Доставка и оплата'),
'fallbackText' => __('Узнайте сроки доставки и способы оплаты заказа.'),
'fallbackUrl' => route('pages.shipping-payment'),
'fallbackButton' => 'Подробнее',
'fallbackButton' => __('Подробнее'),
])
</section>
<section class="pc-section">
<div class="pc-section-title">
<h2>Категории</h2>
<h2>{{ __('Категории') }}</h2>
</div>
<div class="pc-grid pc-grid-4 pc-category-grid">
@foreach ($categories as $category)
<a class="pc-card pc-category-card pc-category-link" href="{{ route('catalog.category', $category) }}">
<div class="pc-category-image" role="img" aria-label="{{ $category->name }}"></div>
<h3 class="pc-category-title">{{ $category->name }}</h3>
<div class="pc-category-image" role="img" aria-label="{{ __($category->name) }}"></div>
<h3 class="pc-category-title">{{ __($category->name) }}</h3>
</a>
@endforeach
</div>
</section>
@include('partials.product-carousel', [
'title' => 'Популярные товары',
'title' => __('Популярные товары'),
'products' => $featured,
'emptyText' => 'Пока нет популярных товаров.',
'emptyText' => __('Пока нет популярных товаров.'),
])
@include('partials.product-carousel', [
'title' => 'Новые товары',
'title' => __('Новые товары'),
'products' => $newProducts,
'emptyText' => 'Пока нет новых товаров.',
'emptyText' => __('Пока нет новых товаров.'),
])
<section class="pc-grid pc-grid-3">
<a class="pc-card pc-category-link" href="{{ route('pages.shipping-payment') }}">
<div class="pc-card-meta">Сервис</div>
<h3>Доставка и оплата</h3>
<p>Условия доставки, способы оплаты и сроки отправки.</p>
<div class="pc-card-meta">{{ __('Сервис') }}</div>
<h3>{{ __('Доставка и оплата') }}</h3>
<p>{{ __('Условия доставки, способы оплаты и сроки отправки.') }}</p>
</a>
<a class="pc-card pc-category-link" href="{{ route('pages.about') }}">
<div class="pc-card-meta">Компания</div>
<h3>О нас</h3>
<p>Чем занимаемся и как помогаем выбрать комплектующие.</p>
<div class="pc-card-meta">{{ __('Компания') }}</div>
<h3>{{ __('О нас') }}</h3>
<p>{{ __('Чем занимаемся и как помогаем выбрать комплектующие.') }}</p>
</a>
<a class="pc-card pc-category-link" href="{{ route('pages.contacts') }}">
<div class="pc-card-meta">Поддержка</div>
<h3>Контакты</h3>
<p>Свяжитесь с нами для консультации по вашей сборке.</p>
<div class="pc-card-meta">{{ __('Поддержка') }}</div>
<h3>{{ __('Контакты') }}</h3>
<p>{{ __('Свяжитесь с нами для консультации по вашей сборке.') }}</p>
</a>
</section>
@endsection

View File

@@ -3,22 +3,22 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Личный кабинет', 'url' => route('account')],
['label' => 'Заказ #' . $order->id, 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Личный кабинет'), 'url' => route('account')],
['label' => __('Заказ #:number', ['number' => $order->id]), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-section-title">
<h2>Заказ #{{ $order->id }}</h2>
<p>Статус: <strong>{{ $order->status }}</strong></p>
<p>Способ оплаты: <strong>{{ $order->payment_method_label }}</strong></p>
<h2>{{ __('Заказ #:number', ['number' => $order->id]) }}</h2>
<p>{{ __('Статус:') }} <strong>{{ $order->status_label }}</strong></p>
<p>{{ __('Способ оплаты:') }} <strong>{{ $order->payment_method_label }}</strong></p>
</div>
<div class="pc-grid pc-grid-2">
<div class="pc-card">
<h3>Состав заказа</h3>
<h3>{{ __('Состав заказа') }}</h3>
<div class="pc-account-orders">
@foreach ($order->items as $item)
<div class="pc-account-order">
@@ -28,13 +28,13 @@
@endforeach
</div>
<div class="pc-cart-summary-row">
<span>Итого</span>
<span>{{ __('Итого') }}</span>
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
</div>
</div>
<div class="pc-card">
<h3>Данные получателя</h3>
<h3>{{ __('Данные получателя') }}</h3>
<p><strong>{{ $order->customer_name }}</strong></p>
<p>{{ $order->email }}</p>
@if ($order->phone)
@@ -44,7 +44,7 @@
<p>{{ $order->address }}</p>
@endif
@if ($order->comment)
<p>Комментарий: {{ $order->comment }}</p>
<p>{{ __('Комментарий:') }} {{ $order->comment }}</p>
@endif
</div>
</div>
@@ -52,7 +52,7 @@
@if (!in_array($order->status, ['paid', 'shipped', 'completed'], true))
@include('partials.payment-requisites', [
'amount' => $order->total,
'purpose' => 'Заказ #' . $order->id,
'purpose' => __('Заказ #:number', ['number' => $order->id]),
'showHelp' => true,
])
@endif

View File

@@ -23,9 +23,9 @@
'@context' => 'https://schema.org',
'@type' => 'Product',
'name' => $product->name,
'description' => $product->short_description ?: ($product->description ?: "Купить {$product->name} по выгодной цене."),
'description' => __($product->short_description ?: ($product->description ?: __('Купить :product по выгодной цене.', ['product' => $product->name]))),
'sku' => $product->sku ?: null,
'category' => $product->category?->name,
'category' => $product->category?->name ? __($product->category->name) : null,
'image' => $productSchemaImages,
'url' => route('products.show', $product),
'offers' => [
@@ -47,8 +47,8 @@
@endphp
@section('meta_title', $product->name)
@section('meta_description', \Illuminate\Support\Str::limit(strip_tags($product->short_description ?: ($product->description ?: "Купить {$product->name} по выгодной цене.")), 160))
@section('meta_keywords', $product->name . ', ' . ($product->category?->name ?? 'товар') . ', купить')
@section('meta_description', \Illuminate\Support\Str::limit(strip_tags(__($product->short_description ?: ($product->description ?: __('Купить :product по выгодной цене.', ['product' => $product->name])))), 160))
@section('meta_keywords', __(':product, :category, купить', ['product' => $product->name, 'category' => $product->category?->name ? __($product->category->name) : __('товар')]))
@section('meta_canonical', route('products.show', $product))
@section('meta_image', $productImageUrl)
@section('meta_image_alt', $product->name)
@@ -72,9 +72,9 @@
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Каталог', 'url' => route('catalog.index')],
['label' => $product->category?->name ?? 'Категория', 'url' => $product->category ? route('catalog.category', $product->category) : null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Каталог'), 'url' => route('catalog.index')],
['label' => $product->category?->name ? __($product->category->name) : __('Категория'), 'url' => $product->category ? route('catalog.category', $product->category) : null],
['label' => $product->name, 'url' => null],
],
])
@@ -96,20 +96,20 @@
@endif
@if (count($productGallery) > 1)
<div class="pc-product-thumbs" aria-label="Дополнительные изображения товара">
<div class="pc-product-thumbs" aria-label="{{ __('Дополнительные изображения товара') }}">
@foreach ($productGallery as $imageUrl)
<button
class="pc-product-thumb {{ $loop->first ? 'is-active' : '' }}"
type="button"
data-product-gallery-thumb
data-image-src="{{ $imageUrl }}"
data-image-alt="{{ $product->name }} - фото {{ $loop->iteration }}"
aria-label="Показать фото {{ $loop->iteration }}"
data-image-alt="{{ __(':product - фото :number', ['product' => $product->name, 'number' => $loop->iteration]) }}"
aria-label="{{ __('Показать фото :number', ['number' => $loop->iteration]) }}"
aria-pressed="{{ $loop->first ? 'true' : 'false' }}"
>
<img
src="{{ $imageUrl }}"
alt="{{ $product->name }} - миниатюра {{ $loop->iteration }}"
alt="{{ __(':product - миниатюра :number', ['product' => $product->name, 'number' => $loop->iteration]) }}"
loading="lazy"
decoding="async"
>
@@ -120,10 +120,10 @@
</div>
<div class="pc-product-info">
<h1>{{ $product->name }}</h1>
<p class="pc-muted">{{ $product->short_description }}</p>
<p class="pc-muted">{{ __($product->short_description) }}</p>
<div class="pc-product-badges">
@if ($product->sku)
<span class="pc-sku">Артикул: {{ $product->sku }}</span>
<span class="pc-sku">{{ __('Артикул:') }} {{ $product->sku }}</span>
@endif
</div>
<div class="pc-product-price">
@@ -137,22 +137,22 @@
<form method="post" action="{{ route('cart.add', $product) }}" data-preserve-scroll="true">
@csrf
<button class="pc-btn primary {{ $isInCart ? 'is-active' : '' }}" type="submit">
{{ $isInCart ? 'В корзине' : 'В корзину' }}
{{ $isInCart ? __('В корзине') : __('В корзину') }}
</button>
</form>
@else
<button class="pc-btn primary" type="button" disabled>Нет в наличии</button>
<button class="pc-btn primary" type="button" disabled>{{ __('Нет в наличии') }}</button>
@endif
<form method="post" action="{{ route('favorites.toggle', $product) }}" data-preserve-scroll="true">
@csrf
<button class="pc-btn ghost {{ $isFavorite ? 'is-active' : '' }}" type="submit">
{{ $isFavorite ? 'Убрать из избранного' : 'В избранное' }}
{{ $isFavorite ? __('Убрать из избранного') : __('В избранное') }}
</button>
</form>
<form method="post" action="{{ route('compare.toggle', $product) }}" data-preserve-scroll="true">
@csrf
<button class="pc-btn ghost {{ $isCompared ? 'is-active' : '' }}" type="submit">
{{ $isCompared ? 'Убрать из сравнения' : 'В сравнение' }}
{{ $isCompared ? __('Убрать из сравнения') : __('В сравнение') }}
</button>
</form>
</div>
@@ -166,10 +166,10 @@
<input type="radio" name="product-tabs" id="tab-payment">
<div class="pc-tab-labels">
<label for="tab-specs">Характеристики</label>
<label for="tab-desc">Описание</label>
<label for="tab-shipping">Доставка</label>
<label for="tab-payment">Оплата</label>
<label for="tab-specs">{{ __('Характеристики') }}</label>
<label for="tab-desc">{{ __('Описание') }}</label>
<label for="tab-shipping">{{ __('Доставка') }}</label>
<label for="tab-payment">{{ __('Оплата') }}</label>
</div>
<div class="pc-tab-content">
@@ -177,29 +177,29 @@
<div class="pc-specs-grid">
@forelse (($product->specs ?? []) as $key => $value)
<div class="pc-spec-row">
<span>{{ $specLabels[$key] ?? str_replace('_', ' ', $key) }}</span>
<strong>{{ $value }}</strong>
<span>{{ __($specLabels[$key] ?? str_replace('_', ' ', $key)) }}</span>
<strong>{{ __((string) $value) }}</strong>
</div>
@empty
<p class="pc-muted">Характеристики еще не добавлены.</p>
<p class="pc-muted">{{ __('Характеристики еще не добавлены.') }}</p>
@endforelse
</div>
</section>
<section class="pc-tab-panel pc-tab-desc">
<p class="pc-muted">{{ $product->description ?? 'Описание товара будет добавлено позже.' }}</p>
<p class="pc-muted">{{ __($product->description ?? __('Описание товара будет добавлено позже.')) }}</p>
</section>
<section class="pc-tab-panel pc-tab-shipping">
<ul class="pc-list">
<li>Доставка курьером по городу</li>
<li>Самовывоз из пункта выдачи</li>
<li>Отправка по стране 1-3 дня</li>
<li>{{ __('Доставка курьером по городу') }}</li>
<li>{{ __('Самовывоз из пункта выдачи') }}</li>
<li>{{ __('Отправка по стране 1-3 дня') }}</li>
</ul>
</section>
<section class="pc-tab-panel pc-tab-payment">
<ul class="pc-list">
<li>Оплата картой онлайн</li>
<li>Банковский перевод</li>
<li>Рассрочка на крупные заказы</li>
<li>{{ __('Оплата картой онлайн') }}</li>
<li>{{ __('Банковский перевод') }}</li>
<li>{{ __('Рассрочка на крупные заказы') }}</li>
</ul>
</section>
</div>
@@ -209,7 +209,7 @@
@if ($related->isNotEmpty())
<section class="pc-section">
<div class="pc-section-title">
<h2>Что еще посмотреть в этой категории</h2>
<h2>{{ __('Что еще посмотреть в этой категории') }}</h2>
</div>
<div class="pc-products-grid">
@foreach ($related as $item)

View File

@@ -14,7 +14,7 @@
? [
'@context' => 'https://schema.org',
'@type' => 'SearchResultsPage',
'name' => "Результаты поиска: {$searchQuery}",
'name' => __('Результаты поиска: :query', ['query' => $searchQuery]),
'url' => route('search.index', ['q' => $searchQuery]),
'mainEntity' => [
'@type' => 'ItemList',
@@ -25,14 +25,14 @@
: null;
@endphp
@section('meta_title', $searchQuery !== '' ? "Поиск: {$searchQuery}" : 'Поиск товаров')
@section('meta_title', $searchQuery !== '' ? __('Поиск: :query', ['query' => $searchQuery]) : __('Поиск товаров'))
@section(
'meta_description',
$searchQuery !== ''
? "Найденные товары по запросу «{$searchQuery}». Выберите подходящий товар и откройте подробную карточку."
: 'Поиск товаров по наименованию: процессоры, видеокарты, материнские платы, ноутбуки и периферия.'
? __('Найденные товары по запросу «:query». Выберите подходящий товар и откройте подробную карточку.', ['query' => $searchQuery])
: __('Поиск товаров по наименованию: процессоры, видеокарты, материнские платы, ноутбуки и периферия.')
)
@section('meta_keywords', 'поиск товаров, результаты поиска, комплектующие пк, ноутбуки')
@section('meta_keywords', __('поиск товаров, результаты поиска, комплектующие пк, ноутбуки'))
@section('meta_canonical', route('search.index'))
@section('meta_robots', 'noindex,follow')
@@ -47,20 +47,20 @@
@section('content')
@include('partials.breadcrumbs', [
'items' => [
['label' => 'Главная', 'url' => route('home')],
['label' => 'Поиск', 'url' => null],
['label' => __('Главная'), 'url' => route('home')],
['label' => __('Поиск'), 'url' => null],
],
])
<section class="pc-section">
<div class="pc-category-toolbar">
<div class="pc-section-title">
<h2>{{ $searchQuery !== '' ? 'Результаты поиска' : 'Поиск товаров' }}</h2>
<h2>{{ $searchQuery !== '' ? __('Результаты поиска') : __('Поиск товаров') }}</h2>
<p>
@if ($searchQuery !== '')
Запрос: "{{ $searchQuery }}"
{{ __('Запрос: ":query"', ['query' => $searchQuery]) }}
@else
Введите название товара, чтобы увидеть найденные позиции.
{{ __('Введите название товара, чтобы увидеть найденные позиции.') }}
@endif
</p>
</div>
@@ -68,12 +68,12 @@
@if ($searchQuery !== '')
<form class="pc-sort-form" method="get" action="{{ route('search.index') }}">
<input type="hidden" name="q" value="{{ $searchQuery }}">
<label for="sort">Сортировка:</label>
<label for="sort">{{ __('Сортировка:') }}</label>
<select id="sort" name="sort" onchange="this.form.submit()">
<option value="newest" @selected($sort === 'newest')>Сначала новые</option>
<option value="price_asc" @selected($sort === 'price_asc')>Сначала дешевле</option>
<option value="price_desc" @selected($sort === 'price_desc')>Сначала дороже</option>
<option value="name_asc" @selected($sort === 'name_asc')>По названию</option>
<option value="newest" @selected($sort === 'newest')>{{ __('Сначала новые') }}</option>
<option value="price_asc" @selected($sort === 'price_asc')>{{ __('Сначала дешевле') }}</option>
<option value="price_desc" @selected($sort === 'price_desc')>{{ __('Сначала дороже') }}</option>
<option value="name_asc" @selected($sort === 'name_asc')>{{ __('По названию') }}</option>
</select>
</form>
@endif
@@ -81,26 +81,26 @@
<form class="pc-search-page-form" method="get" action="{{ route('search.index') }}">
<div class="pc-search">
<input type="text" name="q" placeholder="Например, Ryzen 7 или RTX 4060" value="{{ $searchQuery }}">
<input type="text" name="q" placeholder="{{ __('Например, Ryzen 7 или RTX 4060') }}" value="{{ $searchQuery }}">
</div>
<button class="pc-btn primary" type="submit">Найти</button>
<button class="pc-btn primary" type="submit">{{ __('Найти') }}</button>
@if ($searchQuery !== '')
<a class="pc-btn ghost" href="{{ route('search.index') }}">Очистить</a>
<a class="pc-btn ghost" href="{{ route('search.index') }}">{{ __('Очистить') }}</a>
@endif
</form>
@if ($searchQuery === '')
<div class="pc-card">
Введите запрос в строку поиска, чтобы открыть список найденных товаров.
{{ __('Введите запрос в строку поиска, чтобы открыть список найденных товаров.') }}
</div>
@else
<p class="pc-muted">Найдено товаров: <strong>{{ $products->total() }}</strong></p>
<p class="pc-muted">{{ __('Найдено товаров:') }} <strong>{{ $products->total() }}</strong></p>
<div class="pc-products-grid">
@forelse ($products as $product)
@include('partials.product-card', ['product' => $product])
@empty
<div class="pc-card">По вашему запросу ничего не найдено.</div>
<div class="pc-card">{{ __('По вашему запросу ничего не найдено.') }}</div>
@endforelse
</div>