fix: anchor View Products buttons to bottom of category cards
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
$hasImage = !empty($childCategory->image);
|
||||
@endphp
|
||||
|
||||
<div class="group relative bg-gradient-to-br from-background-secondary via-background-secondary/90 to-background-secondary/70 border border-neutral/50 rounded-2xl shadow-xl hover:shadow-2xl transform hover:-translate-y-3 transition-all duration-500 overflow-hidden animate-fade-in-up"
|
||||
<div class="group relative flex flex-col bg-gradient-to-br from-background-secondary via-background-secondary/90 to-background-secondary/70 border border-neutral/50 rounded-2xl shadow-xl hover:shadow-2xl transform hover:-translate-y-3 transition-all duration-500 overflow-hidden animate-fade-in-up"
|
||||
style="animation-delay: {{ $index * 0.1 }}s;">
|
||||
|
||||
@if ($hasImage)
|
||||
@@ -102,7 +102,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="p-6">
|
||||
<div class="p-6 flex-1 flex flex-col">
|
||||
<h3 class="text-xl font-bold text-color-base mb-4 group-hover:text-primary transition-colors duration-300 line-clamp-2">
|
||||
{{ $childCategory->name }}
|
||||
</h3>
|
||||
@@ -113,7 +113,7 @@
|
||||
</article>
|
||||
@endif
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="flex w-full mt-auto">
|
||||
<a href="{{ route('category.show', ['category' => $childCategory->slug]) }}" wire:navigate
|
||||
class="group/btn flex w-full items-center justify-center gap-2 bg-primary hover:bg-primary/90 text-white px-4 py-3 rounded-2xl font-medium transition-all duration-300 hover:shadow-lg hover:scale-105">
|
||||
{{ __('View Products') }}
|
||||
@@ -141,13 +141,13 @@
|
||||
$isAvailable = ($product->stock !== 0) && $product->price()->available;
|
||||
@endphp
|
||||
|
||||
<div class="group relative bg-gradient-to-br from-background-secondary via-background-secondary/90 to-background-secondary/70 border border-neutral/50 rounded-3xl shadow-xl hover:shadow-2xl transform hover:-translate-y-3 transition-all duration-500 overflow-hidden animate-fade-in-up"
|
||||
<div class="group relative flex flex-col bg-gradient-to-br from-background-secondary via-background-secondary/90 to-background-secondary/70 border border-neutral/50 rounded-3xl shadow-xl hover:shadow-2xl transform hover:-translate-y-3 transition-all duration-500 overflow-hidden animate-fade-in-up"
|
||||
style="animation-delay: {{ $index * 0.1 }}s;">
|
||||
|
||||
|
||||
|
||||
@if(theme('small_images', false))
|
||||
<div class="p-6">
|
||||
<div class="p-6 flex-1 flex flex-col">
|
||||
<div class="flex items-start gap-4 mb-4">
|
||||
@if ($product->image)
|
||||
<div class="flex-shrink-0 relative">
|
||||
@@ -173,7 +173,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="mt-auto pt-4">
|
||||
@if ($isAvailable && theme('direct_checkout', false))
|
||||
<a href="{{ route('products.checkout', ['category' => $category, 'product' => $product->slug]) }}" wire:navigate
|
||||
class="group/btn w-full inline-flex items-center justify-center gap-2 bg-primary hover:bg-primary/90 text-white px-4 py-3 rounded-2xl font-medium transition-all duration-300 hover:shadow-lg hover:scale-105">
|
||||
@@ -207,7 +207,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="p-6">
|
||||
<div class="p-6 flex-1 flex flex-col">
|
||||
<h3 class="text-xl font-bold text-color-base mb-4 group-hover:text-primary transition-colors duration-300 line-clamp-2">
|
||||
{{ $product->name }}
|
||||
</h3>
|
||||
@@ -218,7 +218,7 @@
|
||||
</article>
|
||||
@endif
|
||||
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<div class="flex items-center justify-between mb-6 mt-auto">
|
||||
<p class="text-2xl font-bold {{ $isAvailable ? 'text-primary' : 'text-color-muted' }}">
|
||||
{{ $product->price() }}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user