fixed some thing, fixed turnstile and the ride link i think

This commit is contained in:
pacnpal
2024-10-29 16:47:10 -04:00
parent c0e5a1a21c
commit 7b8ca127a5
9 changed files with 135 additions and 123 deletions

View File

@@ -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 -->