166 lines
11 KiB
PHP
166 lines
11 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', '3D Print Catalogus 🎁 | Jouwdriedee.nl')
|
|
|
|
@section('content')
|
|
<!-- Page Header -->
|
|
<div class="bg-amber-100 border-b-2 border-slate-900 py-8">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
|
<div>
|
|
<div class="inline-flex items-center space-x-1.5 px-3 py-1 rounded-full bg-white border-2 border-slate-900 text-[11px] font-black text-rose-500 toy-shadow-sm mb-2">
|
|
<span>🧸</span>
|
|
<span>Onze Collectie 3D Prints</span>
|
|
</div>
|
|
<h1 class="font-heading text-3xl sm:text-4xl font-black text-slate-900 tracking-tight">Kies Jouw Favoriete Print! 🎁</h1>
|
|
<p class="text-xs font-bold text-slate-600 mt-1">Filter op categorie of materiaal en bestel direct in jouw favoriete kleur.</p>
|
|
</div>
|
|
@if(request()->hasAny(['category', 'material', 'q', 'sort']))
|
|
<a href="{{ route('catalog') }}" class="toy-btn px-4 py-2 rounded-2xl bg-white border-2 border-slate-900 toy-shadow-sm text-xs font-black text-rose-600 hover:bg-rose-50 flex items-center space-x-1.5 self-start">
|
|
<span>✕ Filters Wissen</span>
|
|
</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
|
|
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
|
|
|
<!-- Filters Sidebar (Chunky Toy Box) -->
|
|
<aside class="space-y-6">
|
|
<div class="p-6 rounded-3xl bg-white border-2 border-slate-900 toy-shadow space-y-6">
|
|
<div class="flex items-center justify-between pb-3 border-b-2 border-slate-100">
|
|
<span class="font-heading text-sm font-black text-slate-900 uppercase tracking-wider flex items-center space-x-2">
|
|
<span>🔍</span>
|
|
<span>Zoeken & Filters</span>
|
|
</span>
|
|
@if(request()->hasAny(['category', 'material', 'q', 'sort']))
|
|
<a href="{{ route('catalog') }}" class="text-[11px] font-black text-rose-500 hover:underline">Wissen</a>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Zoekveld -->
|
|
<form action="{{ route('catalog') }}" method="GET" class="space-y-5">
|
|
@if(request('category')) <input type="hidden" name="category" value="{{ request('category') }}"> @endif
|
|
@if(request('material')) <input type="hidden" name="material" value="{{ request('material') }}"> @endif
|
|
|
|
<div>
|
|
<label class="block text-xs font-black text-slate-800 mb-1.5">Zoek op trefwoord</label>
|
|
<div class="relative">
|
|
<input
|
|
type="text"
|
|
name="q"
|
|
value="{{ request('q') }}"
|
|
placeholder="Speelgoed, vaas, houder..."
|
|
class="w-full bg-[#FFFDF7] border-2 border-slate-900 rounded-2xl pl-9 pr-3.5 py-2.5 text-xs font-bold text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-amber-400"
|
|
>
|
|
<i data-lucide="search" class="w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"></i>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Categorie filter -->
|
|
<div>
|
|
<label class="block text-xs font-black text-slate-800 mb-2">Categorieën 🧸</label>
|
|
<div class="space-y-1.5">
|
|
<a href="{{ route('catalog', array_merge(request()->except('category', 'page'), [])) }}" class="flex items-center justify-between px-3.5 py-2 rounded-xl text-xs font-black transition border-2 {{ !request('category') ? 'bg-amber-300 border-slate-900 text-slate-950 toy-shadow-sm' : 'border-transparent text-slate-700 hover:bg-slate-100' }}">
|
|
<span>Alle categorieën</span>
|
|
</a>
|
|
@foreach($categories as $cat)
|
|
<a href="{{ route('catalog', array_merge(request()->except('category', 'page'), ['category' => $cat->slug])) }}" class="flex items-center justify-between px-3.5 py-2 rounded-xl text-xs font-black transition border-2 {{ request('category') === $cat->slug ? 'bg-amber-300 border-slate-900 text-slate-950 toy-shadow-sm' : 'border-transparent text-slate-700 hover:bg-slate-100' }}">
|
|
<span>{{ $cat->name }}</span>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Materiaal filter -->
|
|
<div>
|
|
<label class="block text-xs font-black text-slate-800 mb-2">Materiaal 🌈</label>
|
|
<div class="space-y-1.5">
|
|
<a href="{{ route('catalog', array_merge(request()->except('material', 'page'), [])) }}" class="flex items-center justify-between px-3.5 py-2 rounded-xl text-xs font-black transition border-2 {{ !request('material') ? 'bg-sky-200 border-slate-900 text-slate-950 toy-shadow-sm' : 'border-transparent text-slate-700 hover:bg-slate-100' }}">
|
|
<span>Alle materialen</span>
|
|
</a>
|
|
@foreach($materials as $mat)
|
|
<a href="{{ route('catalog', array_merge(request()->except('material', 'page'), ['material' => $mat->code])) }}" class="flex items-center justify-between px-3.5 py-2 rounded-xl text-xs font-black transition border-2 {{ request('material') === $mat->code ? 'bg-sky-200 border-slate-900 text-slate-950 toy-shadow-sm' : 'border-transparent text-slate-700 hover:bg-slate-100' }}">
|
|
<span>{{ $mat->name }}</span>
|
|
<span class="text-[10px] px-1.5 py-0.5 rounded bg-white border border-slate-300 font-mono">{{ strtoupper($mat->code) }}</span>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sortering -->
|
|
<div>
|
|
<label class="block text-xs font-black text-slate-800 mb-1.5">Sorteren</label>
|
|
<select name="sort" onchange="this.form.submit()" class="w-full bg-[#FFFDF7] border-2 border-slate-900 rounded-2xl px-3.5 py-2.5 text-xs font-bold text-slate-900 focus:bg-white focus:outline-none focus:ring-2 focus:ring-amber-400">
|
|
<option value="newest" {{ request('sort') === 'newest' ? 'selected' : '' }}>Nieuwste eerst ✨</option>
|
|
<option value="price_asc" {{ request('sort') === 'price_asc' ? 'selected' : '' }}>Prijs: Laag naar hoog</option>
|
|
<option value="price_desc" {{ request('sort') === 'price_desc' ? 'selected' : '' }}>Prijs: Hoog naar laag</option>
|
|
</select>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Producten Overzicht -->
|
|
<div class="lg:col-span-3 space-y-6">
|
|
@if($products->isEmpty())
|
|
<div class="p-12 text-center rounded-3xl bg-white border-2 border-slate-900 toy-shadow space-y-4">
|
|
<div class="w-16 h-16 rounded-2xl bg-amber-100 border-2 border-slate-900 text-slate-900 flex items-center justify-center mx-auto text-2xl">
|
|
🙈
|
|
</div>
|
|
<h3 class="font-heading text-lg font-black text-slate-900">Geen artikelen gevonden</h3>
|
|
<p class="text-xs font-medium text-slate-600 max-w-sm mx-auto">Er zijn geen prints gevonden die voldoen aan je huidige filters. Probeer een andere zoekopdracht of bekijk alle prints!</p>
|
|
<a href="{{ route('catalog') }}" class="toy-btn inline-flex px-6 py-3 rounded-2xl bg-amber-400 border-2 border-slate-900 toy-shadow-sm text-slate-950 text-xs font-black">Alle prints bekijken 🎁</a>
|
|
</div>
|
|
@else
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
@foreach($products as $product)
|
|
<div class="group rounded-3xl bg-[#FFFDF7] border-2 border-slate-900 toy-shadow overflow-hidden flex flex-col justify-between hover:-translate-y-1 transition duration-200">
|
|
<div>
|
|
<div class="relative h-56 bg-slate-100 border-b-2 border-slate-900 overflow-hidden">
|
|
<img
|
|
src="{{ $product->image_url }}"
|
|
alt="{{ $product->name }}"
|
|
class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"
|
|
>
|
|
@if($product->category)
|
|
<span class="absolute top-3 left-3 px-2.5 py-1 rounded-xl bg-amber-300 border-2 border-slate-900 text-[10px] font-black text-slate-950 toy-shadow-sm">
|
|
{{ $product->category->name }}
|
|
</span>
|
|
@endif
|
|
</div>
|
|
<div class="p-5">
|
|
<h3 class="font-heading text-base font-black text-slate-900 group-hover:text-rose-600 transition">
|
|
<a href="{{ route('product.show', $product->slug) }}">
|
|
{{ $product->name }}
|
|
</a>
|
|
</h3>
|
|
<p class="text-xs text-slate-600 mt-1 line-clamp-2 leading-relaxed font-medium">
|
|
{{ $product->short_description }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="p-5 pt-0 border-t-2 border-slate-100 mt-2 flex items-center justify-between">
|
|
<div>
|
|
<span class="text-[10px] text-slate-500 block font-bold uppercase">Vanaf</span>
|
|
<span class="font-heading text-lg font-black text-slate-900">{{ $product->formatted_price }}</span>
|
|
</div>
|
|
<a href="{{ route('product.show', $product->slug) }}" class="toy-btn px-4 py-2 rounded-2xl bg-amber-400 hover:bg-amber-300 border-2 border-slate-900 toy-shadow-sm text-slate-950 text-xs font-black transition flex items-center space-x-1">
|
|
<span>Kies Kleur 🎨</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="pt-6">
|
|
{{ $products->links() }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
@endsection
|