mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 17:11:09 -05:00
- Implemented park card component with image, status badge, favorite button, and quick stats overlay. - Developed ride card component featuring thrill level badge, status badge, favorite button, and detailed stats. - Created advanced search page with filters for parks and rides, including location, type, status, and thrill level. - Added dynamic quick search functionality with results display. - Enhanced user experience with JavaScript for filter toggling, range slider updates, and view switching. - Included custom CSS for improved styling of checkboxes and search results layout.
16 lines
413 B
JavaScript
16 lines
413 B
JavaScript
/**
|
|
* Theme management script
|
|
* Prevents flash of wrong theme by setting theme class immediately
|
|
*/
|
|
(function() {
|
|
let theme = localStorage.getItem("theme");
|
|
if (!theme) {
|
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
? "dark"
|
|
: "light";
|
|
localStorage.setItem("theme", theme);
|
|
}
|
|
if (theme === "dark") {
|
|
document.documentElement.classList.add("dark");
|
|
}
|
|
})(); |