Codeblock
1<!DOCTYPE html>2<html lang="de" data-bs-theme="light">3<script>4    // localStorage überschreibt den PHP-Standardwert sofort – kein Flackern5    (function() {6        var saved = localStorage.getItem('theme');7        if (saved = 'dark' || saved = 'light') {8            document.documentElement.setAttribute('data-bs-theme', saved);9        }10    })();


Alte darstellung