auditionadmin/resources/views/components/layout/app.blade.php

60 lines
2.2 KiB
PHP

@php use App\Settings; @endphp
@props(['page_title' => false, 'title_bar_right' => false ])
<!doctype html>
<html lang="en" class="h-full bg-gray-100">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>AuditionAdmin</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
{{-- Code below from https://codepen.io/ryangjchandler/pen/WNQQKeR --}}
{{-- JS for sorting tables by a column --}}
{{-- Sortable columns need this on their <th>: @click="sortByColumn" class="cursor-pointer select-none" --}}
{{-- One level above the table needs x-data="data()" --}}
{{-- tbody needs x-ref="tbody" --}}
<script src="{{ asset('js/sort_table_by_column.js') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js"></script>
</head>
<body {{ $attributes->merge(['class' => 'h-full']) }}>
<div class="min-h-full">
@if(session()->has('impersonator_id'))
<div class="bg-red-500 text-white ml pl-10 py-2">
Currently impersonating {{ auth()->user()->full_name() }}
<x-form.form method="post" action="{{ route('impersonate.stop') }}">
<button>End Impersonation</button>
</x-form.form>
</div>
@endif
{{-- @if(request()->is('*admin*'))--}}
{{-- <x-layout.navbar.navbar-admin />--}}
{{-- @else--}}
{{-- <x-layout.navbar.navbar />--}}
{{-- @endif--}}
<x-layout.navbar.navbar />
@if($page_title)
<x-layout.page-header>
{{ $page_title }}
@if($title_bar_right)
<x-slot:title_bar_right>{{ $title_bar_right }}</x-slot:title_bar_right>
@endif
</x-layout.page-header>
@endif
{{-- @php(dump(session()->get('oldScores')))--}}
<main {{ $attributes }}>
<div class="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
<x-flash_message></x-flash_message>
{{ $slot }}
</div>
</main>
</div>
<x-layout.footer />
</body>
</html>