64 lines
3.6 KiB
PHP
64 lines
3.6 KiB
PHP
<!doctype html>
|
||
<html lang="en">
|
||
<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', 'Administration') — BeatBook</title>
|
||
<script>
|
||
(() => {
|
||
const saved = localStorage.getItem('beatbook-admin-theme') || 'system';
|
||
const dark = saved === 'dark' || (saved === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||
document.documentElement.dataset.adminTheme = dark ? 'dark' : 'light';
|
||
document.documentElement.dataset.adminThemePreference = saved;
|
||
})();
|
||
</script>
|
||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||
</head>
|
||
<body class="admin-body">
|
||
<div class="admin-shell">
|
||
<aside class="admin-sidebar" id="adminSidebar">
|
||
<div class="admin-sidebar-head">
|
||
<a class="brand" href="{{ route('admin.dashboard') }}"><b>◉</b> BeatBook</a>
|
||
<button class="icon-button admin-close" type="button" data-admin-close aria-label="Close menu">×</button>
|
||
</div>
|
||
<div class="admin-kicker">Administration</div>
|
||
<nav class="admin-nav">
|
||
<a class="{{ request()->routeIs('admin.dashboard') ? 'active' : '' }}" href="{{ route('admin.dashboard') }}">Overview</a>
|
||
@foreach([
|
||
'users' => 'Users', 'clients' => 'Clients', 'djs' => 'DJs', 'businesses' => 'Businesses', 'bookings' => 'Bookings',
|
||
'payments' => 'Payments', 'reviews' => 'Reviews', 'messages' => 'Messages', 'notifications' => 'Notifications',
|
||
'support' => 'Support', 'reports' => 'Reports', 'content' => 'Content', 'roles' => 'Roles & permissions',
|
||
'privacy' => 'Privacy', 'settings' => 'Settings'
|
||
] as $key => $label)
|
||
<a class="{{ request()->is('admin/'.$key) || request()->is('admin/'.$key.'/*') ? 'active' : '' }}" href="{{ route('admin.resources.index', $key) }}">{{ $label }}</a>
|
||
@endforeach
|
||
</nav>
|
||
<div class="admin-sidebar-foot">
|
||
<a href="{{ route('home') }}">View public site</a>
|
||
<a href="{{ route('dashboard') }}">My account</a>
|
||
<form method="post" action="{{ route('logout') }}">@csrf<button type="submit">Sign out</button></form>
|
||
</div>
|
||
</aside>
|
||
<div class="admin-overlay" data-admin-overlay></div>
|
||
<main class="admin-content">
|
||
<header class="admin-topbar">
|
||
<button class="icon-button admin-menu" type="button" data-admin-open aria-label="Open menu">☰</button>
|
||
<div><strong>@yield('page-title', 'Administration')</strong><span>{{ auth()->user()->name }}</span></div>
|
||
<div class="admin-topbar-actions">
|
||
<div class="admin-theme-switcher" role="group" aria-label="Appearance">
|
||
<button type="button" data-admin-theme="light" title="Light mode" aria-label="Use light mode">☀</button>
|
||
<button type="button" data-admin-theme="system" title="System appearance" aria-label="Use system appearance">◐</button>
|
||
<button type="button" data-admin-theme="dark" title="Dark mode" aria-label="Use dark mode">☾</button>
|
||
</div>
|
||
<a class="button small" href="{{ route('home') }}">Public site</a>
|
||
</div>
|
||
</header>
|
||
@if(session('success'))<div class="admin-flash">{{ session('success') }}</div>@endif
|
||
@if(session('error'))<div class="admin-flash error">{{ session('error') }}</div>@endif
|
||
<div class="admin-page">@yield('content')</div>
|
||
</main>
|
||
</div>
|
||
</body>
|
||
</html>
|