Default Bootstrap theme to dark mode
All checks were successful
linter / quality (pull_request) Successful in 1m51s
security / Dependency Audit (pull_request) Successful in 1m24s
security / Static Analysis (pull_request) Successful in 1m53s
tests / ci (8.4) (pull_request) Successful in 1m28s
tests / ci (8.5) (pull_request) Successful in 1m54s

- Change default theme from light to dark for first-time visitors
- Fix Alpine reactive theme toggle so icons and data-bs-theme update correctly
- Remove hardcoded bg-light classes that prevented dark mode from applying
- Fix broken duplicate Bootstrap bundle import in app.js
This commit is contained in:
2026-03-06 02:49:17 +00:00
parent dd3c623bfc
commit e07984fa97
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
x-init="$watch('theme', val => { document.documentElement.setAttribute('data-bs-theme', val); localStorage.setItem('theme', val); }); document.documentElement.setAttribute('data-bs-theme', theme);"
:data-bs-theme="theme"
>

View File

@@ -1,6 +1,6 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
x-init="document.documentElement.setAttribute('data-bs-theme', theme);"
:data-bs-theme="theme"
>