removed search from category filters and fixed product links

This commit is contained in:
elvira
2026-09-02 14:05:20 +03:00
parent 5e2ec7a60a
commit 210ed3b094
3 changed files with 104 additions and 120 deletions
@@ -74,25 +74,6 @@
search box is still a placeholder. --}}
<aside class="flex flex-col gap-10">
{{-- Placeholder — not wired yet. --}}
<div class="-mt-2">
<label for="shop-search" class="sr-only">{{ __('storefront.shop.search_label') }}</label>
<div class="relative">
<x-ui.input
type="search"
id="shop-search"
:placeholder="__('storefront.shop.search_placeholder')"
class="pr-10"
/>
<button
type="button"
class="absolute right-0 top-1/2 -translate-y-1/2"
aria-label="{{ __('storefront.shop.search_label') }}"
>
<x-ui.icon name="search" :size="20" />
</button>
</div>
</div>
{{-- Filter form: a plain GET form whose fields ARE the state. Changing
any control auto-submits (auto-submit controller); Turbo captures
@@ -108,11 +89,11 @@ class="absolute right-0 top-1/2 -translate-y-1/2"
class="contents"
>
@if ($listing->sort)
<input type="hidden" name="sort" value="{{ $listing->sort->value }}">
<input type="hidden" name="sort" value="{{ $listing->sort->value }}" />
@endif
@if ($priceFloor !== null && $priceCeil !== null && $priceCeil > $priceFloor)
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-4 -mt-2">
<p class="font-extrabold text-h4">{{ __('storefront.shop.filter_price') }}</p>
<x-ui.range-slider
@@ -127,8 +108,6 @@ class="contents"
:min-label="__('storefront.shop.price_min')"
:max-label="__('storefront.shop.price_max')"
>
{{-- Clear the price filter — a plain link back to the URL
without price_*; only shown when actually filtered. --}}
@if ($priceFiltered)
<a
href="{{ route('category.show', ['id' => $collection['id']] + $listing->query(['price_min' => null, 'price_max' => null, 'page' => null])) }}"
@@ -5,9 +5,14 @@
'href' => '#',
])
{{-- data-turbo-frame="_top" on the links: this card renders inside the
category page's <turbo-frame id="category-listing">, so without it a click
would try to load the product page *into* that frame, not find a matching
frame, and fail with "content missing". It's a no-op anywhere there's no
frame (homepage grids, related products). --}}
<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 aspect-[251/335] flex items-center justify-center">
<a href="{{ $href }}" data-turbo-frame="_top" class="block w-full border border-black overflow-hidden bg-white aspect-[251/335] flex items-center justify-center">
@if($image)
<img
src="{{ $image }}"
@@ -28,7 +33,7 @@ class="w-full h-auto block"
</div>
<div class="flex items-baseline justify-between gap-4">
<a href="{{ $href }}" class="font-bold text-xl leading-snug hover:text-brand">{{ $name }}</a>
<a href="{{ $href }}" data-turbo-frame="_top" class="font-bold text-xl leading-snug hover:text-brand">{{ $name }}</a>
@if($price !== null)
<span class="font-bold text-xl shrink-0"><x-ui.price :amount="$price" /></span>
@endif