174 lines
8.8 KiB
PHP
174 lines
8.8 KiB
PHP
<!DOCTYPE html>
|
|
{{-- Phase 5: Anti-Flash. class="dark" nicht mehr hardcoded — Server liest
|
|
das `flux_appearance`-Cookie (vom JS-Bridge in partials/admin-head.blade.php
|
|
gesetzt) und rendert es direkt im <html>. --}}
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" @class(['dark' => request()->cookie('flux_appearance') === 'dark'])>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
|
|
<title>@yield('title', $domainName ?? 'Admin - ' . config('app.name'))</title>
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="{{ asset('img/favicons/admin-favicon.ico') }}">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600,700" rel="stylesheet" />
|
|
|
|
<!-- Styles -->
|
|
@vite(['resources/css/portal.css', 'resources/js/app.js'], 'build/portal')
|
|
|
|
<!-- Additional Styles -->
|
|
@stack('styles')
|
|
</head>
|
|
|
|
<body class="antialiased bg-gray-50 dark:bg-gray-900">
|
|
<div class="min-h-screen flex">
|
|
<!-- Sidebar Navigation -->
|
|
<aside class="w-64 bg-white dark:bg-gray-800 shadow-md hidden md:block">
|
|
<div class="p-6">
|
|
<a href="{{ route('dashboard') }}" class="text-xl font-bold text-gray-900 dark:text-white">
|
|
{{ $domainName ?? config('app.name') . ' Admin' }}
|
|
</a>
|
|
</div>
|
|
|
|
<nav class="mt-10 px-6">
|
|
<a href="{{ route('dashboard') }}"
|
|
class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 dark:hover:bg-gray-700 {{ request()->routeIs('dashboard') ? 'bg-gray-100 dark:bg-gray-700' : '' }}">
|
|
Dashboard
|
|
</a>
|
|
<a href="{{ route('settings.profile') }}"
|
|
class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 dark:hover:bg-gray-700 {{ request()->routeIs('settings.profile') ? 'bg-gray-100 dark:bg-gray-700' : '' }}">
|
|
Profil
|
|
</a>
|
|
<!-- Weitere Navigationspunkte hier -->
|
|
</nav>
|
|
</aside>
|
|
|
|
<div class="flex-1 flex flex-col">
|
|
<!-- Top Navigation -->
|
|
<header class="bg-white dark:bg-gray-800 shadow-sm">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex justify-between h-16">
|
|
<div class="flex items-center md:hidden">
|
|
<!-- Mobile menu button -->
|
|
<button type="button"
|
|
class="text-gray-500 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500"
|
|
id="mobile-menu-button">
|
|
<span class="sr-only">Menu öffnen</span>
|
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
d="M4 6h16M4 12h16M4 18h16" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="flex items-center">
|
|
@if (app()->environment('local'))
|
|
<!-- Domain-Informationsanzeige (nur in local) -->
|
|
<div
|
|
class="mr-4 text-xs px-2 py-1 rounded bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200">
|
|
{{ Request::getHost() }}
|
|
@if (config('domains.dev_settings.simulate_domain'))
|
|
<span
|
|
class="inline-flex items-center ml-1 px-1.5 py-0.5 rounded-full text-xs bg-yellow-100 text-yellow-800">
|
|
Simuliert
|
|
</span>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
<!-- User Dropdown -->
|
|
<div class="ml-3 relative">
|
|
<div>
|
|
<button type="button"
|
|
class="flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
|
id="user-menu-button">
|
|
<span class="sr-only">Benutzermenü öffnen</span>
|
|
<div class="h-8 w-8 rounded-full bg-gray-200 flex items-center justify-center">
|
|
<span class="text-xs font-medium">{{ Auth::user()->name[0] ?? 'U' }}</span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Dropdown menu -->
|
|
<div class="hidden origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white dark:bg-gray-700 ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
role="menu" id="user-menu">
|
|
<a href="{{ route('settings.profile') }}"
|
|
class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
role="menuitem">Profil</a>
|
|
<a href="{{ route('settings.appearance') }}"
|
|
class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
role="menuitem">Einstellungen</a>
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit"
|
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
role="menuitem">Abmelden</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Mobile menu (off-canvas) -->
|
|
<div class="md:hidden hidden" id="mobile-menu">
|
|
<div class="px-2 pt-2 pb-3 space-y-1 bg-white dark:bg-gray-800 shadow-lg">
|
|
<a href="{{ route('dashboard') }}"
|
|
class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">Dashboard</a>
|
|
<a href="{{ route('settings.profile') }}"
|
|
class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">Profil</a>
|
|
<!-- Weitere mobile Navigationspunkte hier -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Page Content -->
|
|
<main class="flex-1 py-10">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
@yield('content')
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Scripts -->
|
|
<script>
|
|
// Toggle user dropdown
|
|
const userMenuButton = document.getElementById('user-menu-button');
|
|
const userMenu = document.getElementById('user-menu');
|
|
|
|
if (userMenuButton && userMenu) {
|
|
userMenuButton.addEventListener('click', function() {
|
|
userMenu.classList.toggle('hidden');
|
|
});
|
|
|
|
// Close the dropdown when clicked outside
|
|
document.addEventListener('click', function(event) {
|
|
if (!userMenuButton.contains(event.target) && !userMenu.contains(event.target)) {
|
|
userMenu.classList.add('hidden');
|
|
}
|
|
});
|
|
}
|
|
|
|
// Mobile menu toggle
|
|
const mobileMenuButton = document.getElementById('mobile-menu-button');
|
|
const mobileMenu = document.getElementById('mobile-menu');
|
|
|
|
if (mobileMenuButton && mobileMenu) {
|
|
mobileMenuButton.addEventListener('click', function() {
|
|
mobileMenu.classList.toggle('hidden');
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<!-- Additional Scripts -->
|
|
@stack('scripts')
|
|
</body>
|
|
|
|
</html>
|