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

@@ -11,7 +11,7 @@
$hasSubtitle = $slide->show_subtitle && !empty($slide->subtitle);
$hasButton = $slide->show_button && !empty($slide->button_text) && !empty($slide->button_url);
$hasContent = $hasTitle || $hasSubtitle || $hasButton;
$altText = $hasTitle ? $slide->title : 'Слайд на главной странице';
$altText = $hasTitle ? __($slide->title) : __('Слайд на главной странице');
@endphp
<article class="pc-home-slide {{ $loop->first ? 'is-active' : '' }}" data-home-slide>
<img src="{{ $slide->image_url }}" alt="{{ $altText }}" loading="{{ $loop->first ? 'eager' : 'lazy' }}">
@@ -19,13 +19,13 @@
@if ($hasContent)
<div class="pc-home-slide-content">
@if ($hasTitle)
<h2>{{ $slide->title }}</h2>
<h2>{{ __($slide->title) }}</h2>
@endif
@if ($hasSubtitle)
<p>{{ $slide->subtitle }}</p>
<p>{{ __($slide->subtitle) }}</p>
@endif
@if ($hasButton)
<a class="pc-btn primary" href="{{ $slide->button_url }}">{{ $slide->button_text }}</a>
<a class="pc-btn primary" href="{{ $slide->button_url }}">{{ __($slide->button_text) }}</a>
@endif
</div>
@endif
@@ -34,16 +34,16 @@
<article class="pc-home-slide is-active is-fallback" data-home-slide>
<div class="pc-home-slide-overlay"></div>
<div class="pc-home-slide-content">
<h2>{{ $fallbackTitle ?? 'Собирайте ПК быстрее' }}</h2>
<p>{{ $fallbackText ?? 'Загрузите баннеры в админке, чтобы вывести акции и подборки товаров на главной странице.' }}</p>
<h2>{{ __($fallbackTitle ?? 'Собирайте ПК быстрее') }}</h2>
<p>{{ __($fallbackText ?? 'Загрузите баннеры в админке, чтобы вывести акции и подборки товаров на главной странице.') }}</p>
@if (!empty($fallbackUrl))
<a class="pc-btn primary" href="{{ $fallbackUrl }}">{{ $fallbackButton ?? 'Открыть каталог' }}</a>
<a class="pc-btn primary" href="{{ $fallbackUrl }}">{{ __($fallbackButton ?? 'Открыть каталог') }}</a>
@endif
</div>
</article>
@endforelse
</div>
<button class="pc-home-slider-btn is-prev" type="button" data-home-slider-prev aria-label="Предыдущий слайд" @disabled($isSingle)></button>
<button class="pc-home-slider-btn is-next" type="button" data-home-slider-next aria-label="Следующий слайд" @disabled($isSingle)></button>
<button class="pc-home-slider-btn is-prev" type="button" data-home-slider-prev aria-label="{{ __('Предыдущий слайд') }}" @disabled($isSingle)></button>
<button class="pc-home-slider-btn is-next" type="button" data-home-slider-next aria-label="{{ __('Следующий слайд') }}" @disabled($isSingle)></button>
</div>