{% comment %} Park Card Component - Django Cotton Version A reusable park card component that supports both list and grid view modes. Includes status badges, operator information, description, and ride/coaster statistics. Usage Examples: List View: Grid View: With custom CSS classes: Parameters: - park: Park object (required) - view_mode: "list" or "grid" (default: "grid") - class: Additional CSS classes (optional) Features: - Responsive design with hover effects - Status badge with proper color coding - Operator information display - Description with automatic truncation (30 words for list, 15 for grid) - Ride and coaster count statistics with icons - Gradient effects and modern styling - Links to park detail pages {% endcomment %} {% if park %} {% if view_mode == 'list' %} {# Enhanced List View Item #}
{# Main Content Section #}

{% if park.slug %} {{ park.name }} {% else %} {{ park.name }} {% endif %}

{# Status Badge #} {{ park.get_status_display }}
{% if park.operator %}
{{ park.operator.name }}
{% endif %} {% if park.description %}

{{ park.description|truncatewords:30 }}

{% endif %}
{# Stats Section #} {% if park.ride_count or park.coaster_count %}
{% if park.ride_count %}
{{ park.ride_count }} rides
{% endif %} {% if park.coaster_count %}
{{ park.coaster_count }} coasters
{% endif %}
{% endif %}
{% else %} {# Enhanced Grid View Item #}
{# Park Image #}
{% if park.card_image %} {{ park.name }} {% elif park.photos.first %} {{ park.name }} {% else %}
{% endif %} {# Status Badge Overlay #}
{{ park.get_status_display }}

{% if park.slug %} {{ park.name }} {% else %} {{ park.name }} {% endif %}

{% if park.operator %}
{{ park.operator.name }}
{% endif %} {% if park.description %}

{{ park.description|truncatewords:15 }}

{% endif %} {# Stats Footer #} {% if park.ride_count or park.coaster_count %}
{% if park.ride_count %}
{{ park.ride_count }}
{% endif %} {% if park.coaster_count %}
{{ park.coaster_count }}
{% endif %}
{# View Details Arrow #}
{% endif %}
{% endif %} {% endif %}