contact page, legal pages and category page

This commit is contained in:
elvira
2026-08-26 13:43:30 +03:00
parent 45057f9083
commit fab9cc08a8
38 changed files with 1726 additions and 182 deletions
@@ -0,0 +1,31 @@
@props(['paginator'])
{{--
Numbered pager (01 02 03 …) matching the site's underline-slide convention,
plus a trailing arrow to the next page. Real pagination — takes any
Illuminate\Contracts\Pagination\LengthAwarePaginator.
Usage: <x-ui.pagination :paginator="$products" />
--}}
@if($paginator->hasPages())
<nav aria-label="{{ __('general.pagination.nav_label') }}" {{ $attributes->merge(['class' => 'flex items-center gap-6 font-display font-bold']) }}>
<ol class="flex items-center gap-6">
@foreach($paginator->getUrlRange(1, $paginator->lastPage()) as $page => $url)
<li>
@if($page === $paginator->currentPage())
<span class="underline-slide is-active" aria-current="page">{{ str_pad((string) $page, 2, '0', STR_PAD_LEFT) }}</span>
@else
<a href="{{ $url }}" class="underline-slide" aria-label="{{ __('general.pagination.page', ['page' => $page]) }}">{{ str_pad((string) $page, 2, '0', STR_PAD_LEFT) }}</a>
@endif
</li>
@endforeach
</ol>
@if($paginator->hasMorePages())
<a href="{{ $paginator->nextPageUrl() }}" aria-label="{{ __('general.pagination.next') }}">
<x-ui.icon name="arrow-right" :size="24" />
</a>
@endif
</nav>
@endif
@@ -7,7 +7,7 @@
<div class="group">
<div class="relative flex items-center justify-center mb-4">
<a href="{{ $href }}" class="block w-full border border-black overflow-hidden bg-white">
<a href="{{ $href }}" class="block w-full border border-black overflow-hidden bg-white aspect-[251/335] flex items-center justify-center">
@if($image)
<img
src="{{ $image }}"
@@ -0,0 +1,30 @@
@props([
'options' => [],
'value' => null,
'name' => null,
'ariaLabel' => null,
])
{{--
Native <select>, styled to match the site's bordered/uppercase look.
Usage:
<x-ui.select
:options="[['value' => 'a', 'label' => 'Option A'], ...]"
value="a"
ariaLabel="Sort products"
/>
--}}
<div class="relative inline-flex items-center">
<select
@if($name) name="{{ $name }}" @endif
@if($ariaLabel) aria-label="{{ $ariaLabel }}" @endif
{{ $attributes->merge(['class' => 'appearance-none bg-transparent border border-black pl-4 pr-10 py-2.5 font-display font-bold cursor-pointer focus:outline-none']) }}
>
@foreach($options as $option)
<option value="{{ $option['value'] }}" @selected($value === $option['value'])>{{ $option['label'] }}</option>
@endforeach
</select>
<x-ui.icon name="arrow-down" :size="16" class="pointer-events-none absolute right-4" />
</div>
@@ -0,0 +1,45 @@
@props([
'src', // Stoic filename string e.g. "hero.png"
'preset' => 'medium', // which preset sets the src + default sizes hint
'alt' => '',
'loading' => 'lazy',
'fetchpriority' => 'auto',
'sizes' => null, // override when you know the render context
'width' => null,
'height' => null,
'preload' => false, // push a <link rel=preload> into <head> for LCP images
])
@php
$ext = strtolower(pathinfo($src, PATHINFO_EXTENSION));
$imageSrc = \App\Services\Stoic::image($src, $preset);
$srcset = \App\Services\Stoic::srcset($src);
$presetW = collect(\App\Services\Stoic::presets())->firstWhere('code', $preset)['width'] ?? 800;
$sizesAttr = $sizes ?? "(min-width: 1024px) {$presetW}px, 100vw";
[$width, $height] = $width !== null && $height !== null
? [$width, $height]
: \App\Services\Stoic::dimensions($src, $preset);
@endphp
@if($preload)
@push('seo')
<link rel="preload" as="image" href="{{ $imageSrc }}"
@if($srcset) imagesrcset="{{ $srcset }}" imagesizes="{{ $sizesAttr }}" @endif
@if($ext !== 'svg') type="image/webp" @endif
fetchpriority="high" />
@endpush
@endif
<img
src="{{ $imageSrc }}"
@if($srcset)
srcset="{{ $srcset }}"
sizes="{{ $sizesAttr }}"
@endif
@if($width !== null) width="{{ $width }}" @endif
@if($height !== null) height="{{ $height }}" @endif
alt="{{ $alt }}"
loading="{{ $loading }}"
fetchpriority="{{ $fetchpriority }}"
{{ $attributes }}
/>