+ + {{ park.name }} + +
+ + {# Status Badge #} + ++ {{ park.description|truncatewords:30 }} +
+ {% endif %} +From 25e6fdb4960a0189c87c4d31a6276766537ee0a5 Mon Sep 17 00:00:00 2001
From: pac7 <47831526-pac7@users.noreply.replit.com>
Date: Mon, 22 Sep 2025 03:21:14 +0000
Subject: [PATCH] Standardize park and ride cards using Django Cotton
components
Introduces reusable Django Cotton components for park and ride cards, standardizing their presentation and enforcing the use of the django-cotton templating system. Updates static CSS for new color variables and gradient stops.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 0bdea3fb-49ea-4863-b501-fa6f5af0cbf0
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
---
.replit | 4 +
replit.md | 1 +
static/css/tailwind.css | 15 +++
templates/cotton/park_card.html | 190 ++++++++++++++++++++++++++++
templates/cotton/ride_card.html | 215 ++++++++++++++++++++++++++++++++
5 files changed, 425 insertions(+)
create mode 100644 templates/cotton/park_card.html
create mode 100644 templates/cotton/ride_card.html
diff --git a/.replit b/.replit
index 3520ba63..809f821d 100644
--- a/.replit
+++ b/.replit
@@ -54,6 +54,10 @@ outputType = "webview"
localPort = 5000
externalPort = 80
+[[ports]]
+localPort = 32933
+externalPort = 3002
+
[[ports]]
localPort = 41923
externalPort = 3000
diff --git a/replit.md b/replit.md
index 4ebceeb3..08beef24 100644
--- a/replit.md
+++ b/replit.md
@@ -56,6 +56,7 @@ Migrations: All applied successfully (including circular dependency resolution)
✅ **Spatial Data Support**: GeoDjango Point objects and spatial functionality working correctly
✅ **CloudflareImages Integration**: Avatar functionality preserved with proper foreign key relationships
✅ **Django-Cotton Integration**: Modern component-based template system with EXACT visual preservation
+✅ **Cotton Components**: Standardized park_card.html and ride_card.html components with full feature support
### API Endpoints Available
- `/api/v1/parks/` - Parks API with spatial data
diff --git a/static/css/tailwind.css b/static/css/tailwind.css
index 8481364f..9e447eeb 100644
--- a/static/css/tailwind.css
+++ b/static/css/tailwind.css
@@ -22,6 +22,7 @@
--color-orange-200: oklch(90.1% 0.076 70.697);
--color-orange-600: oklch(64.6% 0.222 41.116);
--color-orange-800: oklch(47% 0.157 37.304);
+ --color-orange-900: oklch(40.8% 0.123 38.172);
--color-amber-100: oklch(96.2% 0.059 95.617);
--color-amber-800: oklch(47.3% 0.137 46.201);
--color-yellow-50: oklch(98.7% 0.026 102.212);
@@ -1730,6 +1731,10 @@
--tw-gradient-to: var(--color-blue-50);
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
}
+ .to-blue-600 {
+ --tw-gradient-to: var(--color-blue-600);
+ --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
+ }
.to-gray-100 {
--tw-gradient-to: var(--color-gray-100);
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
@@ -3907,6 +3912,11 @@
}
}
}
+ .dark\:bg-orange-900 {
+ @media (prefers-color-scheme: dark) {
+ background-color: var(--color-orange-900);
+ }
+ }
.dark\:bg-purple-800 {
@media (prefers-color-scheme: dark) {
background-color: var(--color-purple-800);
@@ -4239,6 +4249,11 @@
color: var(--color-green-900);
}
}
+ .dark\:text-orange-200 {
+ @media (prefers-color-scheme: dark) {
+ color: var(--color-orange-200);
+ }
+ }
.dark\:text-primary {
@media (prefers-color-scheme: dark) {
color: var(--color-primary);
diff --git a/templates/cotton/park_card.html b/templates/cotton/park_card.html
new file mode 100644
index 00000000..ed8a4c8b
--- /dev/null
+++ b/templates/cotton/park_card.html
@@ -0,0 +1,190 @@
+{% 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:
+
+ {{ park.description|truncatewords:30 }}
+
+ {{ park.description|truncatewords:15 }}
+
+
+ {{ park.name }}
+
+
+
+ {# Status Badge #}
+
+
+
+ {{ park.name }}
+
+
+
+ {# Status Badge #}
+
+