feat: add webshop offline maintenance mode with admin toggle and red maintenance screen

This commit is contained in:
2026-11-01 16:28:30 +01:00
parent 4994d4a8ef
commit b3add6f0c2
10 changed files with 419 additions and 1 deletions
+21
View File
@@ -25,6 +25,27 @@
</head>
<body class="min-h-full flex flex-col bg-[#FBFBFA] text-slate-800 selection:bg-amber-300 selection:text-slate-900" x-data="{ mobileMenuOpen: false }">
<!-- Admin Offline Preview Notice -->
@if(\App\Models\Setting::get('shop_offline', '0') === '1' && auth()->check() && auth()->user()->isAdmin())
<div class="bg-rose-600 text-white px-4 py-2 text-xs font-black flex flex-col sm:flex-row items-center justify-between sticky top-0 z-50 border-b border-rose-700 shadow-lg gap-2">
<div class="flex items-center space-x-2">
<span class="w-2.5 h-2.5 rounded-full bg-white animate-pulse"></span>
<span>⚠️ OFFLINE BEHEERDERS-PREVIEW: De webshop staat momenteel OFFLINE voor gewone bezoekers. Alleen jij als beheerder ziet deze pagina.</span>
</div>
<div class="flex items-center space-x-2">
<a href="{{ route('admin.content.index') }}" class="px-2.5 py-1 rounded-lg bg-rose-700 hover:bg-rose-800 text-white text-[11px] font-bold transition">
Naar Beheer
</a>
<form action="{{ route('admin.toggle-offline') }}" method="POST" class="inline">
@csrf
<button type="submit" class="px-3 py-1 rounded-lg bg-white text-rose-700 hover:bg-rose-50 text-[11px] font-black shadow transition">
Zet Nu Weer Online
</button>
</form>
</div>
</div>
@endif
<!-- Top Announcement Bar (Inschakelbaar en bewerkbaar via Admin) -->
@if(setting('announcement_enabled', '1') == '1')
<div class="bg-slate-900 text-white text-xs py-2 px-3 sm:px-4 font-bold border-b border-slate-800">