feat: complete admin CMS for customizable layout, texts, products, categories and orders

This commit is contained in:
2026-10-31 21:18:01 +01:00
parent 957661a186
commit f8c002366b
21 changed files with 2076 additions and 76 deletions
@@ -0,0 +1,62 @@
@extends('layouts.admin')
@section('title', 'Categorie Bewerken: ' . $category->name . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-xl mx-auto">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<a href="{{ route('admin.categories.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
<span>Terug naar Categorieën</span>
</a>
<h1 class="font-heading text-2xl font-black text-white">Categorie Bewerken: {{ $category->name }}</h1>
</div>
</div>
<!-- Edit Form -->
<form action="{{ route('admin.categories.update', $category) }}" method="POST" class="space-y-6">
@csrf
@method('PUT')
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Categorienaam *</label>
<input type="text" name="name" value="{{ old('name', $category->name) }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold focus:outline-none focus:ring-2 focus:ring-amber-400">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Omschrijving</label>
<textarea name="description" rows="3" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white leading-relaxed">{{ old('description', $category->description) }}</textarea>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Lucide Icoon</label>
<input type="text" name="icon" value="{{ old('icon', $category->icon) }}" placeholder="sparkles, zap, film..." class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
<div class="space-y-1.5">
<label class="block text-xs font-bold text-slate-300">Volgorde</label>
<input type="number" name="sort_order" value="{{ old('sort_order', $category->sort_order) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
</div>
</div>
</div>
<div class="flex items-center justify-end space-x-3">
<a href="{{ route('admin.categories.index') }}" class="px-4 py-2.5 rounded-xl bg-slate-800 text-slate-300 hover:text-white text-xs font-bold transition">
Annuleren
</a>
<button type="submit" class="px-6 py-2.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5">
<i data-lucide="save" class="w-4 h-4"></i>
<span>Opslaan</span>
</button>
</div>
</form>
</div>
@endsection
@@ -0,0 +1,53 @@
@extends('layouts.admin')
@section('title', 'Categorieën Beheren | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header -->
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
<div>
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
<i data-lucide="folder-tree" class="w-4 h-4"></i>
<span>Winkelstructuur</span>
</div>
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Categorieën Beheer</h1>
<p class="text-xs sm:text-sm text-slate-400 mt-1">Beheer categorie titels, omschrijvingen en sortering.</p>
</div>
</div>
<!-- Categories Grid -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
@foreach($categories as $category)
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 flex flex-col justify-between space-y-4">
<div class="space-y-3">
<div class="flex items-center justify-between">
<span class="px-2.5 py-1 rounded-lg bg-amber-400/20 text-amber-400 font-mono text-xs font-black">
/catalogus?category={{ $category->slug }}
</span>
<span class="text-xs text-slate-400 font-bold">
{{ $category->products_count }} producten
</span>
</div>
<h3 class="font-heading text-lg font-black text-white">{{ $category->name }}</h3>
<p class="text-xs text-slate-400 leading-relaxed font-normal">{{ $category->description }}</p>
</div>
<div class="pt-4 border-t border-slate-800 flex items-center justify-between">
<a href="{{ route('catalog', ['category' => $category->slug]) }}" target="_blank" class="text-xs text-slate-400 hover:text-white flex items-center space-x-1">
<span>Bekijk in shop</span>
<i data-lucide="external-link" class="w-3 h-3"></i>
</a>
<a href="{{ route('admin.categories.edit', $category) }}" class="px-3.5 py-1.5 rounded-xl bg-slate-800 hover:bg-amber-400 text-slate-200 hover:text-slate-950 text-xs font-bold transition flex items-center space-x-1">
<i data-lucide="pencil" class="w-3 h-3"></i>
<span>Bewerken</span>
</a>
</div>
</div>
@endforeach
</div>
</div>
@endsection