{% comment %} Ride Card Component - Django Cotton Version A comprehensive ride card component with image handling, status badges, and feature displays. Includes all ride statistics, special features, and manufacturer information. Usage Examples: Basic usage: With custom CSS classes: With custom image fallback: Parameters: - ride: Ride object (required) - class: Additional CSS classes (optional) - fallback_gradient: Custom gradient for image fallback (default: "from-blue-500 to-purple-600") Features: - Image handling with gradient fallback backgrounds - Status badges with proper color coding (operating, closed_temporarily, closed_permanently, under_construction) - Ride name with link to detail page - Category and park information display - Statistics grid for height, speed, capacity, duration - Special features badges (inversions, launches, track_type) - Opening date and manufacturer/designer information - Responsive design with hover effects - Modern Tailwind styling and animations {% endcomment %} {% if ride %}
{% if ride.image %} {{ ride.name }} {% else %}
{% endif %}
{% if ride.operating_status == 'operating' or ride.operating_status == 'OPERATING' %} Operating {% elif ride.operating_status == 'closed_temporarily' or ride.operating_status == 'CLOSED_TEMP' %} Temporarily Closed {% elif ride.operating_status == 'closed_permanently' or ride.operating_status == 'CLOSED_PERM' %} Permanently Closed {% elif ride.operating_status == 'under_construction' or ride.operating_status == 'UNDER_CONSTRUCTION' %} Under Construction {% elif ride.operating_status == 'sbno' or ride.operating_status == 'SBNO' %} SBNO {% endif %}

{{ ride.name }}

{{ ride.category|default:"Ride" }} {% if ride.park %} {{ ride.park.name }} {% endif %}
{% if ride.height %}
{{ ride.height }}ft
Height
{% endif %} {% if ride.rollercoaster_stats.max_speed %}
{{ ride.rollercoaster_stats.max_speed }}mph
Top Speed
{% elif ride.max_speed %}
{{ ride.max_speed }}mph
Max Speed
{% endif %} {% if ride.capacity_per_hour %}
{{ ride.capacity_per_hour }}
Capacity/Hr
{% endif %} {% if ride.duration %}
{{ ride.duration }}s
Duration
{% endif %}
{% if ride.has_inversions or ride.has_launches or ride.rollercoaster_stats.track_type or ride.track_type %}
{% if ride.has_inversions %} {% if ride.rollercoaster_stats.number_of_inversions %} {{ ride.rollercoaster_stats.number_of_inversions }} Inversion{{ ride.rollercoaster_stats.number_of_inversions|pluralize }} {% else %} Inversions {% endif %} {% endif %} {% if ride.has_launches %} {% if ride.rollercoaster_stats.number_of_launches %} {{ ride.rollercoaster_stats.number_of_launches }} Launch{{ ride.rollercoaster_stats.number_of_launches|pluralize }} {% else %} Launched {% endif %} {% endif %} {% if ride.rollercoaster_stats.track_type %} {{ ride.rollercoaster_stats.track_type|title }} {% elif ride.track_type %} {{ ride.track_type|title }} {% endif %}
{% endif %} {% if ride.opened_date %}
Opened {{ ride.opened_date|date:"F j, Y" }}
{% endif %} {% if ride.manufacturer or ride.designer %}
{% if ride.manufacturer %}
{{ ride.manufacturer.name }}
{% endif %} {% if ride.designer and ride.designer != ride.manufacturer %}
Designed by {{ ride.designer.name }}
{% endif %}
{% endif %}
{% endif %}