49 lines
2 KiB
PHP
49 lines
2 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@yield('title', 'Admin') — Admin</title>
|
|
<!-- Styles / Scripts -->
|
|
@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot')))
|
|
@vite(['resources/css/app.css', 'resources/js/admin.js'])
|
|
@endif
|
|
</head>
|
|
<body class="bg-gray-100 min-h-screen">
|
|
|
|
@php
|
|
$channels = \App\Models\Channel::orderBy('name')->get();
|
|
$activeChannel = \App\Models\Channel::find(session('admin.active_channel_id'))
|
|
?? $channels->first();
|
|
@endphp
|
|
|
|
<nav class="bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between">
|
|
<div class="flex items-center gap-6">
|
|
<a href="{{ route('admin.dashboard') }}" class="font-semibold text-gray-800 text-sm">Admin</a>
|
|
|
|
@include('admin::components.channel-selector', array_merge(compact('channels', 'activeChannel'), ['locked' => trim($__env->yieldContent('lock-channel-selector')) === '1']))
|
|
|
|
<a href="{{ route('admin.posts.index') }}"
|
|
class="text-sm text-gray-600 hover:text-gray-900">Posts</a>
|
|
<a href="{{ route('admin.taxonomy.index') }}"
|
|
class="text-sm text-gray-600 hover:text-gray-900">Taxonomy</a>
|
|
<a href="{{ route('admin.settings.channels.index') }}"
|
|
class="text-sm text-gray-600 hover:text-gray-900">Settings</a>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-4 text-sm text-gray-500">
|
|
<span>{{ auth()->user()->name }}</span>
|
|
<form method="POST" action="{{ route('admin.logout') }}" class="inline">
|
|
@csrf
|
|
<button type="submit" class="hover:text-gray-800 cursor-pointer">Sign out</button>
|
|
</form>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="max-w-7xl mx-auto px-6 py-6">
|
|
@include('admin::components.flash')
|
|
@yield('content')
|
|
</main>
|
|
|
|
</body>
|
|
</html>
|