Files
thrillwiki_django_no_react/backend/templates/cotton/ui/status_badge.html
pac7 0cf6805c18 Update website to use new reusable components for common elements
Refactor HTML templates to incorporate Django Cotton components for buttons, forms, and other UI elements.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/55dLPZG
2025-09-22 00:15:14 +00:00

39 lines
987 B
HTML

{% comment %}
Cotton Status Badge Component
Converts existing status badge component to use Django Cotton's component system
Preserves canonical status mapping from park_tags
{% endcomment %}
{% load park_tags %}
<!-- Cotton Status Badge Component -->
<c-vars
status="status|default:'UNKNOWN'"
badge_classes="badge_classes|default:''"
size="size|default:'default'"
/>
{% with status_config=status|get_status_config %}
<span class="
inline-flex items-center rounded-full font-medium
{% if size == 'sm' %}
px-2 py-1 text-xs
{% elif size == 'lg' %}
px-3 py-2 text-base
{% else %}
px-2.5 py-0.5 text-sm
{% endif %}
{{ status_config.classes }} {{ badge_classes }}
">
{% if status_config.icon %}
<svg class="-ml-0.5 mr-1.5 h-2 w-2" fill="currentColor" viewBox="0 0 8 8">
<circle cx="4" cy="4" r="3" />
</svg>
{% endif %}
<!-- Status Text Content -->
<c-slot name="status-text">
{{ status_config.label }}
</c-slot>
</span>
{% endwith %}