From 659efda29f852a92762cc78cc9e68c28619cde70 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 6 Dec 2025 21:26:52 +0000 Subject: [PATCH] . --- cards/templates/cards/print.html | 10 ++++++++++ cards/templates/cards/printable.html | 17 ++++++++++++++++- cards/views.py | 21 ++++++++++++++++++--- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/cards/templates/cards/print.html b/cards/templates/cards/print.html index 82ba0a1..e11d726 100644 --- a/cards/templates/cards/print.html +++ b/cards/templates/cards/print.html @@ -27,6 +27,16 @@
+
+ +
+ +
+
diff --git a/cards/templates/cards/printable.html b/cards/templates/cards/printable.html index e6b00c5..57436a9 100644 --- a/cards/templates/cards/printable.html +++ b/cards/templates/cards/printable.html @@ -20,6 +20,21 @@ .toptrump-card.design-3, .toptrump-card.design-5 { width: 98%; min-height: 120mm; } .toptrump-card.design-4 { width: 98%; min-height: 135mm; } + + /* Per-page adjustments: if rendering 4-up we reduce min-heights so cards fit */ + {% if per_page == 4 %} + .toptrump-card.design-1, + .toptrump-card.design-2, + .toptrump-card.design-3, + .toptrump-card.design-5 { min-height: 62mm; } + .toptrump-card.design-4 { min-height: 70mm; } + {% elif per_page == 1 %} + .toptrump-card.design-1, + .toptrump-card.design-2, + .toptrump-card.design-3, + .toptrump-card.design-5 { min-height: 180mm; } + .toptrump-card.design-4 { min-height: 220mm; } + {% endif %} /* Ensure hero images scale inside print cards */ .print-card .hero-image{height:auto; min-height:40mm;} .print-card img.card-hero-img{max-width:100%; height:auto; object-fit:contain} @@ -87,7 +102,7 @@ {% for page_cards in pages %}
-
+
{% for card in page_cards %}