feat: Add detailed park and ride pages with HTMX integration

- Implemented park detail page with dynamic content loading for rides and weather.
- Created park list page with filters and search functionality.
- Developed ride detail page showcasing ride stats, reviews, and similar rides.
- Added ride list page with filtering options and dynamic loading.
- Introduced search results page with tabs for parks, rides, and users.
- Added HTMX tests for global search functionality.
This commit is contained in:
pacnpal
2025-12-19 19:53:20 -05:00
parent bf04e4d854
commit b9063ff4f8
154 changed files with 4536 additions and 2570 deletions

View File

@@ -1,3 +1,4 @@
{% load static %}
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
@@ -11,745 +12,72 @@
<meta property="og:url" content="{% block og_url %}{{ request.build_absolute_uri }}{% endblock %}">
<meta property="og:title" content="{% block og_title %}{% block title %}ThrillWiki{% endblock %}{% endblock %}">
<meta property="og:description" content="{% block og_description %}{% block meta_description %}ThrillWiki - Your comprehensive guide to theme parks and roller coasters{% endblock %}{% endblock %}">
<meta property="og:image" content="{% block og_image %}{% load static %}{% static 'images/og-default.jpg' %}{% endblock %}">
<meta property="og:image" content="{% block og_image %}{% static 'images/og-default.jpg' %}{% endblock %}">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="{% block twitter_url %}{{ request.build_absolute_uri }}{% endblock %}">
<meta property="twitter:title" content="{% block twitter_title %}{% block title %}ThrillWiki{% endblock %}{% endblock %}">
<meta property="twitter:description" content="{% block twitter_description %}{% block meta_description %}ThrillWiki - Your comprehensive guide to theme parks and roller coasters{% endblock %}{% endblock %}">
<meta property="twitter:image" content="{% block twitter_image %}{% load static %}{% static 'images/twitter-default.jpg' %}{% endblock %}">
<meta property="twitter:image" content="{% block twitter_image %}{% static 'images/twitter-default.jpg' %}{% endblock %}">
<title>{% block title %}ThrillWiki{% endblock %}</title>
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="{% load static %}{% static 'favicon.ico' %}">
<link rel="apple-touch-icon" sizes="180x180" href="{% load static %}{% static 'apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% load static %}{% static 'favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% load static %}{% static 'favicon-16x16.png' %}">
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}">
<!-- Preconnect to external domains -->
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- CSS -->
{% load static %}
<link href="{% static 'css/design-tokens.css' %}" rel="stylesheet">
<link href="{% static 'css/tailwind.css' %}" rel="stylesheet">
{% block extra_css %}{% endblock %}
<!-- Design System CSS Variables -->
<style>
:root {
/* Primary Colors */
--color-primary-50: #eff6ff;
--color-primary-100: #dbeafe;
--color-primary-200: #bfdbfe;
--color-primary-300: #93c5fd;
--color-primary-400: #60a5fa;
--color-primary-500: #3b82f6;
--color-primary-600: #2563eb;
--color-primary-700: #1d4ed8;
--color-primary-800: #1e40af;
--color-primary-900: #1e3a8a;
--color-primary-950: #172554;
/* Secondary Colors */
--color-secondary-50: #f8fafc;
--color-secondary-100: #f1f5f9;
--color-secondary-200: #e2e8f0;
--color-secondary-300: #cbd5e1;
--color-secondary-400: #94a3b8;
--color-secondary-500: #64748b;
--color-secondary-600: #475569;
--color-secondary-700: #334155;
--color-secondary-800: #1e293b;
--color-secondary-900: #0f172a;
--color-secondary-950: #020617;
/* Accent Colors */
--color-accent-50: #fef2f2;
--color-accent-100: #fee2e2;
--color-accent-200: #fecaca;
--color-accent-300: #fca5a5;
--color-accent-400: #f87171;
--color-accent-500: #ef4444;
--color-accent-600: #dc2626;
--color-accent-700: #b91c1c;
--color-accent-800: #991b1b;
--color-accent-900: #7f1d1d;
--color-accent-950: #450a0a;
/* Success Colors */
--color-success-50: #f0fdf4;
--color-success-100: #dcfce7;
--color-success-200: #bbf7d0;
--color-success-300: #86efac;
--color-success-400: #4ade80;
--color-success-500: #22c55e;
--color-success-600: #16a34a;
--color-success-700: #15803d;
--color-success-800: #166534;
--color-success-900: #14532d;
--color-success-950: #052e16;
/* Warning Colors */
--color-warning-50: #fffbeb;
--color-warning-100: #fef3c7;
--color-warning-200: #fde68a;
--color-warning-300: #fcd34d;
--color-warning-400: #fbbf24;
--color-warning-500: #f59e0b;
--color-warning-600: #d97706;
--color-warning-700: #b45309;
--color-warning-800: #92400e;
--color-warning-900: #78350f;
--color-warning-950: #451a03;
/* Error Colors */
--color-error-50: #fef2f2;
--color-error-100: #fee2e2;
--color-error-200: #fecaca;
--color-error-300: #fca5a5;
--color-error-400: #f87171;
--color-error-500: #ef4444;
--color-error-600: #dc2626;
--color-error-700: #b91c1c;
--color-error-800: #991b1b;
--color-error-900: #7f1d1d;
--color-error-950: #450a0a;
/* Typography */
--font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
--font-family-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', Times, serif;
--font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
/* Font Sizes */
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-2xl: 1.5rem;
--font-size-3xl: 1.875rem;
--font-size-4xl: 2.25rem;
--font-size-5xl: 3rem;
--font-size-6xl: 3.75rem;
--font-size-7xl: 4.5rem;
--font-size-8xl: 6rem;
--font-size-9xl: 8rem;
/* Line Heights */
--line-height-none: 1;
--line-height-tight: 1.25;
--line-height-snug: 1.375;
--line-height-normal: 1.5;
--line-height-relaxed: 1.625;
--line-height-loose: 2;
/* Spacing */
--spacing-px: 1px;
--spacing-0: 0;
--spacing-1: 0.25rem;
--spacing-2: 0.5rem;
--spacing-3: 0.75rem;
--spacing-4: 1rem;
--spacing-5: 1.25rem;
--spacing-6: 1.5rem;
--spacing-8: 2rem;
--spacing-10: 2.5rem;
--spacing-12: 3rem;
--spacing-16: 4rem;
--spacing-20: 5rem;
--spacing-24: 6rem;
--spacing-32: 8rem;
--spacing-40: 10rem;
--spacing-48: 12rem;
--spacing-56: 14rem;
--spacing-64: 16rem;
/* Shadows */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
--shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
--shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
/* Border Radius */
--radius-none: 0;
--radius-sm: 0.125rem;
--radius-base: 0.25rem;
--radius-md: 0.375rem;
--radius-lg: 0.5rem;
--radius-xl: 0.75rem;
--radius-2xl: 1rem;
--radius-3xl: 1.5rem;
--radius-full: 9999px;
/* Transitions */
--transition-none: none;
--transition-all: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-colors: color, background-color, border-color, text-decoration-color, fill, stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-opacity: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-shadow: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-transform: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
/* Z-Index */
--z-0: 0;
--z-10: 10;
--z-20: 20;
--z-30: 30;
--z-40: 40;
--z-50: 50;
--z-auto: auto;
}
/* Dark mode variables */
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--color-secondary-900);
--color-foreground: var(--color-secondary-50);
--color-muted: var(--color-secondary-800);
--color-muted-foreground: var(--color-secondary-400);
--color-border: var(--color-secondary-700);
--color-input: var(--color-secondary-800);
--color-card: var(--color-secondary-800);
--color-card-foreground: var(--color-secondary-50);
--color-popover: var(--color-secondary-800);
--color-popover-foreground: var(--color-secondary-50);
}
}
/* Light mode variables */
:root {
--color-background: var(--color-secondary-50);
--color-foreground: var(--color-secondary-900);
--color-muted: var(--color-secondary-100);
--color-muted-foreground: var(--color-secondary-500);
--color-border: var(--color-secondary-200);
--color-input: var(--color-secondary-50);
--color-card: var(--color-secondary-50);
--color-card-foreground: var(--color-secondary-900);
--color-popover: var(--color-secondary-50);
--color-popover-foreground: var(--color-secondary-900);
}
/* Dark mode override when .dark class is present */
.dark {
--color-background: var(--color-secondary-900);
--color-foreground: var(--color-secondary-50);
--color-muted: var(--color-secondary-800);
--color-muted-foreground: var(--color-secondary-400);
--color-border: var(--color-secondary-700);
--color-input: var(--color-secondary-800);
--color-card: var(--color-secondary-800);
--color-card-foreground: var(--color-secondary-50);
--color-popover: var(--color-secondary-800);
--color-popover-foreground: var(--color-secondary-50);
}
/* Base styles */
body {
font-family: var(--font-family-sans);
background-color: var(--color-background);
color: var(--color-foreground);
line-height: var(--line-height-normal);
}
/* Smooth scrolling */
html {
scroll-behavior: smooth;
}
/* Focus styles for accessibility */
*:focus {
outline: 2px solid var(--color-primary-500);
outline-offset: 2px;
}
/* Skip to content link for accessibility */
.skip-to-content {
position: absolute;
top: -40px;
left: 6px;
background: var(--color-primary-600);
color: white;
padding: 8px;
text-decoration: none;
border-radius: var(--radius-base);
z-index: 1000;
}
.skip-to-content:focus {
top: 6px;
}
/* Loading states */
.loading {
opacity: 0.6;
pointer-events: none;
}
/* HTMX indicators */
.htmx-indicator {
opacity: 0;
transition: var(--transition-opacity);
}
.htmx-request .htmx-indicator {
opacity: 1;
}
.htmx-request.htmx-indicator {
opacity: 1;
}
/* Animation utilities */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-in {
animation: fadeIn 0.3s ease-out;
}
.animate-slide-in-up {
animation: slideInUp 0.3s ease-out;
}
.animate-slide-in-down {
animation: slideInDown 0.3s ease-out;
}
</style>
<!-- HTMX -->
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<!-- Alpine.js -->
<script defer src="https://unpkg.com/@alpinejs/intersect@3.x.x/dist/cdn.min.js"></script>
<script defer src="https://unpkg.com/@alpinejs/persist@3.x.x/dist/cdn.min.js"></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
<!-- App Scripts -->
<script src="{% static 'js/stores/index.js' %}"></script>
</head>
<body class="h-full bg-background text-foreground antialiased"
x-data="{
darkMode: localStorage.getItem('darkMode') === 'true' || (!localStorage.getItem('darkMode') && window.matchMedia('(prefers-color-scheme: dark)').matches),
sidebarOpen: false,
searchOpen: false
}"
x-init="
$watch('darkMode', value => {
localStorage.setItem('darkMode', value);
if (value) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
});
if (darkMode) {
document.documentElement.classList.add('dark');
}
"
:class="{ 'dark': darkMode }">
<body class="h-full font-sans antialiased bg-background text-foreground"
x-data
:class="{ 'dark': $store.theme.isDark }">
<!-- Skip to content link for accessibility -->
<a href="#main-content" class="skip-to-content">Skip to main content</a>
<a href="#main-content" class="z-50 px-4 py-2 rounded-md sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 bg-primary text-primary-foreground">
Skip to main content
</a>
<!-- HTMX Configuration -->
<div hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' style="display: none;"></div>
<!-- Page Layout -->
<div class="min-h-full">
<div class="flex flex-col min-h-full">
<!-- Navigation -->
{% block navigation %}
<nav class="bg-card border-b border-border shadow-sm" role="navigation" aria-label="Main navigation">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<!-- Logo and primary navigation -->
<div class="flex">
<!-- Logo -->
<div class="flex-shrink-0 flex items-center">
<a href="{% url 'home' %}" class="flex items-center space-x-2 text-primary-600 hover:text-primary-700 transition-colors">
<svg class="h-8 w-8" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/>
</svg>
<span class="font-bold text-xl">ThrillWiki</span>
</a>
</div>
<!-- Primary navigation -->
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="{% url 'parks:park_list' %}"
class="border-transparent text-muted-foreground hover:border-primary-300 hover:text-foreground inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors">
Parks
</a>
<a href="{% url 'rides:ride_list' %}"
class="border-transparent text-muted-foreground hover:border-primary-300 hover:text-foreground inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors">
Rides
</a>
<a href="{% url 'manufacturers:manufacturer_list' %}"
class="border-transparent text-muted-foreground hover:border-primary-300 hover:text-foreground inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors">
Manufacturers
</a>
<a href="{% url 'operators:operator_list' %}"
class="border-transparent text-muted-foreground hover:border-primary-300 hover:text-foreground inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors">
Operators
</a>
</div>
</div>
<!-- Search, theme toggle, and user menu -->
<div class="flex items-center space-x-4">
<!-- Search button -->
<button @click="searchOpen = true"
class="p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors"
aria-label="Open search">
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
</button>
<!-- Theme toggle -->
<button @click="darkMode = !darkMode"
class="p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors"
:aria-label="darkMode ? 'Switch to light mode' : 'Switch to dark mode'">
<svg x-show="!darkMode" class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"/>
</svg>
<svg x-show="darkMode" class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"/>
</svg>
</button>
<!-- User menu -->
{% if user.is_authenticated %}
<div class="relative" x-data="{ open: false }">
<button @click="open = !open"
class="flex items-center space-x-2 p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors"
aria-expanded="false" aria-haspopup="true">
<div class="h-6 w-6 bg-primary-500 rounded-full flex items-center justify-center text-white text-sm font-medium">
{{ user.username|first|upper }}
</div>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
</svg>
</button>
<div x-show="open"
@click.away="open = false"
x-transition:enter="transition ease-out duration-100"
x-transition:enter-start="transform opacity-0 scale-95"
x-transition:enter-end="transform opacity-100 scale-100"
x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95"
class="absolute right-0 mt-2 w-48 bg-popover border border-border rounded-md shadow-lg z-50">
<div class="py-1">
<a href="{% url 'accounts:profile' %}"
class="block px-4 py-2 text-sm text-popover-foreground hover:bg-muted transition-colors">
Profile
</a>
<a href="{% url 'accounts:settings' %}"
class="block px-4 py-2 text-sm text-popover-foreground hover:bg-muted transition-colors">
Settings
</a>
{% if user.is_staff %}
<a href="{% url 'moderation:dashboard' %}"
class="block px-4 py-2 text-sm text-popover-foreground hover:bg-muted transition-colors">
Moderation
</a>
{% endif %}
<div class="border-t border-border my-1"></div>
<form method="post" action="{% url 'account_logout' %}" class="block">
{% csrf_token %}
<button type="submit"
class="w-full text-left px-4 py-2 text-sm text-popover-foreground hover:bg-muted transition-colors">
Sign out
</button>
</form>
</div>
</div>
</div>
{% else %}
<div class="flex items-center space-x-2">
<a href="{% url 'account_login' %}"
class="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">
Sign in
</a>
<a href="{% url 'account_signup' %}"
class="bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors">
Sign up
</a>
</div>
{% endif %}
<!-- Mobile menu button -->
<button @click="sidebarOpen = true"
class="sm:hidden p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors"
aria-label="Open mobile menu">
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
</svg>
</button>
</div>
</div>
</div>
</nav>
{% include "components/navigation/navbar.html" %}
{% endblock navigation %}
<!-- Mobile sidebar -->
<div x-show="sidebarOpen"
class="fixed inset-0 z-50 sm:hidden"
x-transition:enter="transition-opacity ease-linear duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition-opacity ease-linear duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<!-- Backdrop -->
<div class="fixed inset-0 bg-black bg-opacity-25" @click="sidebarOpen = false"></div>
<!-- Sidebar -->
<div class="fixed inset-y-0 right-0 max-w-xs w-full bg-card shadow-xl"
x-transition:enter="transition ease-in-out duration-300 transform"
x-transition:enter-start="translate-x-full"
x-transition:enter-end="translate-x-0"
x-transition:leave="transition ease-in-out duration-300 transform"
x-transition:leave-start="translate-x-0"
x-transition:leave-end="translate-x-full">
<div class="flex flex-col h-full">
<div class="flex items-center justify-between p-4 border-b border-border">
<h2 class="text-lg font-semibold">Menu</h2>
<button @click="sidebarOpen = false"
class="p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors"
aria-label="Close mobile menu">
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<nav class="flex-1 px-4 py-6 space-y-2">
<a href="{% url 'parks:park_list' %}"
class="block px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors">
Parks
</a>
<a href="{% url 'rides:ride_list' %}"
class="block px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors">
Rides
</a>
<a href="{% url 'manufacturers:manufacturer_list' %}"
class="block px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors">
Manufacturers
</a>
<a href="{% url 'operators:operator_list' %}"
class="block px-3 py-2 text-base font-medium text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors">
Operators
</a>
</nav>
</div>
</div>
</div>
<!-- Search Modal -->
<div x-show="searchOpen"
class="fixed inset-0 z-50"
x-transition:enter="transition-opacity ease-linear duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition-opacity ease-linear duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<!-- Backdrop -->
<div class="fixed inset-0 bg-black bg-opacity-25" @click="searchOpen = false"></div>
<!-- Search Modal -->
<div class="fixed inset-x-0 top-0 max-w-2xl mx-auto mt-16 bg-card border border-border rounded-lg shadow-xl"
x-transition:enter="transition ease-out duration-300 transform"
x-transition:enter-start="opacity-0 scale-95 translate-y-4"
x-transition:enter-end="opacity-100 scale-100 translate-y-0"
x-transition:leave="transition ease-in duration-200 transform"
x-transition:leave-start="opacity-100 scale-100 translate-y-0"
x-transition:leave-end="opacity-0 scale-95 translate-y-4">
<div class="p-4">
<div class="flex items-center space-x-3">
<svg class="h-5 w-5 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
<input type="text"
placeholder="Search parks, rides, manufacturers..."
class="flex-1 bg-transparent border-none outline-none text-foreground placeholder-muted-foreground"
hx-get="{% url 'search:global_search' %}"
hx-trigger="keyup changed delay:300ms"
hx-target="#search-results"
hx-indicator="#search-loading"
x-ref="searchInput">
<button @click="searchOpen = false"
class="p-1 text-muted-foreground hover:text-foreground transition-colors"
aria-label="Close search">
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<!-- Search Results -->
<div class="mt-4 max-h-96 overflow-y-auto">
<div id="search-loading" class="htmx-indicator flex items-center justify-center py-8">
<div class="animate-spin rounded-full h-6 w-6 border-b-2 border-primary-500"></div>
</div>
<div id="search-results" class="space-y-2">
<!-- Search results will be loaded here via HTMX -->
</div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<main id="main-content" class="flex-1" role="main">
<!-- Page Header -->
{% block page_header %}{% endblock %}
<!-- Breadcrumbs -->
{% block breadcrumbs %}{% endblock %}
<!-- Messages/Alerts -->
{% if messages %}
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
{% for message in messages %}
<div class="mb-4 p-4 rounded-md animate-slide-in-down
{% if message.tags == 'error' %}bg-error-50 border border-error-200 text-error-800 dark:bg-error-900/20 dark:border-error-800 dark:text-error-200
{% elif message.tags == 'warning' %}bg-warning-50 border border-warning-200 text-warning-800 dark:bg-warning-900/20 dark:border-warning-800 dark:text-warning-200
{% elif message.tags == 'success' %}bg-success-50 border border-success-200 text-success-800 dark:bg-success-900/20 dark:border-success-800 dark:text-success-200
{% else %}bg-primary-50 border border-primary-200 text-primary-800 dark:bg-primary-900/20 dark:border-primary-800 dark:text-primary-200
{% endif %}"
x-data="{ show: true }"
x-show="show"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<div class="flex items-center justify-between">
<div class="flex items-center">
{% if message.tags == 'error' %}
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/>
</svg>
{% elif message.tags == 'warning' %}
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/>
</svg>
{% elif message.tags == 'success' %}
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
</svg>
{% else %}
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
</svg>
{% endif %}
<span>{{ message }}</span>
</div>
<button @click="show = false"
class="ml-4 text-current hover:opacity-75 transition-opacity"
aria-label="Dismiss message">
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
</div>
{% endfor %}
</div>
{% endif %}
<!-- Page Content -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
{% block content %}{% endblock %}
</div>
{% block content %}{% endblock %}
</main>
<!-- Footer -->
{% block footer %}
<footer class="bg-card border-t border-border mt-auto" role="contentinfo">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<!-- Brand -->
<div class="col-span-1 md:col-span-2">
<div class="flex items-center space-x-2 text-primary-600 mb-4">
<svg class="h-8 w-8" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/>
</svg>
<span class="font-bold text-xl">ThrillWiki</span>
</div>
<p class="text-muted-foreground mb-4 max-w-md">
Your comprehensive guide to theme parks and roller coasters around the world.
Discover, explore, and share your passion for thrills.
</p>
<div class="flex space-x-4">
<a href="#" class="text-muted-foreground hover:text-foreground transition-colors" aria-label="Twitter">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"/>
</svg>
</a>
<a href="#" class="text-muted-foreground hover:text-foreground transition-colors" aria-label="GitHub">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"/>
</svg>
</a>
</div>
</div>
<!-- Navigation -->
<div>
<h3 class="text-sm font-semibold text-foreground uppercase tracking-wider mb-4">Explore</h3>
<ul class="space-y-3">
<li><a href="{% url 'parks:park_list' %}" class="text-muted-foreground hover:text-foreground transition-colors">Parks</a></li>
<li><a href="{% url 'rides:ride_list' %}" class="text-muted-foreground hover:text-foreground transition-colors">Rides</a></li>
<li><a href="{% url 'manufacturers:manufacturer_list' %}" class="text-muted-foreground hover:text-foreground transition-colors">Manufacturers</a></li>
<li><a href="{% url 'operators:operator_list' %}" class="text-muted-foreground hover:text-foreground transition-colors">Operators</a></li>
</ul>
</div>
<!-- Legal -->
<div>
<h3 class="text-sm font-semibold text-foreground uppercase tracking-wider mb-4">Legal</h3>
<ul class="space-y-3">
<li><a href="{% url 'pages:privacy' %}" class="text-muted-foreground hover:text-foreground transition-colors">Privacy Policy</a></li>
<li><a href="{% url 'pages:terms' %}" class="text-muted-foreground hover:text-foreground transition-colors">Terms of Service</a></li>
</ul>
</div>
</div>
<div class="mt-8 pt-8 border-t border-border">
<p class="text-center text-muted-foreground text-sm">
© {{ current_year|default:"2024" }} ThrillWiki. All rights reserved.
</p>
</div>
</div>
</footer>
{% include "components/navigation/footer.html" %}
{% endblock footer %}
</div>
<!-- JavaScript -->
{% load static %}
<script src="{% static 'js/alpine.min.js' %}" defer></script>
<script src="{% static 'js/cdn.min.js' %}"></script>
<!-- Global Components -->
{% include "components/ui/toast-container.html" %}
<!-- HTMX Configuration -->
<script>
@@ -760,47 +88,43 @@
// Add loading states
document.body.addEventListener('htmx:beforeRequest', function(evt) {
evt.target.classList.add('loading');
evt.target.classList.add('htmx-request');
});
document.body.addEventListener('htmx:afterRequest', function(evt) {
evt.target.classList.remove('loading');
evt.target.classList.remove('htmx-request');
});
// Handle search modal focus
document.body.addEventListener('alpine:init', function() {
Alpine.data('searchModal', () => ({
open: false,
toggle() {
this.open = !this.open;
if (this.open) {
this.$nextTick(() => {
this.$refs.searchInput.focus();
});
}
}
}));
});
// Keyboard shortcuts
document.addEventListener('keydown', function(e) {
// Cmd/Ctrl + K to open search
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
e.preventDefault();
Alpine.store('search').toggle();
}
// Escape to close modals
if (e.key === 'Escape') {
// Close search modal
if (Alpine.store('search') && Alpine.store('search').open) {
Alpine.store('search').open = false;
}
// Handle HTMX errors
document.body.addEventListener('htmx:responseError', function(evt) {
const xhr = evt.detail.xhr;
if (xhr.status >= 500) {
Alpine.store('toast').error('Server error. Please try again later.');
} else if (xhr.status === 403) {
Alpine.store('toast').error('You do not have permission to perform this action.');
} else if (xhr.status === 404) {
Alpine.store('toast').error('Resource not found.');
}
});
});
</script>
<!-- Auth Context -->
<script>
window.__AUTH_USER__ = {% if user.is_authenticated %}{
id: {{ user.id }},
username: "{{ user.username }}",
email: "{{ user.email }}",
avatar: "{{ user.profile.avatar.url|default:'' }}"
}{% else %}null{% endif %};
window.__AUTH_PERMISSIONS__ = [
{% for perm in user.get_all_permissions %}
"{{ perm }}",
{% endfor %}
];
</script>
{% block extra_js %}{% endblock %}
</body>
</html>
</html>

View File

@@ -0,0 +1,9 @@
{% extends "base/base.html" %}
{% block content %}
<div id="main-content-area" hx-history-elt>
{% block main %}
<!-- Content will be swapped here by HTMX -->
{% endblock main %}
</div>
{% endblock content %}

View File

@@ -0,0 +1,88 @@
<div class="overflow-hidden border rounded-md shadow-sm bg-card text-card-foreground">
<div class="relative w-full overflow-auto">
<table class="w-full text-sm caption-bottom">
{% if caption %}
<caption class="mt-4 text-sm text-muted-foreground">{{ caption }}</caption>
{% endif %}
<thead class="[&_tr]:border-b">
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted">
{% for column in columns %}
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0">
{% if column.sortable %}
<button hx-get="{{ hx_url }}?sort={{ column.field }}"
hx-target="{{ hx_target }}"
class="flex items-center gap-1 hover:text-foreground">
{{ column.label }}
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" />
</svg>
</button>
{% else %}
{{ column.label }}
{% endif %}
</th>
{% endfor %}
{% if actions %}
<th class="h-12 px-4 font-medium text-right align-middle text-muted-foreground">Actions</th>
{% endif %}
</tr>
</thead>
<tbody class="[&_tr:last-child]:border-0">
{% for row in data %}
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted">
{% for column in columns %}
<td class="p-4 align-middle [&:has([role=checkbox])]:pr-0">
{% with value=row|get_item:column.field %}
{% if column.template %}
{% include column.template with value=value row=row %}
{% else %}
{{ value|default:"-" }}
{% endif %}
{% endwith %}
</td>
{% endfor %}
{% if actions %}
<td class="p-4 text-right align-middle">
{% include actions with row=row %}
</td>
{% endif %}
</tr>
{% empty %}
<tr>
<td colspan="{{ columns|length|add:1 }}" class="h-24 p-4 text-center text-muted-foreground">
No results found.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if page_obj.has_other_pages %}
<div class="flex items-center justify-between px-4 py-4 border-t">
<div class="flex items-center gap-2 text-sm text-muted-foreground">
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
</div>
<div class="flex items-center gap-2">
{% if page_obj.has_previous %}
<button hx-get="{{ hx_url }}?page={{ page_obj.previous_page_number }}"
hx-target="{{ hx_target }}"
class="inline-flex items-center justify-center px-4 py-2 text-sm font-medium transition-colors border rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background border-input hover:bg-accent hover:text-accent-foreground h-9">
Previous
</button>
{% endif %}
{% if page_obj.has_next %}
<button hx-get="{{ hx_url }}?page={{ page_obj.next_page_number }}"
hx-target="{{ hx_target }}"
class="inline-flex items-center justify-center px-4 py-2 text-sm font-medium transition-colors border rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background border-input hover:bg-accent hover:text-accent-foreground h-9">
Next
</button>
{% endif %}
</div>
</div>
{% endif %}
</div>

View File

@@ -0,0 +1,58 @@
{% load static %}
<footer class="mt-auto border-t bg-background border-border">
<div class="px-4 py-12 mx-auto max-w-7xl sm:px-6 lg:px-8">
<div class="grid grid-cols-1 gap-8 md:grid-cols-4">
<!-- Brand -->
<div class="col-span-1 md:col-span-2">
<div class="flex items-center gap-2 mb-4">
<!-- Replace with logo -->
<span class="text-xl font-bold tracking-tight text-foreground">ThrillWiki</span>
</div>
<p class="max-w-sm mb-6 text-sm text-muted-foreground">
Your comprehensive guide to theme parks and roller coasters.
Discover, track, and rate your favorite thrills.
</p>
<div class="flex space-x-4">
<!-- Social Links -->
<a href="#" class="transition-colors text-muted-foreground hover:text-foreground">
<span class="sr-only">Twitter</span>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
</svg>
</a>
<a href="#" class="transition-colors text-muted-foreground hover:text-foreground">
<span class="sr-only">GitHub</span>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" />
</svg>
</a>
</div>
</div>
<!-- Links -->
<div class="col-span-1">
<h3 class="mb-4 text-sm font-semibold tracking-wider uppercase text-foreground">Discover</h3>
<ul class="space-y-3">
<li><a href="{% url 'parks:park_list' %}" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Parks</a></li>
<li><a href="{% url 'rides:ride_list' %}" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Rides</a></li>
<li><a href="#" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Manufacturers</a></li>
<li><a href="#" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Top Rated</a></li>
</ul>
</div>
<!-- Legal -->
<div class="col-span-1">
<h3 class="mb-4 text-sm font-semibold tracking-wider uppercase text-foreground">Legal</h3>
<ul class="space-y-3">
<li><a href="{% url 'pages:privacy' %}" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Privacy Policy</a></li>
<li><a href="{% url 'pages:terms' %}" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Terms of Service</a></li>
<li><a href="#" class="text-sm transition-colors text-muted-foreground hover:text-foreground">Cookie Policy</a></li>
</ul>
</div>
</div>
<div class="pt-8 mt-8 text-center border-t border-border">
<p class="text-sm text-muted-foreground">&copy; {% now "Y" %} ThrillWiki. All rights reserved.</p>
</div>
</div>
</footer>

View File

@@ -0,0 +1,182 @@
{% load static %}
<nav class="bg-background border-b border-border sticky top-0 z-40 backdrop-blur supports-[backdrop-filter]:bg-background/60" x-data="{ mobileMenuOpen: false }">
<div class="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Left Side: Logo & Desktop Menu -->
<div class="flex">
<!-- Logo -->
<div class="flex items-center flex-shrink-0">
<a href="{% url 'home' %}" class="flex items-center gap-2">
<!-- Replace with actual logo SVG/Image -->
<span class="text-xl font-bold tracking-tight text-foreground">ThrillWiki</span>
</a>
</div>
<!-- Desktop Menu -->
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<!-- Current: "border-primary text-foreground", Default: "border-transparent text-muted-foreground hover:border-border hover:text-foreground" -->
<a href="{% url 'parks:park_list' %}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors duration-200
{% if '/parks/' in request.path %}border-primary text-foreground{% else %}border-transparent text-muted-foreground hover:border-border hover:text-foreground{% endif %}">
Parks
</a>
<a href="{% url 'rides:ride_list' %}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium transition-colors duration-200
{% if '/rides/' in request.path %}border-primary text-foreground{% else %}border-transparent text-muted-foreground hover:border-border hover:text-foreground{% endif %}">
Rides
</a>
<!-- Add more links as needed -->
</div>
</div>
<!-- Right Side: Search, Theme, User Menu, Mobile Toggle -->
<div class="flex items-center gap-4">
<!-- Search Trigger -->
<button type="button"
class="p-2 transition-colors duration-200 text-muted-foreground hover:text-foreground"
@click="$store.search.toggle()"
aria-label="Search">
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
</svg>
</button>
<!-- Theme Toggle -->
<button type="button"
class="p-2 transition-colors duration-200 text-muted-foreground hover:text-foreground"
@click="$store.theme.toggle()"
aria-label="Toggle theme">
<!-- Sun Icon -->
<svg x-show="!$store.theme.isDark" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" />
</svg>
<!-- Moon Icon -->
<svg x-show="$store.theme.isDark" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="display: none;">
<path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" />
</svg>
</button>
<!-- User Menu (Authenticated) -->
{% if user.is_authenticated %}
<div class="relative ml-3" x-data="{ open: false }">
<div>
<button type="button"
class="flex text-sm rounded-full bg-background focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2"
@click="open = !open"
@click.away="open = false"
aria-expanded="false"
aria-haspopup="true">
<span class="sr-only">Open user menu</span>
{% if user.profile.avatar %}
<img class="object-cover w-8 h-8 rounded-full" src="{{ user.profile.avatar.url }}" alt="{{ user.username }}">
{% else %}
<div class="flex items-center justify-center w-8 h-8 text-xs font-medium rounded-full bg-primary/10 text-primary">
{{ user.username|make_list|first|upper }}
</div>
{% endif %}
</button>
</div>
<!-- Dropdown menu -->
<div x-show="open"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="transform opacity-0 scale-95"
x-transition:enter-end="transform opacity-100 scale-100"
x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95"
class="absolute right-0 z-10 w-48 py-1 mt-2 origin-top-right rounded-md shadow-lg bg-popover ring-1 ring-black ring-opacity-5 focus:outline-none"
role="menu"
aria-orientation="vertical"
aria-labelledby="user-menu-button"
tabindex="-1"
style="display: none;">
<a href="{% url 'accounts:profile' %}" class="block px-4 py-2 text-sm text-foreground hover:bg-muted" role="menuitem">Your Profile</a>
<a href="{% url 'accounts:settings' %}" class="block px-4 py-2 text-sm text-foreground hover:bg-muted" role="menuitem">Settings</a>
<div class="my-1 border-t border-border"></div>
<form method="post" action="{% url 'account_logout' %}">
{% csrf_token %}
<button type="submit" class="block w-full px-4 py-2 text-sm text-left text-destructive hover:bg-destructive/10" role="menuitem">Sign out</button>
</form>
</div>
</div>
{% else %}
<!-- Auth Buttons (Guest) -->
<div class="items-center hidden gap-3 sm:flex">
<a href="{% url 'account_login' %}" class="text-sm font-medium transition-colors text-muted-foreground hover:text-foreground">Log in</a>
<a href="{% url 'account_signup' %}" class="inline-flex items-center justify-center px-4 py-2 text-sm font-medium transition-colors rounded-md ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-9">Sign up</a>
</div>
{% endif %}
<!-- Mobile menu button -->
<div class="flex items-center sm:hidden">
<button type="button"
class="inline-flex items-center justify-center p-2 rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary"
@click="mobileMenuOpen = !mobileMenuOpen"
aria-controls="mobile-menu"
aria-expanded="false">
<span class="sr-only">Open main menu</span>
<!-- Icon when menu is closed -->
<svg x-show="!mobileMenuOpen" class="block w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
<!-- Icon when menu is open -->
<svg x-show="mobileMenuOpen" class="block w-6 h-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" style="display: none;">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
</div>
<!-- Mobile menu -->
<div class="sm:hidden" id="mobile-menu" x-show="mobileMenuOpen" style="display: none;">
<div class="pt-2 pb-3 space-y-1">
<!-- Current: "bg-primary/10 border-primary text-primary", Default: "border-transparent text-muted-foreground hover:bg-muted hover:border-border hover:text-foreground" -->
<a href="{% url 'parks:park_list' %}"
class="block border-l-4 py-2 pl-3 pr-4 text-base font-medium {% if '/parks/' in request.path %}bg-primary/10 border-primary text-primary{% else %}border-transparent text-muted-foreground hover:bg-muted hover:border-border hover:text-foreground{% endif %}">
Parks
</a>
<a href="{% url 'rides:ride_list' %}"
class="block border-l-4 py-2 pl-3 pr-4 text-base font-medium {% if '/rides/' in request.path %}bg-primary/10 border-primary text-primary{% else %}border-transparent text-muted-foreground hover:bg-muted hover:border-border hover:text-foreground{% endif %}">
Rides
</a>
</div>
{% if not user.is_authenticated %}
<div class="pt-4 pb-3 border-t border-border">
<div class="space-y-1">
<a href="{% url 'account_login' %}" class="block py-2 pl-3 pr-4 text-base font-medium border-l-4 border-transparent text-muted-foreground hover:border-border hover:bg-muted hover:text-foreground">Log in</a>
<a href="{% url 'account_signup' %}" class="block py-2 pl-3 pr-4 text-base font-medium border-l-4 border-transparent text-muted-foreground hover:border-border hover:bg-muted hover:text-foreground">Sign up</a>
</div>
</div>
{% else %}
<div class="pt-4 pb-3 border-t border-border">
<div class="flex items-center px-4">
<div class="flex-shrink-0">
{% if user.profile.avatar %}
<img class="object-cover w-10 h-10 rounded-full" src="{{ user.profile.avatar.url }}" alt="{{ user.username }}">
{% else %}
<div class="flex items-center justify-center w-10 h-10 text-sm font-medium rounded-full bg-primary/10 text-primary">
{{ user.username|make_list|first|upper }}
</div>
{% endif %}
</div>
<div class="ml-3">
<div class="text-base font-medium text-foreground">{{ user.username }}</div>
<div class="text-sm font-medium text-muted-foreground">{{ user.email }}</div>
</div>
</div>
<div class="mt-3 space-y-1">
<a href="{% url 'accounts:profile' %}" class="block px-4 py-2 text-base font-medium text-muted-foreground hover:bg-muted hover:text-foreground">Your Profile</a>
<a href="{% url 'accounts:settings' %}" class="block px-4 py-2 text-base font-medium text-muted-foreground hover:bg-muted hover:text-foreground">Settings</a>
<form method="post" action="{% url 'account_logout' %}">
{% csrf_token %}
<button type="submit" class="block w-full px-4 py-2 text-base font-medium text-left text-destructive hover:bg-muted hover:text-destructive">Sign out</button>
</form>
</div>
</div>
{% endif %}
</div>
</nav>

View File

@@ -0,0 +1,42 @@
<div class="relative w-full" x-data="{ open: false, selected: [], query: '' }">
<label class="block mb-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{{ label }}
</label>
<div class="relative">
<button type="button"
@click="open = !open"
class="flex items-center justify-between w-full h-10 px-3 py-2 text-sm border rounded-md border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50">
<span x-text="selected.length ? `${selected.length} selected` : '{{ placeholder|default:'Select options...' }}'"></span>
<svg class="w-4 h-4 opacity-50" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
</svg>
</button>
<div x-show="open"
@click.away="open = false"
class="absolute z-50 w-full mt-2 border rounded-md shadow-md outline-none top-full bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95">
<div class="p-2 border-b">
<input type="text"
x-model="query"
class="flex w-full px-3 py-1 text-sm transition-colors bg-transparent rounded-md shadow-sm h-9 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
placeholder="Search...">
</div>
<div class="max-h-[200px] overflow-y-auto p-1">
{% for option in options %}
<label class="flex items-center p-2 space-x-2 rounded-sm cursor-pointer hover:bg-accent hover:text-accent-foreground"
x-show="query === '' || '{{ option.label }}'.toLowerCase().includes(query.toLowerCase())">
<input type="checkbox"
name="{{ name }}"
value="{{ option.value }}"
x-model="selected"
class="w-4 h-4 rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">{{ option.label }}</span>
</label>
{% endfor %}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full {{ class }}">
{% if src %}
<img class="object-cover w-full h-full aspect-square" src="{{ src }}" alt="{{ alt|default:'' }}">
{% else %}
<span class="flex items-center justify-center w-full h-full rounded-full bg-muted text-muted-foreground">
{{ fallback|default:alt|make_list|first|upper }}
</span>
{% endif %}
</span>

View File

@@ -0,0 +1,61 @@
{% load widget_tweaks %}
{% if type == 'button' or type == 'submit' or type == 'reset' %}
<button
type="{{ type|default:'button' }}"
{% if id %}id="{{ id }}"{% endif %}
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50
{% if variant == 'destructive' %}bg-destructive text-destructive-foreground hover:bg-destructive/90
{% elif variant == 'outline' %}border border-input bg-background hover:bg-accent hover:text-accent-foreground
{% elif variant == 'secondary' %}bg-secondary text-secondary-foreground hover:bg-secondary/80
{% elif variant == 'ghost' %}hover:bg-accent hover:text-accent-foreground
{% elif variant == 'link' %}text-primary underline-offset-4 hover:underline
{% else %}bg-primary text-primary-foreground hover:bg-primary/90{% endif %}
{% if size == 'sm' %}h-9 rounded-md px-3
{% elif size == 'lg' %}h-11 rounded-md px-8
{% elif size == 'icon' %}h-10 w-10
{% else %}h-10 px-4 py-2{% endif %}
{{ class }}"
{% if disabled %}disabled{% endif %}
{% if onclick %}onclick="{{ onclick }}"{% endif %}
{% if hx_get %}hx-get="{{ hx_get }}"{% endif %}
{% if hx_post %}hx-post="{{ hx_post }}"{% endif %}
{% if hx_target %}hx-target="{{ hx_target }}"{% endif %}
{% if hx_swap %}hx-swap="{{ hx_swap }}"{% endif %}
{% if hx_indicator %}hx-indicator="{{ hx_indicator }}"{% endif %}
{% if x_data %}x-data="{{ x_data }}"{% endif %}
{% if x_on_click %}@click="{{ x_on_click }}"{% endif %}>
{% if icon %}
{{ icon|safe }}
{% if label %}<span class="ml-2">{{ label }}</span>{% endif %}
{% else %}
{{ label|default:content }}
{% endif %}
{% block button_content %}{% endblock %}
</button>
{% else %}
<a
href="{{ href }}"
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50
{% if variant == 'destructive' %}bg-destructive text-destructive-foreground hover:bg-destructive/90
{% elif variant == 'outline' %}border border-input bg-background hover:bg-accent hover:text-accent-foreground
{% elif variant == 'secondary' %}bg-secondary text-secondary-foreground hover:bg-secondary/80
{% elif variant == 'ghost' %}hover:bg-accent hover:text-accent-foreground
{% elif variant == 'link' %}text-primary underline-offset-4 hover:underline
{% else %}bg-primary text-primary-foreground hover:bg-primary/90{% endif %}
{% if size == 'sm' %}h-9 rounded-md px-3
{% elif size == 'lg' %}h-11 rounded-md px-8
{% elif size == 'icon' %}h-10 w-10
{% else %}h-10 px-4 py-2{% endif %}
{{ class }}"
{% if x_data %}x-data="{{ x_data }}"{% endif %}
{% if x_on_click %}@click="{{ x_on_click }}"{% endif %}>
{% if icon %}
{{ icon|safe }}
{% if label %}<span class="ml-2">{{ label }}</span>{% endif %}
{% else %}
{{ label|default:content }}
{% endif %}
{% block link_content %}{% endblock %}
</a>
{% endif %}

View File

@@ -0,0 +1,26 @@
<div class="border rounded-lg shadow-sm bg-card text-card-foreground">
{% if header or title %}
<div class="flex flex-col space-y-1.5 p-6">
{% if title %}
<h3 class="text-2xl font-semibold leading-none tracking-tight">{{ title }}</h3>
{% endif %}
{% if description %}
<p class="text-sm text-muted-foreground">{{ description }}</p>
{% endif %}
{% if header %}
{{ header|safe }}
{% endif %}
</div>
{% endif %}
<div class="p-6 pt-0">
{{ content|safe }}
{% block card_content %}{% endblock %}
</div>
{% if footer %}
<div class="flex items-center p-6 pt-0">
{{ footer|safe }}
</div>
{% endif %}
</div>

View File

@@ -0,0 +1,57 @@
<div class="fixed inset-0 z-50 flex items-start justify-center sm:items-center"
role="dialog"
aria-modal="true"
x-data="{ open: true }"
x-show="open"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0">
<!-- Backdrop -->
<div class="fixed inset-0 transition-all bg-background/80 backdrop-blur-sm"
@click="open = false; setTimeout(() => $el.closest('[hx-history-elt]').innerHTML = '', 200)"></div>
<!-- Dialog Panel -->
<div class="fixed z-50 grid w-full gap-4 p-6 duration-200 border shadow-lg bg-background sm:max-w-lg sm:rounded-lg"
x-show="open"
x-transition:enter="animate-in fade-in-0 zoom-in-95 slide-in-from-left-1/2 slide-in-from-top-[48%]"
x-transition:leave="animate-out fade-out-0 zoom-out-95 slide-out-to-left-1/2 slide-out-to-top-[48%]">
<div class="flex flex-col space-y-1.5 text-center sm:text-left">
{% if title %}
<h2 class="text-lg font-semibold leading-none tracking-tight">
{{ title }}
</h2>
{% endif %}
{% if description %}
<p class="text-sm text-muted-foreground">
{{ description }}
</p>
{% endif %}
</div>
<div class="py-4">
{{ content|safe }}
{% block dialog_content %}{% endblock %}
</div>
{% if footer %}
<div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
{{ footer|safe }}
</div>
{% endif %}
<!-- Close Button -->
<button class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
@click="open = false">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
<span class="sr-only">Close</span>
</button>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<div class="relative inline-block text-left" x-data="{ open: false }" @click.away="open = false">
<div @click="open = !open">
{% if trigger %}
{{ trigger|safe }}
{% else %}
<button type="button"
class="inline-flex w-full justify-center gap-x-1.5 rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
id="menu-button"
aria-expanded="true"
aria-haspopup="true">
{{ label|default:"Options" }}
<svg class="w-5 h-5 -mr-1 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" />
</svg>
</button>
{% endif %}
</div>
<div class="absolute right-0 z-10 w-56 mt-2 transition-all duration-100 ease-in-out origin-top-right transform scale-95 bg-white rounded-md shadow-lg opacity-0 ring-1 ring-black ring-opacity-5 focus:outline-none"
x-show="open"
x-transition:enter="transition ease-out duration-100"
x-transition:enter-start="transform opacity-0 scale-95"
x-transition:enter-end="transform opacity-100 scale-100"
x-transition:leave="transition ease-in duration-75"
x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95"
role="menu"
aria-orientation="vertical"
aria-labelledby="menu-button"
tabindex="-1">
<div class="py-1" role="none">
{{ content|safe }}
{% block dropdown_content %}{% endblock %}
</div>
</div>
</div>

View File

@@ -0,0 +1,12 @@
{% load widget_tweaks %}
<div class="flex items-center space-x-2">
{% render_field field class+="aspect-square h-4 w-4 rounded border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" %}
<label for="{{ field.id_for_label }}" class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{{ label }}
</label>
</div>
{% if field.errors %}
<p class="mt-1 text-sm font-medium text-destructive">{{ field.errors.0 }}</p>
{% endif %}

View File

@@ -0,0 +1,19 @@
{% load widget_tweaks %}
<div class="space-y-2">
{% if label %}
<label for="{{ field.id_for_label }}" class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{{ label }}
</label>
{% endif %}
{% render_field field class+="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" placeholder=placeholder %}
{% if field.help_text %}
<p class="text-sm text-muted-foreground">{{ field.help_text }}</p>
{% endif %}
{% if field.errors %}
<p class="text-sm font-medium text-destructive">{{ field.errors.0 }}</p>
{% endif %}
</div>

View File

@@ -0,0 +1,19 @@
{% load widget_tweaks %}
<div class="space-y-2">
{% if label %}
<label for="{{ field.id_for_label }}" class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{{ label }}
</label>
{% endif %}
{% render_field field class+="flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1" %}
{% if field.help_text %}
<p class="text-sm text-muted-foreground">{{ field.help_text }}</p>
{% endif %}
{% if field.errors %}
<p class="text-sm font-medium text-destructive">{{ field.errors.0 }}</p>
{% endif %}
</div>

View File

@@ -0,0 +1,19 @@
{% load widget_tweaks %}
<div class="space-y-2">
{% if label %}
<label for="{{ field.id_for_label }}" class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
{{ label }}
</label>
{% endif %}
{% render_field field class+="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" placeholder=placeholder %}
{% if field.help_text %}
<p class="text-sm text-muted-foreground">{{ field.help_text }}</p>
{% endif %}
{% if field.errors %}
<p class="text-sm font-medium text-destructive">{{ field.errors.0 }}</p>
{% endif %}
</div>

View File

@@ -0,0 +1 @@
<div class="animate-pulse rounded-md bg-muted {{ class }}"></div>

View File

@@ -0,0 +1,58 @@
<div x-data
class="fixed z-50 flex flex-col max-w-sm gap-2 pointer-events-none bottom-4 right-4">
<template x-for="toast in $store.toast.toasts" :key="toast.id">
<div x-show="true"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="opacity-0 translate-y-2"
x-transition:enter-end="opacity-100 translate-y-0"
x-transition:leave="transition ease-in duration-200"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0 translate-x-full"
:class="{
'bg-success-50 border-success-200 text-success-800 dark:bg-success-900/20 dark:border-success-800 dark:text-success-200': toast.type === 'success',
'bg-error-50 border-error-200 text-error-800 dark:bg-error-900/20 dark:border-error-800 dark:text-error-200': toast.type === 'error',
'bg-warning-50 border-warning-200 text-warning-800 dark:bg-warning-900/20 dark:border-warning-800 dark:text-warning-200': toast.type === 'warning',
'bg-info-50 border-info-200 text-info-800 dark:bg-info-900/20 dark:border-info-800 dark:text-info-200': toast.type === 'info'
}"
class="flex items-start w-full gap-3 p-4 border rounded-lg shadow-lg pointer-events-auto">
<!-- Icon -->
<div class="flex-shrink-0 mt-0.5">
<template x-if="toast.type === 'success'">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</template>
<template x-if="toast.type === 'error'">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</template>
<template x-if="toast.type === 'warning'">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
</svg>
</template>
<template x-if="toast.type === 'info'">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</template>
</div>
<!-- Content -->
<div class="flex-1">
<p x-text="toast.message" class="text-sm font-medium"></p>
</div>
<!-- Dismiss -->
<button @click="$store.toast.dismiss(toast.id)"
class="flex-shrink-0 p-1 transition-colors rounded hover:bg-black/10 dark:hover:bg-white/10">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
</template>
</div>

View File

@@ -0,0 +1,78 @@
{% extends "components/ui/dialog.html" %}
{% block dialog_content %}
<div class="space-y-6">
<div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">Welcome back</h1>
<p class="text-sm text-muted-foreground">
Enter your credentials to sign in to your account
</p>
</div>
<form class="space-y-4"
hx-post="{% url 'account_login' %}"
hx-swap="outerHTML"
hx-target="#login-form-container">
{% csrf_token %}
<div id="login-form-container" class="space-y-4">
{% if form.non_field_errors %}
<div class="p-3 text-sm rounded-md text-destructive bg-destructive/10">
{{ form.non_field_errors.0 }}
</div>
{% endif %}
<div class="space-y-2">
<label for="{{ form.login.id_for_label }}" class="text-sm font-medium">
Email or Username
</label>
{% include "components/ui/form/input.html" with field=form.login placeholder="name@example.com" %}
</div>
<div class="space-y-2">
<div class="flex items-center justify-between">
<label for="{{ form.password.id_for_label }}" class="text-sm font-medium">
Password
</label>
<a href="{% url 'account_reset_password' %}" class="text-sm font-medium text-primary hover:underline">
Forgot password?
</a>
</div>
{% include "components/ui/form/input.html" with field=form.password type="password" %}
</div>
{% if form.remember %}
<div class="flex items-center space-x-2">
{% include "components/ui/form/checkbox.html" with field=form.remember label="Remember me" %}
</div>
{% endif %}
</div>
{% include "components/ui/button.html" with type="submit" label="Sign In" class="w-full" %}
</form>
<div class="relative">
<div class="absolute inset-0 flex items-center">
<span class="w-full border-t"></span>
</div>
<div class="relative flex justify-center text-xs uppercase">
<span class="px-2 bg-background text-muted-foreground">
Or continue with
</span>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
{% include "components/ui/button.html" with variant="outline" icon='<svg class="w-4 h-4 mr-2" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>' label="Github" %}
{% include "components/ui/button.html" with variant="outline" icon='<svg class="w-4 h-4 mr-2" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><path fill="currentColor" d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"></path></svg>' label="Google" %}
</div>
<div class="text-sm text-center text-muted-foreground">
Don't have an account?
<a href="{% url 'account_signup' %}" class="underline underline-offset-4 hover:text-primary">
Sign up
</a>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,81 @@
{% extends "components/ui/dialog.html" %}
{% block dialog_content %}
<div class="space-y-6">
<div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">Create an account</h1>
<p class="text-sm text-muted-foreground">
Enter your email below to create your account
</p>
</div>
<form class="space-y-4"
hx-post="{% url 'account_signup' %}"
hx-swap="outerHTML"
hx-target="#signup-form-container">
{% csrf_token %}
<div id="signup-form-container" class="space-y-4">
{% if form.non_field_errors %}
<div class="p-3 text-sm rounded-md text-destructive bg-destructive/10">
{{ form.non_field_errors.0 }}
</div>
{% endif %}
<div class="space-y-2">
<label for="{{ form.email.id_for_label }}" class="text-sm font-medium">
Email
</label>
{% include "components/ui/form/input.html" with field=form.email placeholder="name@example.com" %}
</div>
<div class="space-y-2">
<label for="{{ form.username.id_for_label }}" class="text-sm font-medium">
Username
</label>
{% include "components/ui/form/input.html" with field=form.username placeholder="username" %}
</div>
<div class="space-y-2">
<label for="{{ form.password.id_for_label }}" class="text-sm font-medium">
Password
</label>
{% include "components/ui/form/input.html" with field=form.password type="password" %}
</div>
<div class="space-y-2">
<label for="{{ form.password_confirm.id_for_label }}" class="text-sm font-medium">
Confirm Password
</label>
{% include "components/ui/form/input.html" with field=form.password_confirm type="password" %}
</div>
</div>
{% include "components/ui/button.html" with type="submit" label="Sign Up" class="w-full" %}
</form>
<div class="relative">
<div class="absolute inset-0 flex items-center">
<span class="w-full border-t"></span>
</div>
<div class="relative flex justify-center text-xs uppercase">
<span class="px-2 bg-background text-muted-foreground">
Or continue with
</span>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
{% include "components/ui/button.html" with variant="outline" icon='<svg class="w-4 h-4 mr-2" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>' label="Github" %}
{% include "components/ui/button.html" with variant="outline" icon='<svg class="w-4 h-4 mr-2" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><path fill="currentColor" d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"></path></svg>' label="Google" %}
</div>
<div class="text-sm text-center text-muted-foreground">
Already have an account?
<a href="{% url 'account_login' %}" class="underline underline-offset-4 hover:text-primary">
Sign in
</a>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,175 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}ThrillWiki - Your Ultimate Theme Park & Ride Database{% endblock %}
{% block extra_css %}
<style>
.hero-pattern {
background-color: var(--color-background);
background-image: radial-gradient(var(--color-primary-100) 1px, transparent 1px);
background-size: 40px 40px;
}
.dark .hero-pattern {
background-image: radial-gradient(var(--color-primary-900) 1px, transparent 1px);
}
</style>
{% endblock %}
{% block main %}
<div class="flex flex-col min-h-screen">
<!-- Hero Section -->
<section class="relative py-20 overflow-hidden hero-pattern lg:py-32">
<div class="container relative z-10 mx-auto text-center">
<h1 class="mb-6 text-4xl font-extrabold tracking-tight text-foreground sm:text-5xl lg:text-6xl">
Discover Your Next <br class="hidden sm:inline">
<span class="text-transparent bg-clip-text bg-gradient-to-r from-primary-600 to-secondary-600">Adrenaline Rush</span>
</h1>
<p class="max-w-2xl mx-auto mb-10 text-lg text-muted-foreground sm:text-xl">
The most comprehensive database of theme parks and roller coasters.
Track your credits, rate rides, and join the community.
</p>
<!-- Search Bar -->
<div class="max-w-2xl mx-auto mb-12" x-data="{ query: '', results: [] }">
<div class="relative group">
<div class="absolute inset-0 transition duration-200 rounded-lg opacity-25 bg-gradient-to-r from-primary-500 to-secondary-500 blur group-hover:opacity-50"></div>
<div class="relative rounded-lg shadow-xl bg-background">
<div class="flex items-center px-4 py-3">
<svg class="w-6 h-6 text-muted-foreground" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
<input type="text"
x-model="query"
@focus="$store.search.open()"
placeholder="Search parks, rides, or locations..."
class="w-full px-4 py-2 text-lg bg-transparent border-none focus:ring-0 placeholder:text-muted-foreground text-foreground">
<div class="hidden sm:flex text-xs text-muted-foreground border border-border rounded px-1.5 py-0.5">
<span class="text-xs"></span>K
</div>
</div>
</div>
</div>
<div class="flex justify-center gap-4 mt-4 text-sm text-muted-foreground">
<span>Popular:</span>
<button class="transition-colors hover:text-primary">Cedar Point</button>
<button class="transition-colors hover:text-primary">Six Flags</button>
<button class="transition-colors hover:text-primary">Disney World</button>
</div>
</div>
<div class="flex flex-col justify-center gap-4 sm:flex-row">
{% include "components/ui/button.html" with label="Explore Parks" href="/parks/" size="lg" %}
{% include "components/ui/button.html" with label="Browse Rides" href="/rides/" variant="outline" size="lg" %}
</div>
</div>
</section>
<!-- Stats Section -->
<section class="py-12 border-y border-border bg-muted/50">
<div class="container mx-auto">
<div class="grid grid-cols-2 gap-8 text-center md:grid-cols-4">
<div class="space-y-2">
<dt class="text-3xl font-bold text-foreground">2,500+</dt>
<dd class="text-sm font-medium tracking-wide uppercase text-muted-foreground">Parks</dd>
</div>
<div class="space-y-2">
<dt class="text-3xl font-bold text-foreground">12,000+</dt>
<dd class="text-sm font-medium tracking-wide uppercase text-muted-foreground">Rides</dd>
</div>
<div class="space-y-2">
<dt class="text-3xl font-bold text-foreground">50k+</dt>
<dd class="text-sm font-medium tracking-wide uppercase text-muted-foreground">Reviews</dd>
</div>
<div class="space-y-2">
<dt class="text-3xl font-bold text-foreground">150k+</dt>
<dd class="text-sm font-medium tracking-wide uppercase text-muted-foreground">Photos</dd>
</div>
</div>
</div>
</section>
<!-- Featured Parks -->
<section class="py-20">
<div class="container mx-auto">
<div class="flex items-center justify-between mb-10">
<div>
<h2 class="text-3xl font-bold tracking-tight text-foreground">Featured Parks</h2>
<p class="mt-2 text-muted-foreground">Top rated destinations from around the world.</p>
</div>
<a href="{% url 'parks:park_list' %}" class="items-center hidden font-medium sm:flex text-primary hover:text-primary/80">
View all parks <span class="ml-1"></span>
</a>
</div>
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3"
hx-get="{% url 'api:parks-featured' %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading Skeleton -->
{% for i in "123"|make_list %}
<div class="rounded-lg border bg-card text-card-foreground shadow-sm h-[400px]">
<div class="p-6 space-y-4">
<div class="w-full h-48 rounded bg-muted animate-pulse"></div>
<div class="space-y-2">
<div class="w-2/3 h-4 rounded bg-muted animate-pulse"></div>
<div class="w-1/2 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="mt-8 text-center sm:hidden">
{% include "components/ui/button.html" with label="View all parks" href="/parks/" variant="outline" class="w-full" %}
</div>
</div>
</section>
<!-- Latest Reviews -->
<section class="py-20 bg-muted/30">
<div class="container mx-auto">
<div class="flex items-center justify-between mb-10">
<div>
<h2 class="text-3xl font-bold tracking-tight text-foreground">Community Pulse</h2>
<p class="mt-2 text-muted-foreground">Recent activity and reviews from our community.</p>
</div>
</div>
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3"
hx-get="{% url 'api:reviews-recent' %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading Skeleton -->
{% for i in "123"|make_list %}
<div class="p-6 border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="flex items-center gap-4 mb-4">
<div class="w-10 h-10 rounded-full bg-muted animate-pulse"></div>
<div class="flex-1 space-y-2">
<div class="w-1/3 h-4 rounded bg-muted animate-pulse"></div>
<div class="w-1/4 h-3 rounded bg-muted animate-pulse"></div>
</div>
</div>
<div class="space-y-2">
<div class="w-full h-4 rounded bg-muted animate-pulse"></div>
<div class="w-5/6 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
<!-- CTA Section -->
<section class="relative py-24 overflow-hidden bg-primary text-primary-foreground">
<div class="absolute inset-0 bg-[url('/static/images/pattern.svg')] opacity-10"></div>
<div class="container relative z-10 mx-auto text-center">
<h2 class="mb-6 text-3xl font-bold sm:text-4xl">Ready to track your rides?</h2>
<p class="max-w-2xl mx-auto mb-10 text-lg text-primary-foreground/80">
Create a free account to log your coasters, rate parks, upload photos, and join the discussion.
</p>
{% include "components/ui/button.html" with label="Get Started for Free" href="/accounts/signup/" variant="secondary" size="lg" %}
</div>
</section>
</div>
{% endblock main %}

View File

@@ -0,0 +1,159 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}{{ park.name }} - ThrillWiki{% endblock %}
{% block main %}
<div class="container py-8">
<!-- Breadcrumbs -->
<nav class="flex mb-6 text-sm text-muted-foreground">
<a href="{% url 'home' %}" class="hover:text-foreground">Home</a>
<span class="mx-2">/</span>
<a href="{% url 'parks:park_list' %}" class="hover:text-foreground">Parks</a>
<span class="mx-2">/</span>
<span class="text-foreground">{{ park.name }}</span>
</nav>
<div class="grid grid-cols-1 gap-8 lg:grid-cols-3">
<!-- Main Content -->
<div class="space-y-8 lg:col-span-2">
<!-- Park Header -->
<div class="relative overflow-hidden border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="relative aspect-video">
{% if park.image %}
<img src="{{ park.image.url }}" alt="{{ park.name }}" class="object-cover w-full h-full">
{% else %}
<div class="flex items-center justify-center w-full h-full bg-muted">
<span class="text-muted-foreground">No image available</span>
</div>
{% endif %}
<div class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"></div>
<div class="absolute text-white bottom-6 left-6">
<h1 class="mb-2 text-4xl font-bold">{{ park.name }}</h1>
<div class="flex items-center gap-4 text-sm">
<span class="flex items-center gap-1">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
{{ park.location.city }}, {{ park.location.country }}
</span>
<span class="px-2 py-0.5 rounded-full bg-white/20 backdrop-blur-sm border border-white/20">
{{ park.get_status_display }}
</span>
</div>
</div>
</div>
<div class="p-6">
<div class="flex items-center justify-between mb-6">
<div class="flex items-center gap-4">
<div class="flex flex-col items-center p-3 rounded-lg bg-muted/50">
<span class="text-2xl font-bold">{{ park.average_rating|default:"-" }}</span>
<span class="text-xs text-muted-foreground">Rating</span>
</div>
<div class="flex flex-col items-center p-3 rounded-lg bg-muted/50">
<span class="text-2xl font-bold">{{ park.rides.count }}</span>
<span class="text-xs text-muted-foreground">Rides</span>
</div>
</div>
<div class="flex gap-2">
{% include "components/ui/button.html" with label="Rate Park" variant="outline" icon='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /></svg>' %}
{% include "components/ui/button.html" with label="I've Been Here" variant="default" icon='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /></svg>' %}
</div>
</div>
<div class="prose dark:prose-invert max-w-none">
<h3 class="mb-2 text-lg font-semibold">About</h3>
<p class="text-muted-foreground">{{ park.description }}</p>
</div>
</div>
</div>
<!-- Rides List -->
<div class="space-y-6">
<div class="flex items-center justify-between">
<h2 class="text-2xl font-bold tracking-tight">Rides & Attractions</h2>
<!-- Ride Filters -->
<div class="flex items-center gap-2" x-data="{ sort: 'rating' }">
<select class="w-32 px-3 py-1 text-sm transition-colors border rounded-md shadow-sm h-9 border-input bg-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
hx-get="{% url 'api:park-rides' park.id %}"
hx-target="#rides-grid"
name="sort">
<option value="rating">Top Rated</option>
<option value="name">Name (A-Z)</option>
<option value="thrill">Thrill Level</option>
</select>
</div>
</div>
<div id="rides-grid"
class="grid gap-4 sm:grid-cols-2"
hx-get="{% url 'api:park-rides' park.id %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading State -->
{% for i in "1234"|make_list %}
<div class="flex items-start gap-4 p-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="w-20 h-20 rounded-md bg-muted animate-pulse shrink-0"></div>
<div class="flex-1 space-y-2">
<div class="w-3/4 h-5 rounded bg-muted animate-pulse"></div>
<div class="w-1/2 h-4 rounded bg-muted animate-pulse"></div>
<div class="w-1/3 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- Sidebar -->
<div class="space-y-6">
<!-- Map -->
<div class="overflow-hidden border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="p-4 border-b">
<h3 class="font-semibold">Location</h3>
</div>
<div class="relative aspect-square bg-muted">
<!-- Map Placeholder -->
<div class="absolute inset-0 flex items-center justify-center text-muted-foreground">
Map Component
</div>
</div>
<div class="p-4 text-sm text-muted-foreground">
<p>{{ park.location.address }}</p>
<a href="#" class="inline-block mt-2 text-primary hover:underline">Get Directions</a>
</div>
</div>
<!-- Operating Hours -->
<div class="border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="p-4 border-b">
<h3 class="font-semibold">Operating Hours</h3>
</div>
<div class="p-4 space-y-3 text-sm">
<div class="flex justify-between">
<span class="text-muted-foreground">Today</span>
<span class="font-medium text-green-600">Open • 10:00 AM - 8:00 PM</span>
</div>
<!-- More days would go here -->
</div>
</div>
<!-- Weather -->
<div class="border rounded-lg shadow-sm bg-card text-card-foreground"
hx-get="{% url 'api:weather' park.id %}"
hx-trigger="load">
<div class="p-4 border-b">
<h3 class="font-semibold">Current Weather</h3>
</div>
<div class="p-4">
<div class="h-16 rounded bg-muted animate-pulse"></div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,125 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}Explore Parks - ThrillWiki{% endblock %}
{% block main %}
<div class="container py-8">
<div class="flex flex-col gap-8 md:flex-row">
<!-- Sidebar Filters -->
<aside class="w-full md:w-64 shrink-0"
x-data="{ showFilters: false }">
<div class="flex items-center justify-between mb-4 md:hidden">
<h2 class="text-lg font-semibold">Filters</h2>
<button @click="showFilters = !showFilters"
class="text-sm text-primary hover:underline">
<span x-text="showFilters ? 'Hide' : 'Show'"></span>
</button>
</div>
<div class="space-y-6"
:class="{'hidden': !showFilters, 'block': showFilters}"
class="md:block">
<form id="park-filters"
hx-get="{% url 'api:park-list' %}"
hx-target="#park-grid"
hx-trigger="change delay:300ms, submit">
<!-- Search -->
<div class="mb-6 space-y-2">
<label class="text-sm font-medium">Search</label>
<input type="text"
name="q"
placeholder="Search parks..."
class="w-full px-3 py-1 text-sm transition-colors border rounded-md shadow-sm h-9 border-input bg-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">
</div>
<!-- Country Filter -->
<div class="mb-6 space-y-2">
<label class="text-sm font-medium">Country</label>
<select name="country"
class="w-full px-3 py-1 text-sm transition-colors border rounded-md shadow-sm h-9 border-input bg-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">
<option value="">All Countries</option>
{% for country in countries %}
<option value="{{ country.code }}">{{ country.name }}</option>
{% endfor %}
</select>
</div>
<!-- Status Filter -->
<div class="mb-6 space-y-3">
<label class="text-sm font-medium">Status</label>
<div class="space-y-2">
<label class="flex items-center space-x-2">
<input type="checkbox" name="status" value="Operating" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Operating</span>
</label>
<label class="flex items-center space-x-2">
<input type="checkbox" name="status" value="Closed" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Closed</span>
</label>
<label class="flex items-center space-x-2">
<input type="checkbox" name="status" value="Construction" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Under Construction</span>
</label>
</div>
</div>
</form>
</div>
</aside>
<!-- Main Content -->
<div class="flex-1">
<div class="flex items-center justify-between mb-6">
<h1 class="text-3xl font-bold tracking-tight">Theme Parks</h1>
<div class="flex items-center gap-2">
<span class="text-sm text-muted-foreground" id="park-count">
Showing all results
</span>
<!-- View Toggle -->
<div class="flex items-center border rounded-md" x-data="{ view: 'grid' }">
<button @click="view = 'grid'"
:class="{'bg-muted': view === 'grid'}"
class="p-2 transition-colors hover:bg-muted/50">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" />
</svg>
</button>
<button @click="view = 'list'"
:class="{'bg-muted': view === 'list'}"
class="p-2 transition-colors hover:bg-muted/50">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
</div>
<!-- Park Grid -->
<div id="park-grid"
class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3"
hx-get="{% url 'api:park-list' %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading State -->
{% for i in "123456"|make_list %}
<div class="rounded-lg border bg-card text-card-foreground shadow-sm h-[380px]">
<div class="p-0">
<div class="w-full h-48 rounded-t-lg bg-muted animate-pulse"></div>
<div class="p-6 space-y-4">
<div class="w-3/4 h-6 rounded bg-muted animate-pulse"></div>
<div class="space-y-2">
<div class="w-full h-4 rounded bg-muted animate-pulse"></div>
<div class="w-2/3 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,177 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}{{ ride.name }} - {{ ride.park.name }} - ThrillWiki{% endblock %}
{% block main %}
<div class="container py-8">
<!-- Breadcrumbs -->
<nav class="flex mb-6 text-sm text-muted-foreground">
<a href="{% url 'home' %}" class="hover:text-foreground">Home</a>
<span class="mx-2">/</span>
<a href="{% url 'parks:park_list' %}" class="hover:text-foreground">Parks</a>
<span class="mx-2">/</span>
<a href="{% url 'parks:park_detail' ride.park.id %}" class="hover:text-foreground">{{ ride.park.name }}</a>
<span class="mx-2">/</span>
<span class="text-foreground">{{ ride.name }}</span>
</nav>
<div class="grid grid-cols-1 gap-8 lg:grid-cols-3">
<!-- Main Content -->
<div class="space-y-8 lg:col-span-2">
<!-- Ride Header -->
<div class="relative overflow-hidden border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="relative aspect-video">
{% if ride.image %}
<img src="{{ ride.image.url }}" alt="{{ ride.name }}" class="object-cover w-full h-full">
{% else %}
<div class="flex items-center justify-center w-full h-full bg-muted">
<span class="text-muted-foreground">No image available</span>
</div>
{% endif %}
<div class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"></div>
<div class="absolute text-white bottom-6 left-6">
<h1 class="mb-2 text-4xl font-bold">{{ ride.name }}</h1>
<div class="flex items-center gap-4 text-sm">
<span class="flex items-center gap-1">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
{{ ride.park.name }}
</span>
<span class="px-2 py-0.5 rounded-full bg-white/20 backdrop-blur-sm border border-white/20">
{{ ride.get_status_display }}
</span>
</div>
</div>
</div>
<div class="p-6">
<div class="flex items-center justify-between mb-6">
<div class="flex items-center gap-4">
<div class="flex flex-col items-center p-3 rounded-lg bg-muted/50">
<span class="text-2xl font-bold">{{ ride.average_rating|default:"-" }}</span>
<span class="text-xs text-muted-foreground">Rating</span>
</div>
<div class="flex flex-col items-center p-3 rounded-lg bg-muted/50">
<span class="text-2xl font-bold">{{ ride.top_speed|default:"-" }}</span>
<span class="text-xs text-muted-foreground">mph</span>
</div>
<div class="flex flex-col items-center p-3 rounded-lg bg-muted/50">
<span class="text-2xl font-bold">{{ ride.height|default:"-" }}</span>
<span class="text-xs text-muted-foreground">ft</span>
</div>
</div>
<div class="flex gap-2">
{% include "components/ui/button.html" with label="Rate Ride" variant="outline" icon='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /></svg>' %}
{% include "components/ui/button.html" with label="Add to Credits" variant="default" icon='<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" /></svg>' %}
</div>
</div>
<div class="prose dark:prose-invert max-w-none">
<h3 class="mb-2 text-lg font-semibold">Description</h3>
<p class="text-muted-foreground">{{ ride.description }}</p>
</div>
</div>
</div>
<!-- Stats Grid -->
<div class="grid grid-cols-2 gap-4 md:grid-cols-4">
<div class="p-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<dt class="text-sm font-medium text-muted-foreground">Manufacturer</dt>
<dd class="mt-1 text-lg font-semibold">{{ ride.manufacturer.name|default:"Unknown" }}</dd>
</div>
<div class="p-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<dt class="text-sm font-medium text-muted-foreground">Opened</dt>
<dd class="mt-1 text-lg font-semibold">{{ ride.opening_date|date:"Y"|default:"Unknown" }}</dd>
</div>
<div class="p-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<dt class="text-sm font-medium text-muted-foreground">Length</dt>
<dd class="mt-1 text-lg font-semibold">{{ ride.length|default:"-" }} ft</dd>
</div>
<div class="p-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<dt class="text-sm font-medium text-muted-foreground">Inversions</dt>
<dd class="mt-1 text-lg font-semibold">{{ ride.inversions|default:"0" }}</dd>
</div>
</div>
<!-- Reviews Section -->
<div class="space-y-6">
<div class="flex items-center justify-between">
<h2 class="text-2xl font-bold tracking-tight">Reviews</h2>
<div class="flex items-center gap-2">
<span class="text-sm text-muted-foreground">{{ ride.review_count }} reviews</span>
</div>
</div>
<div id="reviews-list"
hx-get="{% url 'api:ride-reviews' ride.id %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading State -->
{% for i in "123"|make_list %}
<div class="p-6 space-y-4 border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-muted animate-pulse"></div>
<div class="space-y-2">
<div class="w-24 h-4 rounded bg-muted animate-pulse"></div>
<div class="w-16 h-3 rounded bg-muted animate-pulse"></div>
</div>
</div>
<div class="w-16 h-8 rounded bg-muted animate-pulse"></div>
</div>
<div class="space-y-2">
<div class="w-full h-4 rounded bg-muted animate-pulse"></div>
<div class="w-5/6 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- Sidebar -->
<div class="space-y-6">
<!-- Similar Rides -->
<div class="border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="p-4 border-b">
<h3 class="font-semibold">Similar Rides</h3>
</div>
<div class="divide-y"
hx-get="{% url 'api:ride-similar' ride.id %}"
hx-trigger="load"
hx-swap="innerHTML">
{% for i in "123"|make_list %}
<div class="flex gap-4 p-4">
<div class="w-16 h-16 rounded bg-muted animate-pulse shrink-0"></div>
<div class="flex-1 space-y-2">
<div class="w-3/4 h-4 rounded bg-muted animate-pulse"></div>
<div class="w-1/2 h-3 rounded bg-muted animate-pulse"></div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- POV Video -->
{% if ride.pov_video_url %}
<div class="overflow-hidden border rounded-lg shadow-sm bg-card text-card-foreground">
<div class="p-4 border-b">
<h3 class="font-semibold">On-Ride POV</h3>
</div>
<div class="relative aspect-video bg-muted">
<!-- Video Embed -->
<iframe src="{{ ride.pov_video_url }}"
class="absolute inset-0 w-full h-full"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,130 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}Explore Rides - ThrillWiki{% endblock %}
{% block main %}
<div class="container py-8">
<div class="flex flex-col gap-8 md:flex-row">
<!-- Sidebar Filters -->
<aside class="w-full md:w-64 shrink-0"
x-data="{ showFilters: false }">
<div class="flex items-center justify-between mb-4 md:hidden">
<h2 class="text-lg font-semibold">Filters</h2>
<button @click="showFilters = !showFilters"
class="text-sm text-primary hover:underline">
<span x-text="showFilters ? 'Hide' : 'Show'"></span>
</button>
</div>
<div class="space-y-6"
:class="{'hidden': !showFilters, 'block': showFilters}"
class="md:block">
<form id="ride-filters"
hx-get="{% url 'api:ride-list' %}"
hx-target="#ride-grid"
hx-trigger="change delay:300ms, submit">
<!-- Search -->
<div class="mb-6 space-y-2">
<label class="text-sm font-medium">Search</label>
<input type="text"
name="q"
placeholder="Search rides..."
class="w-full px-3 py-1 text-sm transition-colors border rounded-md shadow-sm h-9 border-input bg-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">
</div>
<!-- Type Filter -->
<div class="mb-6 space-y-2">
<label class="text-sm font-medium">Ride Type</label>
<select name="type"
class="w-full px-3 py-1 text-sm transition-colors border rounded-md shadow-sm h-9 border-input bg-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">
<option value="">All Types</option>
<option value="Roller Coaster">Roller Coaster</option>
<option value="Water Ride">Water Ride</option>
<option value="Dark Ride">Dark Ride</option>
<option value="Flat Ride">Flat Ride</option>
</select>
</div>
<!-- Intensity Filter -->
<div class="mb-6 space-y-3">
<label class="text-sm font-medium">Thrill Level</label>
<div class="space-y-2">
<label class="flex items-center space-x-2">
<input type="checkbox" name="intensity" value="Extreme" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Extreme</span>
</label>
<label class="flex items-center space-x-2">
<input type="checkbox" name="intensity" value="High" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">High</span>
</label>
<label class="flex items-center space-x-2">
<input type="checkbox" name="intensity" value="Moderate" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Moderate</span>
</label>
<label class="flex items-center space-x-2">
<input type="checkbox" name="intensity" value="Low" class="rounded border-primary text-primary focus:ring-primary">
<span class="text-sm">Low</span>
</label>
</div>
</div>
</form>
</div>
</aside>
<!-- Main Content -->
<div class="flex-1">
<div class="flex items-center justify-between mb-6">
<h1 class="text-3xl font-bold tracking-tight">Rides</h1>
<div class="flex items-center gap-2">
<span class="text-sm text-muted-foreground" id="ride-count">
Showing all results
</span>
<!-- View Toggle -->
<div class="flex items-center border rounded-md" x-data="{ view: 'grid' }">
<button @click="view = 'grid'"
:class="{'bg-muted': view === 'grid'}"
class="p-2 transition-colors hover:bg-muted/50">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z" />
</svg>
</button>
<button @click="view = 'list'"
:class="{'bg-muted': view === 'list'}"
class="p-2 transition-colors hover:bg-muted/50">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
</div>
<!-- Ride Grid -->
<div id="ride-grid"
class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3"
hx-get="{% url 'api:ride-list' %}"
hx-trigger="load"
hx-swap="innerHTML">
<!-- Loading State -->
{% for i in "123456"|make_list %}
<div class="rounded-lg border bg-card text-card-foreground shadow-sm h-[380px]">
<div class="p-0">
<div class="w-full h-48 rounded-t-lg bg-muted animate-pulse"></div>
<div class="p-6 space-y-4">
<div class="w-3/4 h-6 rounded bg-muted animate-pulse"></div>
<div class="space-y-2">
<div class="w-full h-4 rounded bg-muted animate-pulse"></div>
<div class="w-2/3 h-4 rounded bg-muted animate-pulse"></div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,120 @@
{% extends "base/htmx-base.html" %}
{% load static %}
{% block title %}Search Results - ThrillWiki{% endblock %}
{% block main %}
<div class="container py-8">
<div class="max-w-4xl mx-auto">
<!-- Search Header -->
<div class="mb-8 text-center">
<h1 class="mb-4 text-3xl font-bold tracking-tight">Search Results</h1>
<div class="max-w-xl mx-auto">
<form action="{% url 'search:results' %}" method="get" class="relative">
<input type="text"
name="q"
value="{{ query|default:'' }}"
placeholder="Search parks, rides, manufacturers..."
class="w-full h-12 pl-12 pr-4 text-lg transition-all border rounded-lg shadow-sm border-input bg-background focus:ring-2 focus:ring-primary focus:border-primary">
<div class="absolute -translate-y-1/2 left-4 top-1/2 text-muted-foreground">
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</div>
<button type="submit" class="absolute right-2 top-1/2 -translate-y-1/2 px-4 py-1.5 bg-primary text-primary-foreground rounded-md text-sm font-medium hover:bg-primary/90 transition-colors">
Search
</button>
</form>
</div>
</div>
<!-- Filters Tabs -->
<div class="flex items-center justify-center gap-2 pb-2 mb-8 overflow-x-auto" x-data="{ tab: 'all' }">
<button @click="tab = 'all'"
:class="tab === 'all' ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground hover:bg-muted/80'"
class="px-4 py-2 text-sm font-medium transition-colors rounded-full whitespace-nowrap">
All Results
</button>
<button @click="tab = 'parks'"
:class="tab === 'parks' ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground hover:bg-muted/80'"
class="px-4 py-2 text-sm font-medium transition-colors rounded-full whitespace-nowrap">
Parks
</button>
<button @click="tab = 'rides'"
:class="tab === 'rides' ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground hover:bg-muted/80'"
class="px-4 py-2 text-sm font-medium transition-colors rounded-full whitespace-nowrap">
Rides
</button>
<button @click="tab = 'users'"
:class="tab === 'users' ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground hover:bg-muted/80'"
class="px-4 py-2 text-sm font-medium transition-colors rounded-full whitespace-nowrap">
Users
</button>
</div>
<!-- Results Grid -->
<div class="space-y-8">
{% if not query %}
<div class="py-12 text-center">
<div class="flex items-center justify-center w-16 h-16 mx-auto mb-4 rounded-full bg-muted">
<svg class="w-8 h-8 text-muted-foreground" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</div>
<h3 class="text-lg font-medium text-foreground">Start Searching</h3>
<p class="mt-1 text-muted-foreground">Enter a keyword to find parks, rides, and more.</p>
</div>
{% else %}
<!-- Parks Section -->
<section x-show="tab === 'all' || tab === 'parks'">
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-bold">Parks</h2>
<span class="text-sm text-muted-foreground">3 results</span>
</div>
<div class="grid gap-4 sm:grid-cols-2">
{% for i in "123"|make_list %}
<a href="#" class="flex gap-4 p-4 transition-colors border rounded-lg bg-card hover:bg-muted/50">
<div class="w-20 h-20 rounded-md bg-muted shrink-0"></div>
<div>
<h3 class="text-lg font-semibold">Cedar Point</h3>
<p class="text-sm text-muted-foreground">Sandusky, OH, United States</p>
<div class="flex items-center gap-2 mt-2 text-xs text-muted-foreground">
<span class="bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400 px-2 py-0.5 rounded-full">Operating</span>
<span></span>
<span>72 Rides</span>
</div>
</div>
</a>
{% endfor %}
</div>
</section>
<!-- Rides Section -->
<section x-show="tab === 'all' || tab === 'rides'">
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-bold">Rides</h2>
<span class="text-sm text-muted-foreground">5 results</span>
</div>
<div class="grid gap-4 sm:grid-cols-2">
{% for i in "12345"|make_list %}
<a href="#" class="flex gap-4 p-4 transition-colors border rounded-lg bg-card hover:bg-muted/50">
<div class="w-20 h-20 rounded-md bg-muted shrink-0"></div>
<div>
<h3 class="text-lg font-semibold">Millennium Force</h3>
<p class="text-sm text-muted-foreground">Cedar Point</p>
<div class="flex items-center gap-2 mt-2 text-xs text-muted-foreground">
<span class="font-medium text-yellow-600 dark:text-yellow-400">★ 4.9</span>
<span></span>
<span>Giga Coaster</span>
</div>
</div>
</a>
{% endfor %}
</div>
</section>
{% endif %}
</div>
</div>
</div>
{% endblock %}