Files
shoppy/web/templates/components/product_card.html
T
2026-03-19 17:33:24 +01:00

24 lines
716 B
HTML

{% load i18n %}
<article class="rounded-lg border-primary p-6 shadow-sm">
<a class="h-56 w-full" href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}">
<img class="mx-auto h-full " src="{{ product.images.all.0.m.url }}"
alt="{{ product.name }}"/>
</a>
<div class="pt-6 flex justify-between">
<a href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}"
class="link">
<h1>{{ product.name }}</h1>
</a>
<p class="txt-2xl">
{% with product.current_prices.0 as price %}
{{ price.price_with_tax }} €
{% endwith %}
</p>
</div>
<div class="mt-4">
{% include 'components/cart/add_to_cart.html' %}
</div>
</article>