(function() { const body = document.body; const prefersDark = window.matchMedia('(prefers-color-scheme: dark)'); // ๐Ÿงน Hapus dulu class default dari tema biar nggak ke-lock di dark body.classList.remove('dark-theme', 'light-theme'); function applyTheme(mode) { if (mode === 'dark') { body.classList.add('dark-theme'); body.classList.remove('light-theme'); } else { body.classList.add('light-theme'); body.classList.remove('dark-theme'); } updateLogos(mode); } function updateLogos(mode) { document.querySelectorAll('.logo-light, .logo-dark').forEach(img => { img.style.display = 'none'; }); if (mode === 'dark') { document.querySelectorAll('.logo-dark').forEach(img => img.style.display = 'inline'); } else { document.querySelectorAll('.logo-light').forEach(img => img.style.display = 'inline'); } } // ๐Ÿ”ฅ Terapkan tema default sesuai preferensi OS/device applyTheme(prefersDark.matches ? 'dark' : 'light'); // ๐Ÿ” Dengar perubahan realtime dari sistem (tanpa reload) prefersDark.addEventListener('change', e => { applyTheme(e.matches ? 'dark' : 'light'); }); // ๐Ÿ–ฒ๏ธ Tombol toggle manual (tanpa localStorage) const toggleBtn = document.querySelector('#theme-toggle'); if (toggleBtn) { toggleBtn.addEventListener('click', () => { const isDark = body.classList.contains('dark-theme'); applyTheme(isDark ? 'light' : 'dark'); }); } })();
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the fast-indexing-api domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/metp5898/public_html/fokus.co.id/wp-includes/functions.php on line 6121

Warning: Cannot modify header information - headers already sent by (output started at /home/metp5898/public_html/fokus.co.id/wp-content/plugins/dark-mode-logo-switcher/dark-mode-logo-switcher.php:1) in /home/metp5898/public_html/fokus.co.id/wp-includes/feed-rss2-comments.php on line 8
Komentar di: Sejarah Natal dan Tahun Baru: Perayaan dan Maknanya https://fokus.co.id/21-pos-pengamanan-arus-mudik-dan-wisata-nataru Media Berita Terbaru Terpopuler Hari Ini Mon, 23 Jun 2025 05:48:29 +0000 hourly 1 https://wordpress.org/?v=6.8.3