mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 00:11:10 -05:00
Display images on park and ride cards using new card image field
Update park and ride card templates to utilize the `card_image` field for displaying images, with fallbacks to existing image fields or placeholders. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 0bdea3fb-49ea-4863-b501-fa6f5af0cbf0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/0bdea3fb-49ea-4863-b501-fa6f5af0cbf0/0NbnR7B
This commit is contained in:
@@ -64,8 +64,12 @@ Features:
|
||||
<div class="ride-card bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-all duration-300 {{ class }}">
|
||||
<!-- Ride image -->
|
||||
<div class="relative h-48 bg-gradient-to-br {{ fallback_gradient }}">
|
||||
{% if ride.image %}
|
||||
<img src="{{ ride.image.url }}"
|
||||
{% if ride.card_image %}
|
||||
<img src="{{ ride.card_image.image.url }}"
|
||||
alt="{{ ride.name }}"
|
||||
class="w-full h-full object-cover">
|
||||
{% elif ride.photos.first %}
|
||||
<img src="{{ ride.photos.first.image.url }}"
|
||||
alt="{{ ride.name }}"
|
||||
class="w-full h-full object-cover">
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user