fixing product card
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -14,18 +14,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div class="flex flex-1 flex-col gap-1 p-6 pb-2">
|
<div class="flex flex-1 flex-col gap-1 p-6 pb-2">
|
||||||
<!-- Header: Title & Price -->
|
<!-- Header: Title & Price (stacked so neither overflows the narrow card) -->
|
||||||
<div class="flex justify-between gap-4">
|
<h3 class="break-words text-lg font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ product.name }}</h3>
|
||||||
<h3 class="text-lg font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ product.name }}</h3>
|
|
||||||
{% if product.on_sale %}
|
{% if product.on_sale %}
|
||||||
<span class="flex flex-col items-end whitespace-nowrap leading-tight">
|
<div class="flex flex-wrap items-baseline gap-x-2 leading-tight">
|
||||||
<span class="text-sm text-on-surface/50 line-through dark:text-on-surface-dark/50">{{ product.regular_price }} {{ product.currency }}</span>
|
|
||||||
<span class="text-xl font-semibold text-danger"><span class="sr-only">Price</span>{% if product.has_options %}{{ t(key="from-price", price=product.price, lang=lang | default(value='sk')) }}{% else %}{{ product.price }}{% endif %} {{ product.currency }}</span>
|
<span class="text-xl font-semibold text-danger"><span class="sr-only">Price</span>{% if product.has_options %}{{ t(key="from-price", price=product.price, lang=lang | default(value='sk')) }}{% else %}{{ product.price }}{% endif %} {{ product.currency }}</span>
|
||||||
</span>
|
<span class="text-sm text-on-surface/50 line-through dark:text-on-surface-dark/50">{{ product.regular_price }} {{ product.currency }}</span>
|
||||||
{% else %}
|
|
||||||
<span class="whitespace-nowrap text-xl"><span class="sr-only">Price</span>{% if product.has_options %}{{ t(key="from-price", price=product.price, lang=lang | default(value='sk')) }}{% else %}{{ product.price }}{% endif %} {{ product.currency }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<span class="break-words text-xl"><span class="sr-only">Price</span>{% if product.has_options %}{{ t(key="from-price", price=product.price, lang=lang | default(value='sk')) }}{% else %}{{ product.price }}{% endif %} {{ product.currency }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex flex-col gap-2 p-6 pt-0">
|
<div class="flex flex-col gap-2 p-6 pt-0">
|
||||||
|
|||||||
Reference in New Issue
Block a user