upgrade to tamagui v2 and guest pwa overhaul
This commit is contained in:
45
resources/views/guest-v2.blade.php
Normal file
45
resources/views/guest-v2.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ config('app.name', 'Fotospiel') }} - Guest V2</title>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<link rel="icon" href="{{ asset('favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png') }}">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
@viteReactRefresh
|
||||
@vite(['resources/css/app.css', 'resources/js/guest-v2/main.tsx'])
|
||||
@php
|
||||
$guestRuntimeConfig = [
|
||||
'push' => [
|
||||
'enabled' => config('push.enabled', false),
|
||||
'vapidPublicKey' => config('push.vapid.public_key'),
|
||||
],
|
||||
];
|
||||
$matomoConfig = config('services.matomo');
|
||||
$matomoGuest = ($matomoConfig['enabled'] ?? false) && !empty($matomoConfig['url']) && !empty($matomoConfig['site_id_guest'])
|
||||
? [
|
||||
'enabled' => true,
|
||||
'url' => rtrim($matomoConfig['url'], '/'),
|
||||
'siteId' => (string) $matomoConfig['site_id_guest'],
|
||||
]
|
||||
: ['enabled' => false];
|
||||
@endphp
|
||||
<script nonce="{{ $cspNonce }}">
|
||||
window.__GUEST_RUNTIME_CONFIG__ = {!! json_encode($guestRuntimeConfig) !!};
|
||||
window.__MATOMO_GUEST__ = {!! json_encode($matomoGuest) !!};
|
||||
</script>
|
||||
<style nonce="{{ $cspStyleNonce }}">
|
||||
#root { min-height: 100vh; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; font-family: system-ui, sans-serif;">
|
||||
This app requires JavaScript to run.
|
||||
</div>
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user