This commit is contained in:
Ross
2025-12-06 20:32:50 +00:00
parent 9dd761aa41
commit 688a04f47a
2 changed files with 39 additions and 55 deletions
@@ -13,49 +13,43 @@
<div style="flex:1 1 auto; min-width:0; font-weight:900; font-size:1.15rem; text-transform:uppercase; letter-spacing:0.6px; color:#17202a; text-shadow:0 1px 0 rgba(255,255,255,0.6); text-align:center; word-break:break-word; white-space:normal;">{{ card.name }}</div>
<div style="flex:0 0 36px; height:6px; background:linear-gradient(90deg,#ffd6a5,#ffb4a2); border-radius:4px; opacity:0.95"></div>
</div>
<div style="margin-top:6px; width:100%;">
<!-- Mesozoic timeline: Triassic -> Jurassic -> Cretaceous -->
<div style="width:100%; display:flex; flex-direction:column; gap:6px;">
<div style="height:10px; border-radius:6px; background:linear-gradient(90deg,#eceff1,#f8fafc); position:relative; overflow:visible;">
<div style="position:absolute; left:0; right:0; top:0; bottom:0; display:flex;">
<div style="flex:1; background:transparent; display:flex; align-items:center; justify-content:center;">
<div style="width:100%; height:10px; border-top-left-radius:6px; border-bottom-left-radius:6px; background: {% if card.era == 'triassic' %}#f6d365{% else %}rgba(0,0,0,0.05){% endif %};"></div>
</div>
<div style="flex:1; background:transparent; display:flex; align-items:center; justify-content:center;">
<div style="width:100%; height:10px; background: {% if card.era == 'jurassic' %}#8ec5ff{% else %}rgba(0,0,0,0.05){% endif %};"></div>
</div>
<div style="flex:1; background:transparent; display:flex; align-items:center; justify-content:center;">
<div style="width:100%; height:10px; border-top-right-radius:6px; border-bottom-right-radius:6px; background: {% if card.era == 'cretaceous' %}#ffd6a5{% else %}rgba(0,0,0,0.05){% endif %};"></div>
</div>
</div>
<!-- era marker dot -->
<div style="position:absolute; top:-6px; left:0; right:0; display:flex; justify-content:space-between; pointer-events:none;">
<div style="flex:1; display:flex; justify-content:center;"><div style="width:12px; height:12px; border-radius:50%; background:{% if card.era == 'triassic' %}#c47a00{% else %}rgba(0,0,0,0.15){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
<div style="flex:1; display:flex; justify-content:center;"><div style="width:12px; height:12px; border-radius:50%; background:{% if card.era == 'jurassic' %}#0066cc{% else %}rgba(0,0,0,0.15){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
<div style="flex:1; display:flex; justify-content:center;"><div style="width:12px; height:12px; border-radius:50%; background:{% if card.era == 'cretaceous' %}#ff7b54{% else %}rgba(0,0,0,0.15){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
</div>
</div>
<div style="display:flex; justify-content:space-between; font-size:0.82rem; color:#616161;">
<div style="flex:1; text-align:center;">Triassic</div>
<div style="flex:1; text-align:center;">Jurassic</div>
<div style="flex:1; text-align:center;">Cretaceous</div>
</div>
</div>
</div>
<div style="margin-top:6px;">
{% if card.diet == 'herbivore' %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#2ecc71;color:#fff;font-weight:700;">🥦 Herbivore</span>
{% elif card.diet == 'carnivore' %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#e74c3c;color:#fff;font-weight:700;">🥩 Carnivore</span>
{% else %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#f39c12;color:#fff;font-weight:700;">🍽️ Omnivore</span>
{% endif %}
</div>
{# Era timeline moved into hero overlay; original left-column timeline removed #}
{# diet badge moved into hero overlay; kept here previously but removed to avoid duplication #}
</div>
</div>
<div class="hero-image" style="background-image: url('{% if card.background and card.background.image %}{{ card.background.image.url }}{% elif background and background.image %}{{ background.image.url }}{% endif %}'); background-size: {{ card.background_image_scale }}; background-position:center; flex:1; position:relative; padding:8px;">
{# Top overlay: compact era timeline + label (moved from left column) #}
<div style="position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:3; width:84%; max-width:420px;">
<div style="background:rgba(0,0,0,0.55); padding:6px 10px; border-radius:999px; color:#fff; display:flex; align-items:center; justify-content:center;">
<div style="width:100%; max-width:360px; display:flex; align-items:center; gap:8px;">
<div style="flex:1; height:8px; border-radius:6px; background:linear-gradient(90deg,#eceff1,#f8fafc); position:relative; overflow:visible;">
<div style="position:absolute; left:0; right:0; top:0; bottom:0; display:flex;">
<div style="flex:1;"><div style="width:100%; height:8px; border-top-left-radius:6px; border-bottom-left-radius:6px; background: {% if card.era == 'triassic' %}#f6d365{% else %}rgba(255,255,255,0.12){% endif %};"></div></div>
<div style="flex:1;"><div style="width:100%; height:8px; background: {% if card.era == 'jurassic' %}#8ec5ff{% else %}rgba(255,255,255,0.12){% endif %};"></div></div>
<div style="flex:1;"><div style="width:100%; height:8px; border-top-right-radius:6px; border-bottom-right-radius:6px; background: {% if card.era == 'cretaceous' %}#ffd6a5{% else %}rgba(255,255,255,0.12){% endif %};"></div></div>
</div>
<div style="position:absolute; top:-6px; left:0; right:0; display:flex; justify-content:space-between; pointer-events:none;">
<div style="flex:1; display:flex; justify-content:center;"><div style="width:10px; height:10px; border-radius:50%; background:{% if card.era == 'triassic' %}#c47a00{% else %}rgba(255,255,255,0.22){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
<div style="flex:1; display:flex; justify-content:center;"><div style="width:10px; height:10px; border-radius:50%; background:{% if card.era == 'jurassic' %}#0066cc{% else %}rgba(255,255,255,0.22){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
<div style="flex:1; display:flex; justify-content:center;"><div style="width:10px; height:10px; border-radius:50%; background:{% if card.era == 'cretaceous' %}#ff7b54{% else %}rgba(255,255,255,0.22){% endif %}; box-shadow:0 2px 6px rgba(0,0,0,0.12);"></div></div>
</div>
</div>
<div style="margin-left:10px; font-weight:700; font-size:0.85rem; color:#fff;">{{ card.get_era_display }}</div>
</div>
</div>
</div>
{# Bottom overlay: diet badge #}
<div style="position:absolute; bottom:10px; left:50%; transform:translateX(-50%); z-index:3; background:rgba(255,255,255,0.9); color:#111; padding:6px 10px; border-radius:999px; font-weight:700; font-size:0.85rem; box-shadow:0 6px 18px rgba(0,0,0,0.06);">
{% if card.diet == 'herbivore' %}
🥦 Herbivore
{% elif card.diet == 'carnivore' %}
🥩 Carnivore
{% else %}
🍽️ Omnivore
{% endif %}
</div>
{% if card.image %}
<img class="card-hero-img" src="{{ card.image.url }}" alt="{{ card.name }}" style="transform: scale({{ card.image_scale }}); transform-origin:center; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,0.08);">
<img class="card-hero-img" src="{{ card.image.url }}" alt="{{ card.name }}" style="position:relative; z-index:1; transform: scale({{ card.image_scale }}); transform-origin:center; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,0.08);">
{% endif %}
</div>
<div style="padding:8px 10px; border-top:1px solid rgba(0,0,0,0.04); background:#fafafa;">
@@ -81,21 +75,11 @@
</div>
</div>
<div style="flex:1; padding:14px; background:#fff;">
<div style="display:flex; justify-content:space-between; align-items:center; gap:8px;">
<div style="display:flex; justify-content:space-between; align-items:center; gap:8px;">
<div style="font-weight:800; font-size:1.4rem">{{ card.name }}</div>
<div style="display:flex; flex-direction:column; align-items:flex-end; gap:4px;">
<div class="is-size-7"><strong>{{ card.get_era_display }}</strong></div>
<div>
{% if card.diet == 'herbivore' %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#2ecc71;color:#fff;font-weight:700;">🥦 Herbivore</span>
{% elif card.diet == 'carnivore' %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#e74c3c;color:#fff;font-weight:700;">🥩 Carnivore</span>
{% else %}
<span style="display:inline-block;padding:4px 8px;border-radius:999px;background:#f39c12;color:#fff;font-weight:700;">🍽️ Omnivore</span>
{% endif %}
</div>
</div>
</div>
{# Era and diet visuals relocated into the hero-image overlays above to avoid duplication #}
<div style="margin-top:8px">{{ card.description|linebreaksbr }}</div>
{% if card.facts_list %}
<div style="margin-top:8px">
+3 -3
View File
@@ -45,11 +45,11 @@
}
.toptrump-card.design-4 {
width: 680px;
min-height: 680px;
min-height: 620px;
display: flex;
}
/* Larger hero image for design-4 to match list view scale behavior */
.toptrump-card.design-4 .hero-image { height: 560px; }
/* Slightly reduced hero image height for design-4 so previews fit better */
.toptrump-card.design-4 .hero-image { height: 440px; }
/* For design-4 use a non-cropping image layout so wide dinos aren't clipped */
.toptrump-card.design-4 .hero-image{ overflow:hidden; display:flex; align-items:center; justify-content:center }
.toptrump-card.design-4 .card-hero-img{