presseportale/resources/views/partials/head.blade.php
Kevin Adametz 9b47296cea
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Rebrand Hub+Flux
2026-05-20 15:44:15 +02:00

44 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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">
<link rel="preconnect" href="https://fonts.bunny.net">
{{-- Hub × FluxUI Phase 1: Inter Tight + JetBrains Mono + Source Serif 4
(Source Serif 4 nur für brand-mark in Headern, deshalb mitgeladen). --}}
<link href="https://fonts.bunny.net/css?family=inter-tight:400,500,600,700|jetbrains-mono:400,500,600|source-serif-4:400,500,600,700" rel="stylesheet" />
{{-- 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>