kithkin/resources/views/layouts/app.blade.php

48 lines
1.3 KiB
PHP

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body id="app">
<!-- app navigation -->
@include('layouts.navigation')
<!-- content -->
<main>
@isset($header)
<header>
{{ $header }}
</header>
@endisset
<article {{ $attributes }}>
{{ $article ?? $slot }}
</article>
</main>
<!-- messages -->
<aside>
@if (session('toast'))
<div
x-data="{ open: true }"
x-show="open"
x-init="setTimeout(() => open = false, 4000)"
class="fixed top-4 right-4 bg-green-600 text-white px-4 py-2 rounded-lg shadow-lg"
x-transition.opacity.duration.300ms
>
{{ session('toast') }}
</div>
@endif
</aside>
<!-- modal -->
<x-modal />
</body>
</html>