responsive design

This commit is contained in:
elvira committed 2026-10-24 00:20:57 +03:00
1 parent 9217960de0
commit 0ae5f49bcf
23 files changed
+380 -157

No files matched your search

+21 -21
View File
@@ -25,13 +25,13 @@
{{-- Hero --}}
<div class="grid grid-cols-1 lg:grid-cols-2 lg:divide-x lg:divide-black border-b border-black min-h-[calc(100vh-102px)]">
<div class="flex flex-col justify-center gap-8 px-8 py-16 lg:px-16">
<svg viewBox="0 0 135 124" class="rotating-star w-[173px] h-[159px] text-[#f3d121]" aria-hidden="true" fill="currentColor">
<div class="flex flex-col justify-center gap-8 px-4 py-12 sm:px-8 lg:py-16 lg:px-16">
<svg viewBox="0 0 135 124" class="rotating-star w-28 h-auto text-[#f3d121] lg:w-[173px] lg:h-[159px]" aria-hidden="true" fill="currentColor">
<path d="m88.4 0 4 28.9 29.7-5.2-14.3 25.7L135 62l-27.2 12.6 14.3 25.7-29.7-5.2-4 28.9-20.9-21.1L46.6 124l-4-28.9-29.7 5.2 14.3-25.7L0 62l27.2-12.6-14.3-25.7 29.7 5.2 4-28.9 20.9 21.1L88.4 0z"/>
</svg>
<h1
class="font-display font-semibold text-6xl lg:text-[72px] leading-tight"
class="font-display font-semibold text-4xl sm:text-6xl lg:text-[72px] leading-tight"
aria-label="Ό,τι φαντάζεσαι, το τυπώνουμε"
data-controller="appear"
data-appear-visible-class="is-visible"
@@ -41,22 +41,22 @@ class="font-display font-semibold text-6xl lg:text-[72px] leading-tight"
</h1>
</div>
<div class="relative flex flex-col items-center justify-center px-8 py-10 lg:px-10" data-controller="carousel">
<div class="relative flex flex-col items-center justify-center px-14 py-10 lg:px-10" data-controller="carousel">
@if($heroProducts->isNotEmpty())
<button
type="button"
data-action="carousel#prev"
aria-label="Προηγούμενο προϊόν"
class="absolute left-4 lg:left-8 top-1/2 z-10 -translate-y-1/2 hover:-translate-x-1 transition duration-500"
class="absolute left-2 lg:left-8 top-1/2 z-10 -translate-y-1/2 hover:-translate-x-1 transition duration-500"
>
<x-ui.icon name="arrow-left" :size="62" class="[&_path]:stroke-2" />
<x-ui.icon name="arrow-left" :size="62" class="[&_path]:stroke-2 max-lg:size-10!" />
</button>
<div class="w-full h-full">
@foreach($heroProducts as $product)
<div
data-carousel-target="slide"
class="{{ $loop->first ? '' : 'hidden' }} group h-full flex flex-col justify-center pb-8 relative"
class="{{ $loop->first ? '' : 'hidden' }} group h-full flex flex-col justify-center relative lg:pb-8"
>
<div class="relative flex items-center justify-center">
<a href="{{ $product['href'] }}" class="relative block border border-black bg-white flex items-center justify-center overflow-hidden max-w-xs xl:max-w-sm">
@@ -88,14 +88,14 @@ class="w-full h-full object-cover"
:href="$product['href']"
size="md"
position="absolute"
class="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-100"
class="pointer-coarse:hidden opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-100"
>
{{ __('storefront.product.personalize') }}
</x-ui.button>
@elseif ($product['variantId'] ?? null)
<x-checkout::add-to-cart
:purchasable="$product['variantId']"
class="absolute opacity-0 group-hover:opacity-100 has-[.bbk-add-to-cart-error:not([hidden])]:opacity-100 transition-opacity duration-100"
class="absolute pointer-coarse:hidden opacity-0 group-hover:opacity-100 has-[.bbk-add-to-cart-error:not([hidden])]:opacity-100 transition-opacity duration-100"
>
<x-ui.button type="submit" size="md">
{{ __('storefront.product.add_to_cart') }}
@@ -104,8 +104,8 @@ class="absolute opacity-0 group-hover:opacity-100 has-[.bbk-add-to-cart-error:no
@endif
</div>
<div class="flex items-baseline justify-between gap-4 absolute bottom-0 left-0 w-full">
<a href="{{ $product['href'] }}" class="font-display font-bold text-2xl leading-snug hover:text-brand">
<div class="mt-4 flex items-baseline justify-between gap-4 lg:absolute lg:bottom-0 lg:left-0 lg:mt-0 lg:w-full">
<a href="{{ $product['href'] }}" class="font-display font-bold text-xl leading-snug hover:text-brand lg:text-2xl">
{{ $product['name'] }}
</a>
@if($product['price'] !== null)
@@ -120,9 +120,9 @@ class="absolute opacity-0 group-hover:opacity-100 has-[.bbk-add-to-cart-error:no
type="button"
data-action="carousel#next"
aria-label="Επόμενο προϊόν"
class="absolute right-4 lg:right-8 top-1/2 z-10 -translate-y-1/2 hover:translate-x-1 transition duration-500"
class="absolute right-2 lg:right-8 top-1/2 z-10 -translate-y-1/2 hover:translate-x-1 transition duration-500"
>
<x-ui.icon name="arrow-right" :size="62" class="[&_path]:stroke-2"/>
<x-ui.icon name="arrow-right" :size="62" class="[&_path]:stroke-2 max-lg:size-10!"/>
</button>
@else
<p class="text-neutral-500">Δεν βρέθηκαν προϊόντα.</p>
@@ -145,8 +145,8 @@ class="w-full h-full object-cover "
@endif
</div>
<div class="flex flex-col justify-center gap-6 px-8 py-16 lg:px-16 text-center">
<h2 class="font-semibold text-h2"
<div class="flex flex-col justify-center gap-6 px-4 py-12 sm:px-8 lg:py-16 lg:px-16 text-center">
<h2 class="font-semibold text-h3 lg:text-h2"
data-controller="appear"
data-appear-visible-class="is-visible">100% σουρεάλ & <span class="text-dance" data-text="3d-printed">3d-printed</span></h2>
<div class="max-w-md mx-auto" data-stoic="pages/home#trivia_body">
@@ -160,7 +160,7 @@ class="w-full h-full object-cover "
alt=""
aria-hidden="true"
loading="lazy"
class="max-w-xs"
class="w-full max-w-xs"
/>
@endif
</div>
@@ -175,19 +175,19 @@ class="max-w-xs"
{{-- Classics --}}
<div class="border-b border-black" data-controller="carousel">
<div class="flex items-center justify-between gap-4 px-8 py-12 border-b border-black">
<h2 class="font-display font-extrabold text-h2" data-stoic="pages/home#classics_title">{{ $page->classics_title }}</h2>
<div class="flex flex-col items-start gap-6 px-4 py-10 border-b border-black sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:px-8 lg:py-12">
<h2 class="font-display font-extrabold text-h3 lg:text-h2" data-stoic="pages/home#classics_title">{{ $page->classics_title }}</h2>
<x-ui.button size="lg" :href="route('products')">Όλα τα προϊόντα</x-ui.button>
</div>
<div class="flex items-center gap-6 px-8 py-12">
<div class="flex flex-wrap items-center justify-center gap-x-12 gap-y-8 px-4 py-10 sm:flex-nowrap sm:gap-6 sm:px-8 lg:py-12">
<button type="button" data-action="carousel#prev" aria-label="Προηγούμενα προϊόντα" class="shrink-0 hover:-translate-x-0.5 hover:opacity-60 transition duration-500">
<x-ui.icon name="arrow-left" :size="32" />
</button>
<div class="flex-1 overflow-hidden">
<div class="order-first basis-full overflow-hidden sm:order-none sm:basis-auto sm:flex-1">
@forelse($classicsProducts->chunk(4) as $chunk)
<div data-carousel-target="slide" class="{{ $loop->first ? '' : 'hidden' }} grid grid-cols-2 md:grid-cols-4 gap-6">
<div data-carousel-target="slide" class="{{ $loop->first ? '' : 'hidden' }} grid grid-cols-2 md:grid-cols-4 gap-4 sm:gap-6">
@foreach($chunk as $product)
<x-ui.product-card
:name="$product['name']"