Rebrand Hub+Flux
This commit is contained in:
parent
0a3e52d603
commit
9b47296cea
130 changed files with 9357 additions and 3345 deletions
|
|
@ -20,3 +20,25 @@
|
|||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue