43 lines
2 KiB
PHP
43 lines
2 KiB
PHP
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
||
<title>{{ $title ?? config('app.name') }}</title>
|
||
|
||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||
|
||
{{-- Hub × FluxUI Phase 1: Inter Tight + JetBrains Mono + Source Serif 4
|
||
(Source Serif 4 nur für brand-mark in Headern, deshalb mitgeladen). --}}
|
||
@include('partials.local-fonts')
|
||
|
||
{{-- Phase 1 Refinement: NUR portal.css einbinden — KEIN resources/js/app.js.
|
||
app.js startet Alpine via `Alpine.start()`, aber @fluxScripts (am Ende
|
||
des <body>) bringt bereits eine eigene Alpine-Instanz mit. Geladen
|
||
wir beides, läuft Alpine doppelt — Browser-Warning
|
||
"Detected multiple instances of Alpine running" und kaputte Bindings.
|
||
Für x-data im Portal greift Alpine aus @fluxScripts. --}}
|
||
@vite(['resources/css/portal.css'], 'build/portal')
|
||
@fluxAppearance
|
||
|
||
{{-- Phase 5 Anti-Flash-Bridge: FluxUI speichert die Erscheinung nur in
|
||
LocalStorage. Bei wire:navigate morpht Livewire das DOM und das neue
|
||
HTML kommt vom Server OHNE class="dark" → kurzer weißer Flash, bis das
|
||
JS die Klasse wieder anhängt. Wir spiegeln den effektiv applizierten
|
||
Modus in ein Cookie, das der Server beim nächsten Render liest und
|
||
class="dark" direkt im <html>-Tag setzt (siehe Layout-Files). --}}
|
||
<script>
|
||
(function () {
|
||
if (typeof window.Flux === 'undefined') return;
|
||
const writeCookie = () => {
|
||
const applied = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
||
document.cookie = 'flux_appearance=' + applied + '; path=/; max-age=31536000; SameSite=Lax';
|
||
};
|
||
const original = window.Flux.applyAppearance;
|
||
window.Flux.applyAppearance = function (appearance) {
|
||
original.call(this, appearance);
|
||
writeCookie();
|
||
};
|
||
writeCookie();
|
||
})();
|
||
</script>
|