mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
- 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.
62 lines
3.5 KiB
HTML
62 lines
3.5 KiB
HTML
{% 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 %}
|