diff --git a/cards/templates/cards/_card_preview_design1.html b/cards/templates/cards/_card_preview_design1.html new file mode 100644 index 0000000..550a289 --- /dev/null +++ b/cards/templates/cards/_card_preview_design1.html @@ -0,0 +1,45 @@ +{# Design 1: Classic Top Trumps - clean, balanced layout #} + diff --git a/cards/templates/cards/_card_preview_design2.html b/cards/templates/cards/_card_preview_design2.html new file mode 100644 index 0000000..ba078c1 --- /dev/null +++ b/cards/templates/cards/_card_preview_design2.html @@ -0,0 +1,44 @@ +{# Design 2: Dark, bold band and inverted text #} + diff --git a/cards/templates/cards/_card_preview_design3.html b/cards/templates/cards/_card_preview_design3.html new file mode 100644 index 0000000..9622eae --- /dev/null +++ b/cards/templates/cards/_card_preview_design3.html @@ -0,0 +1,50 @@ +{# Design 3: Bright gradient header and centered stats badges #} + diff --git a/cards/templates/cards/_card_preview_design4.html b/cards/templates/cards/_card_preview_design4.html new file mode 100644 index 0000000..79a39b0 --- /dev/null +++ b/cards/templates/cards/_card_preview_design4.html @@ -0,0 +1,50 @@ +{# Design 4: Sidebar stats and portrait orientation #} + diff --git a/cards/templates/cards/_card_preview_design5.html b/cards/templates/cards/_card_preview_design5.html new file mode 100644 index 0000000..95ab5c8 --- /dev/null +++ b/cards/templates/cards/_card_preview_design5.html @@ -0,0 +1,61 @@ +{# Design 5: Minimal, high-contrast with icon-like stat rows #} + diff --git a/cards/templates/cards/_card_stats_rows.html b/cards/templates/cards/_card_stats_rows.html new file mode 100644 index 0000000..8bf31eb --- /dev/null +++ b/cards/templates/cards/_card_stats_rows.html @@ -0,0 +1,30 @@ +
+
+
Speed (km/h)
+
+
{{ card.speed_display }}
+
{% for t in card.speed_star_types %}{% if t == 'full' %}★{% else %}☆{% endif %}{% endfor %}
(orig: {{ card.speed_orig }})
+
+
+
+
Weight (kg)
+
+
{{ card.weight_display }}
+
{% for t in card.weight_star_types %}{% if t == 'full' %}★{% else %}☆{% endif %}{% endfor %}
(orig: {{ card.weight_orig }})
+
+
+
+
Intelligence (score)
+
+
{{ card.intelligence_display }}
+
{% for t in card.intelligence_star_types %}{% if t == 'full' %}★{% else %}☆{% endif %}{% endfor %}
(orig: {{ card.intelligence_orig }})
+
+
+
+
Height (m)
+
+
{{ card.height_display }}
+
{% for t in card.height_star_types %}{% if t == 'full' %}★{% else %}☆{% endif %}{% endfor %}
(orig: {{ card.height_orig }})
+
+
+
diff --git a/cards/templates/cards/preview.html b/cards/templates/cards/preview.html index b1c79f8..ac11580 100644 --- a/cards/templates/cards/preview.html +++ b/cards/templates/cards/preview.html @@ -2,6 +2,6 @@ {% block content %}
- {% include 'cards/_card_preview.html' %} + {% include fragment_template %}
{% endblock %} diff --git a/cards/views.py b/cards/views.py index 36bcf9b..ae3e61a 100644 --- a/cards/views.py +++ b/cards/views.py @@ -276,9 +276,20 @@ def preview_card(request, pk): """Render a full preview of a card. HTMX loads the modal fragment into #modal-root.""" card = get_object_or_404(Dinosaur, pk=pk) background = BackgroundImage.get_active() if BackgroundImage.objects.exists() else None + # Support multiple visual designs selectable via `?design=1..5`. + try: + design = int(request.GET.get('design', '1')) + except Exception: + design = 1 + if design < 1 or design > 5: + design = 1 + template_name = f'cards/_card_preview_design{design}.html' + template_name = f'cards/_card_preview_design{design}.html' + context = {'card': card, 'background': background, 'design': design, 'fragment_template': template_name} if is_htmx(request): - return render(request, 'cards/_card_preview.html', {'card': card, 'background': background}) - return render(request, 'cards/preview.html', {'card': card, 'background': background}) + return render(request, template_name, context) + # For non-HTMX full page preview, render the generic preview which can accept design too + return render(request, 'cards/preview.html', context) def cards_overview(request): diff --git a/db.sqlite3 b/db.sqlite3 index 2d79712..93a1822 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/media/backgrounds/Gemini_Generated_Image_j3gm8lj3gm8lj3gm.png b/media/backgrounds/Gemini_Generated_Image_j3gm8lj3gm8lj3gm.png new file mode 100644 index 0000000..63d3d12 Binary files /dev/null and b/media/backgrounds/Gemini_Generated_Image_j3gm8lj3gm8lj3gm.png differ