80 lines
3.4 KiB
PHP
80 lines
3.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" translate="no" @class(['notranslate', 'dark' => ($appearance ?? 'system') == 'dark'])>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
|
<meta name="theme-color" content="#383838" media="(prefers-color-scheme: dark)">
|
|
<meta name="google" content="notranslate">
|
|
|
|
{{-- Inline script to detect system dark mode preference and apply it immediately --}}
|
|
<script>
|
|
(function() {
|
|
const appearance = @json($appearance ?? 'system');
|
|
|
|
if (appearance === 'system') {
|
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
|
|
if (prefersDark) {
|
|
document.documentElement.classList.add('dark');
|
|
}
|
|
}
|
|
|
|
var chartScheme = @json($chartColorScheme ?? 'colorful');
|
|
|
|
try {
|
|
chartScheme = localStorage.getItem('chart-color-scheme') || chartScheme;
|
|
} catch (error) {}
|
|
|
|
if (chartScheme && chartScheme !== 'neutral') {
|
|
document.documentElement.setAttribute('data-chart-color', chartScheme);
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
{{-- Inline style to set the HTML background color based on our theme in app.css --}}
|
|
<style>
|
|
html {
|
|
background-color: oklch(1 0 0);
|
|
}
|
|
|
|
html.dark {
|
|
background-color: oklch(0.145 0 0);
|
|
}
|
|
</style>
|
|
|
|
<title inertia>{{ config('app.name', 'Laravel') }}</title>
|
|
|
|
<link rel="icon" type="image/png" href="/favicon/favicon-96x96.png" sizes="96x96" />
|
|
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
|
|
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
|
<link rel="apple-touch-icon" href="/favicon/apple-touch-icon.svg" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
|
|
<meta name="apple-mobile-web-app-title" content="Whisper Money" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<link rel="manifest" href="/favicon/site.webmanifest" />
|
|
|
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&family=Stack+Sans+Text:wght@200..700&display=swap" rel="stylesheet">
|
|
|
|
@viteReactRefresh
|
|
@vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"])
|
|
@inertiaHead
|
|
</head>
|
|
<body class="font-sans antialiased">
|
|
@inertia
|
|
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/sw.js', { scope: '/' }).catch(function () {});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|