price function global (needs review)

This commit is contained in:
elvira
2026-08-08 15:10:37 +03:00
parent e46276a31b
commit 7677d10821
8 changed files with 65 additions and 7 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ class="font-display font-semibold text-6xl lg:text-7xl leading-tight"
aria-label="Προηγούμενο προϊόν"
class="absolute left-4 lg:left-8 top-1/2 -translate-y-1/2 hover:opacity-60 transition-opacity"
>
<x-ui.icon name="arrow-left" :size="56" />
<x-ui.icon name="arrow-left" :size="62" class="[&_path]:stroke-2" />
</button>
<div class="w-full ">
@@ -63,7 +63,7 @@ class="w-full h-full object-cover"
<div class="flex items-baseline justify-between gap-4">
<span class="font-display font-bold text-2xl">{{ $product['name'] }}</span>
@if($product['price'] !== null)
<span class="font-bold text-xl shrink-0">€{{ number_format($product['price'], 2) }}</span>
<span class="font-bold text-xl shrink-0"><x-ui.price :amount="$product['price']" /></span>
@endif
</div>
</a>
@@ -76,7 +76,7 @@ class="w-full h-full object-cover"
aria-label="Επόμενο προϊόν"
class="absolute right-4 lg:right-8 top-1/2 -translate-y-1/2 hover:opacity-60 transition-opacity"
>
<x-ui.icon name="arrow-right" :size="56" />
<x-ui.icon name="arrow-right" :size="62" class="[&_path]:stroke-2"/>
</button>
@else
<p class="text-neutral-500">Δεν βρέθηκαν προϊόντα.</p>