parfum/resources/views/components/layouts/studio.blade.php

50 lines
1.9 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.0">
<title>{{ $title }} | {{ config('app.name') }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles
@fluxAppearance
<link rel="icon" type="image/png" href="{{ asset('assets/images/logo.png') }}">
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
</head>
<body class="min-h-screen bg-white dark:bg-zinc-800">
@include('components.partials.studio._sidebar')
@include('components.partials.studio._header')
@persist('toast')
<flux:toast position="bottom end" class="ps-6" />
@endpersist
{{ $slot }}
@fluxScripts
@livewireScriptConfig
<script>
document.addEventListener('livewire:navigated', () => {
Notification.requestPermission().then((permission) => {
if (permission === 'granted') {
navigator.serviceWorker.ready.then((sw) => {
sw.pushManager.subscribe({
userVisibleOnly: true,
applicationServerKey: '{{ config('services.vapid.public_key') }}',
}).then((subscription) => {
const json = JSON.stringify(subscription)
Livewire.dispatch('notification:subscribe', {
subscription: json
})
})
})
}
})
})
</script>
</body>
</html>