feat: created product image model

This commit is contained in:
2025-02-18 15:54:02 +01:00
parent cdaeec468a
commit fe4b783658
27 changed files with 644 additions and 563 deletions
+2 -2
View File
@@ -15,9 +15,9 @@
<div class="space-y-4 flex items-center justify-between gap-6 space-y-0">
<a href="{% url 'web:product_detail' pk=item.product.pk slug=item.product.slug %}"
class="shrink-0 md:order-1">
<img class="h-20 w-20 dark:hidden" src="{{ item.product.images.all|first }}"
<img class="h-20 w-20 dark:hidden" src="{{ item.product.images.all.0.s.url }}"
alt="{{ item.product.name }}"/>
<img class="hidden h-20 w-20 dark:block" src="{{ item.product.images.all|first }}"
<img class="hidden h-20 w-20 dark:block" src="{{ item.product.images.all.0.s_dark.url }}"
alt="{{ item.product.name }}"/>
</a>