Add email templates, page layouts, and shop themes (template system)
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s

- E-Mail-Templates: DB-gespeicherte HTML-Templates mit {{placeholder}}-System,
  Admin-UI zum Bearbeiten von Betreff und Body, alle 4 Mailables aktualisiert
- Seiten-Layouts: 4 Layouts für CMS-Seiten (Standard, Sidebar, Volle Breite, Landing),
  Layout-Auswahl im Admin-Formular
- Shop-Themes: 5 Farbthemen via CSS-Variablen, Picker in Einstellungen
- Deployment: EmailTemplateSeeder wird automatisch beim Deploy ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 22:04:54 +02:00
co-authored by Claude Sonnet 4.6
parent 4f42b64f24
commit 5dad8b9324
23 changed files with 700 additions and 55 deletions
+50 -2
View File
@@ -1,11 +1,59 @@
@php $layout = $page->layout ?? 'default'; @endphp
@if($layout === 'landing')
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ $page->meta_title ?: $page->title }}</title>
<meta name="description" content="{{ $page->meta_description }}">
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="bg-gray-50 text-gray-800">
<div class="prose max-w-none text-gray-700 p-8">
{!! $page->content !!}
</div>
</body>
</html>
@else
@extends('layouts.shop')
@section('title', $page->meta_title ?: $page->title)
@section('meta_description', $page->meta_description)
@section('content')
<div class="max-w-3xl mx-auto">
@switch($layout)
@case('full')
<h1 class="text-3xl font-bold mb-6">{{ $page->title }}</h1>
<div class="prose max-w-none text-gray-700">
{!! $page->content !!}
</div>
</div>
@break
@case('sidebar')
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<div class="lg:col-span-2">
<h1 class="text-3xl font-bold mb-6">{{ $page->title }}</h1>
<div class="prose max-w-none text-gray-700">
{!! $page->content !!}
</div>
</div>
<aside class="space-y-6">
@include('shop.partials._sidebar')
</aside>
</div>
@break
@default
<div class="max-w-3xl mx-auto">
<h1 class="text-3xl font-bold mb-6">{{ $page->title }}</h1>
<div class="prose max-w-none text-gray-700">
{!! $page->content !!}
</div>
</div>
@endswitch
@endsection
@endif
@@ -0,0 +1,39 @@
{{-- Kategorien --}}
@php
$sidebarCats = \App\Models\Category::whereNull('parent_id')->where('active', true)->orderBy('sort_order')->get();
$sidebarBlogPages = \App\Models\Page::where('type','blog')->where('published',true)->orderByDesc('published_at')->limit(5)->get();
@endphp
@if($sidebarCats->count())
<div class="bg-white rounded shadow p-4">
<h3 class="font-semibold mb-3 text-gray-800">Kategorien</h3>
<ul class="space-y-1">
@foreach($sidebarCats as $cat)
<li>
<a href="{{ route('shop.category', $cat->slug) }}"
class="block px-2 py-1.5 rounded text-sm text-gray-700 hover-primary transition">
{{ $cat->name }}
</a>
</li>
@endforeach
</ul>
</div>
@endif
@if($sidebarBlogPages->count())
<div class="bg-white rounded shadow p-4">
<h3 class="font-semibold mb-3 text-gray-800">Aktuelle Beiträge</h3>
<ul class="space-y-3">
@foreach($sidebarBlogPages as $bp)
<li>
<a href="{{ route('page', $bp->slug) }}" class="text-sm text-primary hover:underline">
{{ $bp->title }}
</a>
@if($bp->published_at)
<p class="text-xs text-gray-400">{{ $bp->published_at->format('d.m.Y') }}</p>
@endif
</li>
@endforeach
</ul>
</div>
@endif