mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 11:11:10 -05:00
fixed some thing, fixed turnstile and the ride link i think
This commit is contained in:
@@ -34,71 +34,6 @@
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
|
||||
<!-- Theme Management -->
|
||||
<script>
|
||||
// Theme management
|
||||
const themeManager = {
|
||||
init() {
|
||||
// Set up toggle button when DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const toggleBtn = document.getElementById('theme-toggle');
|
||||
if (toggleBtn) {
|
||||
toggleBtn.addEventListener('click', () => {
|
||||
this.toggleTheme();
|
||||
});
|
||||
}
|
||||
|
||||
// Watch for system theme changes
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
|
||||
if (!localStorage.theme) {
|
||||
this.setTheme(e.matches ? 'dark' : 'light');
|
||||
}
|
||||
});
|
||||
|
||||
// Set initial theme icon state
|
||||
this.updateThemeIcon();
|
||||
});
|
||||
},
|
||||
|
||||
setTheme(theme) {
|
||||
if (theme === 'dark') {
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
|
||||
localStorage.setItem('theme', theme);
|
||||
this.updateThemeIcon();
|
||||
},
|
||||
|
||||
toggleTheme() {
|
||||
const isDark = document.documentElement.classList.contains('dark');
|
||||
this.setTheme(isDark ? 'light' : 'dark');
|
||||
},
|
||||
|
||||
updateThemeIcon() {
|
||||
const isDark = document.documentElement.classList.contains('dark');
|
||||
const sunIcon = document.querySelector('#theme-toggle .fa-sun');
|
||||
const moonIcon = document.querySelector('#theme-toggle .fa-moon');
|
||||
|
||||
if (sunIcon && moonIcon) {
|
||||
// Show sun icon in dark mode (to indicate you can switch to light)
|
||||
// Show moon icon in light mode (to indicate you can switch to dark)
|
||||
if (isDark) {
|
||||
sunIcon.classList.remove('hidden');
|
||||
moonIcon.classList.add('hidden');
|
||||
} else {
|
||||
sunIcon.classList.add('hidden');
|
||||
moonIcon.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize theme management
|
||||
themeManager.init();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Smooth theme transitions */
|
||||
:root {
|
||||
@@ -161,8 +96,7 @@
|
||||
<div class="flex items-center space-x-6">
|
||||
<!-- Theme Toggle -->
|
||||
<button id="theme-toggle" class="inline-flex items-center justify-center p-2 text-gray-500 transition-all border border-gray-200 rounded-lg bg-white/80 dark:bg-gray-700/80 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600 dark:border-gray-600">
|
||||
<i class="hidden text-lg fas fa-sun"></i>
|
||||
<i class="hidden text-lg fas fa-moon"></i>
|
||||
<i class="text-lg fas fa-moon"></i>
|
||||
</button>
|
||||
|
||||
<!-- User Menu -->
|
||||
|
||||
Reference in New Issue
Block a user