responsive design
This commit is contained in:
1 parent
9217960de0
commit
0ae5f49bcf
23 files changed
+380
-157
No files matched your search
+80
-1
@@ -260,6 +260,84 @@ @layer components {
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Mobile menu (popover) — wipes down from under the header ──── */
|
||||
/* clip-path, not height: compositor-only, so the reveal never counts
|
||||
toward CLS. */
|
||||
.mobile-menu {
|
||||
clip-path: inset(0 0 100% 0);
|
||||
transition:
|
||||
clip-path 0.4s cubic-bezier(0.61, 1, 0.88, 1),
|
||||
display 0.4s allow-discrete,
|
||||
overlay 0.4s allow-discrete;
|
||||
}
|
||||
|
||||
.mobile-menu:popover-open {
|
||||
clip-path: inset(0);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.mobile-menu:popover-open {
|
||||
clip-path: inset(0 0 100% 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Burger — three lines that morph into a flat X while the menu is
|
||||
open. Lines are 4px tall, 7px apart, so ±11px meets in the middle. ── */
|
||||
.burger span {
|
||||
transition:
|
||||
transform 0.4s cubic-bezier(0.61, 1, 0.88, 1),
|
||||
opacity 0.2s ease;
|
||||
}
|
||||
|
||||
header:has(#mobile-nav:popover-open) .burger span:nth-child(1) {
|
||||
transform: translateY(11px) rotate(25deg);
|
||||
}
|
||||
|
||||
header:has(#mobile-nav:popover-open) .burger span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
header:has(#mobile-nav:popover-open) .burger span:nth-child(3) {
|
||||
transform: translateY(-11px) rotate(-25deg);
|
||||
}
|
||||
|
||||
/* ── Drawer (popover) — slides in from the left; mobile filters ─── */
|
||||
.drawer {
|
||||
transform: translateX(-100%);
|
||||
transition:
|
||||
transform 0.3s cubic-bezier(0.2, 0.78, 0.12, 0.86),
|
||||
display 0.3s allow-discrete,
|
||||
overlay 0.3s allow-discrete;
|
||||
}
|
||||
|
||||
.drawer:popover-open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.drawer:popover-open {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.drawer::backdrop {
|
||||
background-color: rgb(0 0 0 / 0);
|
||||
transition:
|
||||
background-color 0.3s ease,
|
||||
display 0.3s allow-discrete,
|
||||
overlay 0.3s allow-discrete;
|
||||
}
|
||||
|
||||
.drawer:popover-open::backdrop {
|
||||
background-color: rgb(0 0 0 / 0.3);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.drawer:popover-open::backdrop {
|
||||
background-color: rgb(0 0 0 / 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Shared underline-slide animation ────────────────────────── */
|
||||
.underline-slide {
|
||||
background-image: linear-gradient(currentColor, currentColor);
|
||||
@@ -415,8 +493,9 @@ @layer components {
|
||||
@apply font-bold text-black;
|
||||
}
|
||||
|
||||
/* Wide tables scroll sideways on phones instead of pushing the page wider. */
|
||||
.legal-content table {
|
||||
@apply w-full border-collapse text-left text-sm;
|
||||
@apply w-full border-collapse text-left text-sm max-sm:block max-sm:overflow-x-auto;
|
||||
}
|
||||
|
||||
.legal-content th,
|
||||
|
||||
@@ -11,10 +11,19 @@ import { Controller } from '@hotwired/stimulus'
|
||||
// `change` covers native inputs (checkbox, select); the range slider emits its
|
||||
// own `range-slider:change` on commit. Uses requestSubmit() (not submit()) so a
|
||||
// <turbo-frame> around the form still captures the navigation and validation runs.
|
||||
//
|
||||
// Optional data-auto-submit-media-value="(min-width: 64rem)" limits auto-submit
|
||||
// to viewports matching that query — below it the form waits for its own submit
|
||||
// button (e.g. the mobile filters drawer's "Apply").
|
||||
export default class extends Controller {
|
||||
static values = { delay: { type: Number, default: 300 } }
|
||||
static values = {
|
||||
delay: { type: Number, default: 300 },
|
||||
media: String,
|
||||
}
|
||||
|
||||
submit() {
|
||||
if (this.mediaValue && !window.matchMedia(this.mediaValue).matches) return
|
||||
|
||||
clearTimeout(this.#timer)
|
||||
this.#timer = setTimeout(() => this.element.requestSubmit(), this.delayValue)
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
@section('content')
|
||||
{{-- <div class="max-w-5xl mx-auto pt-26 pb-12"> --}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-26 pb-12">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-12 pb-12 lg:pt-26">
|
||||
|
||||
<div class="flex items-end justify-between gap-6 flex-wrap mb-16">
|
||||
<h1 class="font-medium text-h2">{{ $collection['name'] }}</h1>
|
||||
<div class="flex items-end justify-between gap-x-6 gap-y-3 flex-wrap mb-10 lg:mb-16">
|
||||
<h1 class="font-medium text-h3 lg:text-h2">{{ $collection['name'] }}</h1>
|
||||
|
||||
<x-breadcrumb :items="[
|
||||
['label' => __('storefront.nav.home'), 'href' => route('home')],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div
|
||||
data-controller="back-to-top"
|
||||
class="back-to-top fixed right-8 bottom-6 w-[120px] z-[100]"
|
||||
class="back-to-top fixed right-4 bottom-4 w-18 z-[100] lg:right-8 lg:bottom-6 lg:w-[120px]"
|
||||
aria-label="Back to top"
|
||||
>
|
||||
<a
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<footer class="border-t border-black">
|
||||
<div class="max-w-7xl mx-auto px-10 py-20 flex flex-col items-center gap-16">
|
||||
<div class="max-w-7xl mx-auto px-4 py-12 flex flex-col items-center gap-10 sm:px-8 lg:px-10 lg:py-20 lg:gap-16">
|
||||
|
||||
{{-- Logo --}}
|
||||
<a href="/" class="shrink-0">
|
||||
<img src="/images/logo.png" alt="{{ config('app.name') }}" class="h-40 w-auto">
|
||||
<a href="{{ url('/'.app()->getLocale()) }}" class="shrink-0">
|
||||
<img src="/images/logo.png" alt="{{ config('app.name') }}" class="h-24 w-auto lg:h-40">
|
||||
</a>
|
||||
|
||||
<div class="flex flex-col items-center gap-16">
|
||||
<div class="flex flex-col items-center gap-10 lg:gap-16">
|
||||
{{-- Links --}}
|
||||
<nav aria-label="Footer navigation">
|
||||
<nav aria-label="{{ __('storefront.footer.nav_label') }}">
|
||||
<ul class="flex flex-wrap justify-center items-center gap-x-8 gap-y-3 font-semibold uppercase">
|
||||
<li><a href="{{ route('contact') }}" class="underline-slide [--slide-h:5px] font-extrabold italic">Επικοινωνία</a></li>
|
||||
<li><a href="{{ route('legal.shipping-returns') }}" class="underline-slide [--slide-h:5px] font-extrabold italic">Αποστολές & Επιστροφές</a></li>
|
||||
<li><a href="{{ route('contact') }}" class="underline-slide [--slide-h:5px] font-extrabold italic">{{ __('storefront.nav.contact') }}</a></li>
|
||||
<li><a href="{{ route('legal.shipping-returns') }}" class="underline-slide [--slide-h:5px] font-extrabold italic">{{ __('storefront.footer.shipping_returns') }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{-- Payment icons --}}
|
||||
<div class="flex flex-wrap justify-center items-center gap-5" aria-label="Αποδεκτοί τρόποι πληρωμής">
|
||||
<div class="flex flex-wrap justify-center items-center gap-5" aria-label="{{ __('storefront.footer.payment_methods') }}">
|
||||
<x-ui.payment-icon name="visa" :height="13" />
|
||||
<x-ui.payment-icon name="mastercard" :height="18" />
|
||||
<x-ui.payment-icon name="paypal" :height="18" />
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
{{-- Social media — URLs from Stoic (settings.md); empty ones are hidden. --}}
|
||||
@if ($stoicSettings->socialLinks())
|
||||
<nav aria-label="Social media">
|
||||
<nav aria-label="{{ __('storefront.footer.social') }}">
|
||||
<ul class="flex items-center gap-4">
|
||||
@foreach ($stoicSettings->socialLinks() as $social)
|
||||
<li>
|
||||
@@ -42,16 +42,18 @@
|
||||
@endif
|
||||
|
||||
{{-- Copyright --}}
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex flex-col items-center gap-2 text-center text-base lg:flex-row lg:text-lg">
|
||||
<p class="">
|
||||
© {{ date('Y') }} {{ config('app.name') }}. Με επιφύλαξη παντός δικαιώματος.
|
||||
© {{ date('Y') }} {{ config('app.name') }}. {{ __('storefront.footer.rights') }}
|
||||
</p>
|
||||
|
||||
<a href="{{ route('legal.terms') }}" class="underline-slide [--slide-h:1px] pb-0">Όροι & Προϋποθέσεις</a>
|
||||
<span>|</span>
|
||||
<a href="{{ route('legal.privacy') }}" class="underline-slide [--slide-h:1px] pb-0">Πολιτική Απορρήτου</a>
|
||||
<span>|</span>
|
||||
<a href="{{ route('legal.cookies') }}" class="underline-slide [--slide-h:1px] pb-0">Πολιτική Cookies</a>
|
||||
<div class="flex flex-wrap justify-center items-center gap-x-2 gap-y-1">
|
||||
<a href="{{ route('legal.terms') }}" class="underline-slide [--slide-h:1px] pb-0">{{ __('storefront.footer.terms') }}</a>
|
||||
<span aria-hidden="true">|</span>
|
||||
<a href="{{ route('legal.privacy') }}" class="underline-slide [--slide-h:1px] pb-0">{{ __('storefront.footer.privacy') }}</a>
|
||||
<span aria-hidden="true">|</span>
|
||||
<a href="{{ route('legal.cookies') }}" class="underline-slide [--slide-h:1px] pb-0">{{ __('storefront.footer.cookies') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<header class="sticky top-0 z-50 bg-neutral-200 border-b border-black lg:h-26">
|
||||
<div class="flex items-center gap-14 px-10">
|
||||
<header class="sticky top-0 z-50 h-20 bg-neutral-200 border-b border-black lg:h-26">
|
||||
<div class="flex items-center gap-4 px-4 max-lg:h-full sm:px-8 lg:gap-14 lg:px-10">
|
||||
|
||||
{{-- Logo --}}
|
||||
<a href="{{ url('/'.app()->getLocale()) }}" class="shrink-0 lg:py-4">
|
||||
<img src="/images/logo.png" alt="{{ config('app.name') }}" class="h-18 w-auto">
|
||||
<img src="/images/logo.png" alt="{{ config('app.name') }}" class="h-14 w-auto lg:h-18">
|
||||
</a>
|
||||
|
||||
{{-- Primary nav --}}
|
||||
<nav class="flex items-center gap-6 h-full">
|
||||
<nav class="hidden lg:flex items-center gap-6 h-full">
|
||||
|
||||
{{-- Products (CSS-only hover dropdown) --}}
|
||||
<div class="group relative h-full flex items-center">
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
</nav>
|
||||
|
||||
{{-- Right side actions --}}
|
||||
<div class="ml-auto flex items-center gap-8">
|
||||
{{-- Right side actions — language, wishlist and account move into the mobile menu below `lg` --}}
|
||||
<div class="ml-auto flex items-center gap-3 lg:gap-8">
|
||||
|
||||
{{-- Language switcher --}}
|
||||
@foreach ($altLocales ?? [] as $altLocale)
|
||||
<a href="{{ $altLocale['url'] }}" class="uppercase font-display font-extrabold text-sm hover:opacity-70 transition-opacity" hreflang="{{ $altLocale['code'] }}" aria-label="{{ $altLocale['name'] }}">
|
||||
<a href="{{ $altLocale['url'] }}" class="hidden lg:block uppercase font-display font-extrabold text-sm hover:opacity-70 transition-opacity" hreflang="{{ $altLocale['code'] }}" aria-label="{{ $altLocale['name'] }}">
|
||||
{{ $altLocale['code'] }}
|
||||
</a>
|
||||
@endforeach
|
||||
@@ -44,7 +44,7 @@
|
||||
{{-- Wishlist — the account page, or the cookie-based guest page --}}
|
||||
<a
|
||||
href="{{ auth()->check() ? route('account.wishlist') : route('wishlist') }}"
|
||||
class="flex items-center justify-center w-10 h-10 hover:opacity-70 transition-opacity"
|
||||
class="hidden lg:flex items-center justify-center w-10 h-10 hover:opacity-70 transition-opacity"
|
||||
aria-label="{{ __('storefront.account.nav_wishlist') }}"
|
||||
@if (request()->routeIs('account.wishlist', 'wishlist')) aria-current="page" @endif
|
||||
>
|
||||
@@ -54,7 +54,7 @@ class="flex items-center justify-center w-10 h-10 hover:opacity-70 transition-op
|
||||
{{-- Account — the account page, or login for guests --}}
|
||||
<a
|
||||
href="{{ auth()->check() ? route('account') : route('login') }}"
|
||||
class="flex items-center justify-center w-10 h-10 hover:opacity-70 transition-opacity"
|
||||
class="hidden lg:flex items-center justify-center w-10 h-10 hover:opacity-70 transition-opacity"
|
||||
aria-label="{{ auth()->check() ? __('storefront.nav.account') : __('storefront.auth.login') }}"
|
||||
>
|
||||
<x-ui.icon name="user" :size="40" />
|
||||
@@ -64,7 +64,7 @@ class="flex items-center justify-center w-10 h-10 hover:opacity-70 transition-op
|
||||
<button
|
||||
type="button"
|
||||
class="relative flex items-center justify-center w-10 h-10 hover:opacity-70 transition-opacity"
|
||||
aria-label="Cart"
|
||||
aria-label="{{ __('storefront.nav.cart') }}"
|
||||
aria-haspopup="dialog"
|
||||
data-controller="cart-count"
|
||||
data-action="cart-count#open"
|
||||
@@ -72,7 +72,7 @@ class="relative flex items-center justify-center w-10 h-10 hover:opacity-70 tran
|
||||
<x-ui.icon name="bag" :size="40" />
|
||||
<span
|
||||
data-cart-count-target="badge"
|
||||
class="absolute -top-1 -right-1 min-w-5 h-5 px-1 rounded-full bg-black text-neutral-200 text-xs font-bold flex items-center justify-center"
|
||||
class="absolute -top-1 -right-2 text-sm font-bold leading-none"
|
||||
hidden
|
||||
>0</span>
|
||||
</button>
|
||||
@@ -89,7 +89,99 @@ class="flex items-center justify-center w-10 h-10 hover:opacity-70 transition-op
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Burger — toggles the #mobile-nav menu below `lg`; its three lines
|
||||
morph into an X while the menu is open (.burger in app.css). --}}
|
||||
<button
|
||||
type="button"
|
||||
popovertarget="mobile-nav"
|
||||
class="burger flex h-10 w-10.5 shrink-0 flex-col items-center justify-center gap-1.75 lg:hidden"
|
||||
aria-label="{{ __('storefront.nav.menu') }}"
|
||||
aria-controls="mobile-nav"
|
||||
>
|
||||
<span class="block h-1 w-10.5 bg-black" aria-hidden="true"></span>
|
||||
<span class="block h-1 w-10.5 bg-black" aria-hidden="true"></span>
|
||||
<span class="block h-1 w-10.5 bg-black" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<x-search-overlay />
|
||||
|
||||
{{--
|
||||
Mobile menu — a [popover] (top layer, Escape and click-away close for
|
||||
free) that drops down from under the header, opened and closed by the
|
||||
burger above. The header is a fixed h-20 below `lg` so the menu can sit
|
||||
at top-20. The top-to-bottom wipe and the burger → X morph live in
|
||||
app.css (.mobile-menu, .burger). Display stays on the inner wrapper,
|
||||
never on the popover itself, so the UA's closed-state display:none holds.
|
||||
--}}
|
||||
<nav
|
||||
id="mobile-nav"
|
||||
popover
|
||||
aria-label="{{ __('storefront.nav.menu') }}"
|
||||
class="mobile-menu fixed inset-x-0 top-20 bottom-auto m-0 max-h-[calc(100dvh-5rem)] w-full max-w-none overflow-y-auto border-0 border-b border-black bg-neutral-200 p-0 text-black"
|
||||
>
|
||||
<div class="flex flex-col gap-8 px-4 py-6 sm:px-8">
|
||||
|
||||
<ul class="flex flex-col gap-5 font-display font-extrabold italic">
|
||||
<li class="flex flex-col gap-4">
|
||||
<a
|
||||
href="{{ route('products') }}"
|
||||
@class(['nav-link uppercase flex items-center justify-between gap-4', 'is-active' => request()->routeIs('products')])
|
||||
@if (request()->routeIs('products')) aria-current="page" @endif
|
||||
>
|
||||
<span>{{ __('storefront.nav.products') }}</span>
|
||||
<x-ui.icon name="arrow-right" :size="22" />
|
||||
</a>
|
||||
@if (count($categories ?? []))
|
||||
<ul class="flex flex-col gap-3 border-l border-black pl-4 font-sans font-normal not-italic">
|
||||
@foreach ($categories as $category)
|
||||
<li>
|
||||
<a href="{{ route('category.show', ['id' => $category['id']]) }}" class="underline-slide">{{ $category['name'] }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="{{ route('contact') }}"
|
||||
@class(['nav-link uppercase flex items-center justify-between gap-4', 'is-active' => request()->routeIs('contact')])
|
||||
@if (request()->routeIs('contact')) aria-current="page" @endif
|
||||
>
|
||||
<span>{{ __('storefront.nav.contact') }}</span>
|
||||
<x-ui.icon name="arrow-right" :size="22" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="flex flex-col gap-4 border-t border-black pt-6">
|
||||
<li>
|
||||
<a
|
||||
href="{{ auth()->check() ? route('account.wishlist') : route('wishlist') }}"
|
||||
class="inline-flex items-center gap-3 hover:opacity-70 transition-opacity"
|
||||
@if (request()->routeIs('account.wishlist', 'wishlist')) aria-current="page" @endif
|
||||
>
|
||||
<x-ui.icon name="heart" :size="28" />
|
||||
<span>{{ __('storefront.account.nav_wishlist') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="{{ auth()->check() ? route('account') : route('login') }}"
|
||||
class="inline-flex items-center gap-3 hover:opacity-70 transition-opacity"
|
||||
>
|
||||
<x-ui.icon name="user" :size="28" />
|
||||
<span>{{ auth()->check() ? __('storefront.nav.account') : __('storefront.auth.login') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@foreach ($altLocales ?? [] as $altLocale)
|
||||
<li>
|
||||
<a href="{{ $altLocale['url'] }}" hreflang="{{ $altLocale['code'] }}" lang="{{ $altLocale['code'] }}" class="underline-slide">{{ $altLocale['name'] }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<section {{ $attributes }}>
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2">
|
||||
<div class="flex flex-col justify-center gap-8 px-8 py-16 lg:px-16 items-center">
|
||||
<div class="flex flex-col justify-center gap-8 px-4 py-12 sm:px-8 lg:py-16 lg:px-16 items-center">
|
||||
<h2
|
||||
class="text-h1 leading-[1.3] max-w-xl text-center"
|
||||
class="text-h3 sm:text-h2 lg:text-h1 leading-[1.3] max-w-xl text-center"
|
||||
aria-label="Γράψου στο newsletter μας"
|
||||
data-controller="appear"
|
||||
data-appear-visible-class="is-visible"
|
||||
@@ -56,7 +56,7 @@ class="absolute right-0 bottom-2 cursor-pointer"
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
loading="lazy"
|
||||
class="mix-blend-darken max-w-md"
|
||||
class="mix-blend-darken w-full max-w-md"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@props([])
|
||||
|
||||
<section {{ $attributes }}>
|
||||
<div class="max-w-3xl bg-brand mx-auto px-16 py-16 flex flex-col items-center text-center gap-8 border-1">
|
||||
<p class="text-h3 leading-snug">Γράψου στο newsletter για <span class="font-extrabold italic">5% έκπτωση</span> στην πρώτη σου παραγγελία</p>
|
||||
<div class="max-w-3xl bg-brand mx-auto px-6 py-12 sm:px-16 sm:py-16 flex flex-col items-center text-center gap-8 border-1">
|
||||
<p class="text-h4 sm:text-h3 leading-snug">Γράψου στο newsletter για <span class="font-extrabold italic">5% έκπτωση</span> στην πρώτη σου παραγγελία</p>
|
||||
|
||||
<form method="POST" action="#" class="w-full flex flex-col gap-5">
|
||||
@csrf
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<h2 class="font-display font-extrabold text-h2 mb-10">{{ $title }}</h2>
|
||||
@endif
|
||||
|
||||
<div class="grid {{ $gridCols }} gap-9">
|
||||
<div class="grid {{ $gridCols }} gap-x-4 gap-y-8 sm:gap-9">
|
||||
@foreach($products as $product)
|
||||
<x-ui.product-card
|
||||
:name="$product['name']"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<x-reviews-stars :rating="$review['rating']" :size="23" />
|
||||
|
||||
<div class="flex items-end gap-4">
|
||||
<div class="flex flex-wrap items-end gap-x-4 gap-y-1">
|
||||
<span class="text-2xl font-bold leading-none">
|
||||
{{ $review['name'] ?? 'Ανώνυμος' }}
|
||||
</span>
|
||||
|
||||
@@ -26,7 +26,7 @@ class="fixed w-full inset-x-0 top-0 bottom-auto m-0 border-0 bg-transparent p-0"
|
||||
method="get"
|
||||
action="{{ route('search') }}"
|
||||
data-nav-search-target="form"
|
||||
class="flex h-[var(--search-overlay-h)] items-center gap-6 bg-brand px-10"
|
||||
class="flex h-[var(--search-overlay-h)] items-center gap-4 bg-brand px-4 sm:px-8 lg:gap-6 lg:px-10"
|
||||
>
|
||||
<label id="search-overlay-label" for="search-overlay-input" class="sr-only">{{ __('storefront.shop.search_label') }}</label>
|
||||
<input
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
])
|
||||
|
||||
@php
|
||||
$fillIcons = ['facebook', 'instagram', 'tiktok', 'search', 'bag', 'user', 'heart', 'heart-fill'];
|
||||
$fillIcons = ['facebook', 'instagram', 'tiktok', 'search', 'bag', 'user', 'heart', 'heart-fill', 'filter'];
|
||||
$svgStroke = $stroke ?? (in_array($name, $fillIcons) ? 'none' : $color);
|
||||
@endphp
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
'heart-fill' => '<path stroke-width=2 d="M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853Z"/>',
|
||||
|
||||
'filter' => '<path d="M2 3H22V7.5L15 14.5V21L9 23V14.5L2 7.5V3Z"/>',
|
||||
|
||||
'close' => '<path fill="none" stroke-width="1.5" stroke-linecap="round" d="M6 6L18 18M18 6L6 18"/>',
|
||||
|
||||
'arrow-left' => '<path fill="none" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M19 12H5M5 12L11 6M5 12L11 18"/>',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@if($paginator->hasPages())
|
||||
<nav aria-label="{{ __('storefront.pagination.nav_label') }}" {{ $attributes->merge(['class' => 'flex items-center gap-6 font-display font-bold']) }}>
|
||||
<ol class="flex items-center gap-6">
|
||||
<ol class="flex flex-wrap items-center gap-x-6 gap-y-3">
|
||||
@foreach($paginator->getUrlRange(1, $paginator->lastPage()) as $page => $url)
|
||||
<li>
|
||||
@if($page === $paginator->currentPage())
|
||||
|
||||
@@ -47,7 +47,7 @@ class="w-full h-auto block"
|
||||
size="md"
|
||||
position="absolute"
|
||||
data-turbo-frame="_top"
|
||||
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>
|
||||
@@ -58,7 +58,7 @@ class="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-op
|
||||
still see why nothing happened. --}}
|
||||
<x-checkout::add-to-cart
|
||||
:purchasable="$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') }}
|
||||
@@ -67,10 +67,10 @@ 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">
|
||||
<a href="{{ $href }}" data-turbo-frame="_top" class="font-bold text-xl leading-snug hover:text-brand">{{ $name }}</a>
|
||||
<div class="flex flex-col gap-1 sm:flex-row sm:items-baseline sm:justify-between sm:gap-4">
|
||||
<a href="{{ $href }}" data-turbo-frame="_top" class="font-bold text-base leading-snug hover:text-brand sm:text-xl">{{ $name }}</a>
|
||||
@if($price !== null)
|
||||
<span class="font-bold text-xl shrink-0"><x-ui.price :amount="$price" /></span>
|
||||
<span class="font-bold text-base shrink-0 sm:text-xl"><x-ui.price :amount="$price" /></span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
@props(['tabs' => [], 'size' => 'md', 'active' => null])
|
||||
@php
|
||||
$sizeClasses = match($size) {
|
||||
'lg' => 'text-[36px] font-extrabold [--slide-h:5px]',
|
||||
'lg' => 'text-2xl sm:text-[36px] font-extrabold [--slide-h:5px]',
|
||||
default => 'text-xl font-bold [--slide-h:3px]',
|
||||
};
|
||||
$activeId = $active ?? ($tabs[0]['id'] ?? null);
|
||||
@@ -21,7 +21,7 @@
|
||||
--}}
|
||||
|
||||
<div data-controller="tabs" {{ $attributes }}>
|
||||
<div class="flex gap-10 mb-8" role="tablist">
|
||||
<div class="flex flex-wrap gap-x-10 gap-y-4 mb-8" role="tablist">
|
||||
@foreach($tabs as $tab)
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
<section class="grid grid-cols-1 lg:grid-cols-2 lg:divide-x lg:divide-black lg:min-h-[calc(100vh-102px)]">
|
||||
|
||||
<div class="flex flex-col justify-center gap-10 px-8 py-16 lg:px-16">
|
||||
<div class="flex flex-col justify-center gap-10 px-4 py-12 sm:px-8 lg:py-16 lg:px-16">
|
||||
|
||||
<svg viewBox="0 0 135 124" class="rotating-star text-brand w-24 h-24 lg:w-40 lg:h-40" 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 text-h1 font-semibold leading-tight"
|
||||
<h1 class="font-display text-h3 sm:text-h2 lg:text-h1 font-semibold leading-tight"
|
||||
data-controller="appear"
|
||||
data-appear-visible-class="is-visible">
|
||||
<span class="text-dance" data-stoic="pages/contact#heading_first">{{ $page->heading_first }}</span><br>
|
||||
@@ -75,7 +75,7 @@ class="h-captcha min-h-[78px]"
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col justify-center border-t border-black px-8 py-16 lg:border-t-0 lg:px-16">
|
||||
<div class="flex flex-col justify-center border-t border-black px-4 py-12 sm:px-8 lg:border-t-0 lg:py-16 lg:px-16">
|
||||
<x-contact-details :store="$store" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="flex flex-col items-center justify-center gap-8 px-8 py-24 text-center min-h-[calc(100vh-12rem)] sm:min-h-[calc(100vh-8rem)]">
|
||||
<section class="flex flex-col items-center justify-center gap-8 px-4 py-16 text-center sm:px-8 lg:py-24 min-h-[calc(100vh-12rem)] sm:min-h-[calc(100vh-8rem)]">
|
||||
|
||||
<h1 class="font-display text-h1 font-semibold leading-tight">@yield('error_title')</h1>
|
||||
<h1 class="font-display text-h3 sm:text-h2 lg:text-h1 font-semibold leading-tight">@yield('error_title')</h1>
|
||||
|
||||
<p class="max-w-xl">@yield('error_text')</p>
|
||||
|
||||
|
||||
@@ -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']"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@section('content')
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 py-12">
|
||||
|
||||
<x-breadcrumb class="mb-14 justify-end" :items="[
|
||||
<x-breadcrumb class="mb-8 justify-end lg:mb-14" :items="[
|
||||
$collection
|
||||
? ['label' => $collection['name'], 'href' => route('category.show', ['id' => $collection['id']])]
|
||||
: ['label' => __('storefront.nav.products'), 'href' => route('products')],
|
||||
@@ -24,27 +24,28 @@ class="grid grid-cols-1 md:grid-cols-2 gap-12"
|
||||
|
||||
{{-- Image --}}
|
||||
{{-- relative: anchors the wishlist heart to the top right, which is
|
||||
the main image's corner (thumbnails sit on the left). --}}
|
||||
the main image's corner (thumbnails sit on the left at `lg`,
|
||||
in a horizontally scrolling row under the image below it). --}}
|
||||
<div
|
||||
data-controller="product-gallery"
|
||||
class="relative flex gap-4 items-start"
|
||||
class="relative flex flex-col-reverse gap-4 lg:flex-row lg:items-start"
|
||||
>
|
||||
<x-wishlist-button :product-id="$product['id']" class="absolute top-4 right-4 z-10" />
|
||||
|
||||
@if(!empty($product['media']))
|
||||
{{-- Thumbnails --}}
|
||||
<div class="flex flex-col items-center gap-1 w-[116px] shrink-0 -mt-12.5">
|
||||
<div class="flex flex-col items-center gap-1 w-full shrink-0 lg:w-[116px] lg:-mt-12.5">
|
||||
<button
|
||||
type="button"
|
||||
data-action="click->product-gallery#scrollUp"
|
||||
data-product-gallery-target="arrow"
|
||||
class="gallery-arrow invisible w-full flex items-center justify-center py-2"
|
||||
class="gallery-arrow invisible max-lg:hidden w-full flex items-center justify-center py-2"
|
||||
aria-label="Scroll thumbnails up"
|
||||
><x-ui.icon name="arrow-up" :size="30" /></button>
|
||||
|
||||
<div
|
||||
data-product-gallery-target="track"
|
||||
class="flex flex-col gap-4 overflow-hidden"
|
||||
class="flex w-full gap-4 overflow-x-auto lg:flex-col lg:overflow-hidden"
|
||||
style="max-height: var(--gallery-height, 600px)"
|
||||
>
|
||||
@foreach($product['media'] as $i => $media)
|
||||
@@ -54,7 +55,7 @@ class="flex flex-col gap-4 overflow-hidden"
|
||||
data-product-gallery-target="thumb"
|
||||
data-src="{{ $media['url'] }}"
|
||||
data-alt="{{ $product['name'] }}"
|
||||
class="block w-full shrink-0 border border-black overflow-hidden "
|
||||
class="block w-20 shrink-0 border border-black overflow-hidden lg:w-full"
|
||||
aria-label="View image {{ $i + 1 }}"
|
||||
aria-pressed="{{ $i === 0 ? 'true' : 'false' }}"
|
||||
>
|
||||
@@ -69,7 +70,7 @@ class="block w-full shrink-0 border border-black overflow-hidden "
|
||||
type="button"
|
||||
data-action="click->product-gallery#scrollDown"
|
||||
data-product-gallery-target="arrow"
|
||||
class="gallery-arrow invisible w-full flex items-center justify-center py-2"
|
||||
class="gallery-arrow invisible max-lg:hidden w-full flex items-center justify-center py-2"
|
||||
aria-label="Scroll thumbnails down"
|
||||
><x-ui.icon name="arrow-down" :size="30" /></button>
|
||||
</div>
|
||||
@@ -77,7 +78,7 @@ class="gallery-arrow invisible w-full flex items-center justify-center py-2"
|
||||
{{-- Main image --}}
|
||||
<button
|
||||
type="button"
|
||||
class="flex-1 border border-black bg-white cursor-zoom-in block p-0"
|
||||
class="w-full border border-black bg-white cursor-zoom-in block p-0 lg:w-auto lg:flex-1"
|
||||
data-action="click->product-gallery#openLightbox"
|
||||
aria-label="View full size image"
|
||||
>
|
||||
@@ -105,9 +106,9 @@ class="product-lightbox"
|
||||
<button
|
||||
type="button"
|
||||
data-action="click->product-gallery#prevImage click->product-gallery#noop"
|
||||
class="lightbox-arrow absolute left-8 top-1/2 -translate-y-1/2"
|
||||
class="lightbox-arrow absolute left-4 bottom-4 lg:left-8 lg:bottom-auto lg:top-1/2 lg:-translate-y-1/2"
|
||||
aria-label="Previous image"
|
||||
><x-ui.icon name="arrow-left" :size="72" color="white" /></button>
|
||||
><x-ui.icon name="arrow-left" :size="72" color="white" class="max-lg:size-12!" /></button>
|
||||
|
||||
{{-- Image + close button as a unit --}}
|
||||
<div class="relative" data-action="click->product-gallery#noop">
|
||||
@@ -115,13 +116,13 @@ class="lightbox-arrow absolute left-8 top-1/2 -translate-y-1/2"
|
||||
data-product-gallery-target="lightboxImage"
|
||||
src=""
|
||||
alt=""
|
||||
class="max-h-[90vh] max-w-[80vw] object-contain block"
|
||||
class="max-h-[75vh] max-w-[calc(100vw-2rem)] object-contain block lg:max-h-[90vh] lg:max-w-[80vw]"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
popovertarget="product-lightbox"
|
||||
popovertargetaction="hide"
|
||||
class="lightbox-close absolute -top-10 -right-10"
|
||||
class="lightbox-close absolute -top-12 right-0 lg:-top-10 lg:-right-10"
|
||||
aria-label="Close gallery"
|
||||
><x-ui.icon name="close" :size="36" color="white" /></button>
|
||||
</div>
|
||||
@@ -130,14 +131,14 @@ class="lightbox-close absolute -top-10 -right-10"
|
||||
<button
|
||||
type="button"
|
||||
data-action="click->product-gallery#nextImage click->product-gallery#noop"
|
||||
class="lightbox-arrow absolute right-8 top-1/2 -translate-y-1/2"
|
||||
class="lightbox-arrow absolute right-4 bottom-4 lg:right-8 lg:bottom-auto lg:top-1/2 lg:-translate-y-1/2"
|
||||
aria-label="Next image"
|
||||
><x-ui.icon name="arrow-right" :size="72" color="white" /></button>
|
||||
><x-ui.icon name="arrow-right" :size="72" color="white" class="max-lg:size-12!" /></button>
|
||||
|
||||
{{-- Counter --}}
|
||||
<p
|
||||
data-product-gallery-target="lightboxCounter"
|
||||
class="absolute bottom-6 right-8 text-white text-sm"
|
||||
class="absolute bottom-8 left-1/2 -translate-x-1/2 text-white text-sm lg:left-auto lg:right-8 lg:bottom-6 lg:translate-x-0"
|
||||
aria-live="polite"
|
||||
></p>
|
||||
</div>
|
||||
@@ -212,9 +213,9 @@ class="flex flex-col gap-6"
|
||||
<x-product-custom-fields :fields="$product['custom_fields']" />
|
||||
@endif
|
||||
|
||||
<div class="flex items-stretch gap-10">
|
||||
<div class="flex items-stretch gap-4 sm:gap-10">
|
||||
<x-ui.quantity name="quantity" />
|
||||
<x-ui.button type="submit" class="flex-1" data-product-form-target="submit" :disabled="! ($initialVariant['inStock'] ?? true)">{{ __('storefront.product.add_to_cart') }}</x-ui.button>
|
||||
<x-ui.button type="submit" class="flex-1 max-sm:px-6" data-product-form-target="submit" :disabled="! ($initialVariant['inStock'] ?? true)">{{ __('storefront.product.add_to_cart') }}</x-ui.button>
|
||||
</div>
|
||||
</x-checkout::add-to-cart>
|
||||
|
||||
@@ -228,7 +229,7 @@ class="flex flex-col gap-6"
|
||||
|
||||
</div>
|
||||
|
||||
<x-ui.tabs id="product-tabs" class="mt-16 scroll-mt-28" size="lg" :active="request('tab')" :tabs="[
|
||||
<x-ui.tabs id="product-tabs" class="mt-12 scroll-mt-28 lg:mt-16" size="lg" :active="request('tab')" :tabs="[
|
||||
['id' => 'description', 'label' => __('storefront.product.description')],
|
||||
['id' => 'reviews', 'label' => __('storefront.product.reviews') . ' (' . $product['reviews']['count'] . ')'],
|
||||
]">
|
||||
@@ -271,7 +272,7 @@ class="flex flex-col gap-6"
|
||||
|
||||
@if(!empty($product['recommendations']))
|
||||
<x-product-grid
|
||||
class="mt-20"
|
||||
class="mt-16 lg:mt-20"
|
||||
:title="__('storefront.product.related')"
|
||||
:products="collect($product['recommendations'])->map(fn (array $recommendation) => [
|
||||
'name' => $recommendation['name'],
|
||||
@@ -286,6 +287,6 @@ class="mt-20"
|
||||
|
||||
</div>
|
||||
|
||||
<x-newsletter class="py-20" />
|
||||
<x-newsletter class="py-12 lg:py-20" />
|
||||
|
||||
@endsection
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
@section('content')
|
||||
{{-- <div class="max-w-5xl mx-auto pt-26 pb-12"> --}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-26 pb-12">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-12 pb-12 lg:pt-26">
|
||||
|
||||
<div class="flex items-end justify-between gap-6 flex-wrap mb-16">
|
||||
<h1 class="font-medium text-h2">{{ __('storefront.shop.all_products') }}</h1>
|
||||
<div class="flex items-end justify-between gap-x-6 gap-y-3 flex-wrap mb-10 lg:mb-16">
|
||||
<h1 class="font-medium text-h3 lg:text-h2">{{ __('storefront.shop.all_products') }}</h1>
|
||||
|
||||
<x-breadcrumb :items="[
|
||||
['label' => __('storefront.nav.home'), 'href' => route('home')],
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
@section('content')
|
||||
{{-- <div class="max-w-5xl mx-auto pt-26 pb-12"> --}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-26 pb-12">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-8 pt-12 pb-12 lg:pt-26">
|
||||
|
||||
<div class="flex items-end justify-between gap-6 flex-wrap mb-16">
|
||||
<h1 class="font-medium text-h2">{{ $heading }}</h1>
|
||||
<div class="flex items-end justify-between gap-x-6 gap-y-3 flex-wrap mb-10 lg:mb-16">
|
||||
<h1 class="font-medium text-h3 lg:text-h2">{{ $heading }}</h1>
|
||||
|
||||
<x-breadcrumb :items="[
|
||||
['label' => __('storefront.nav.home'), 'href' => route('home')],
|
||||
|
||||
@@ -12,11 +12,25 @@
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-[1fr_230px] gap-14">
|
||||
|
||||
<div class="flex items-center justify-between gap-6 flex-wrap mb-7">
|
||||
<div class="flex items-center justify-between gap-x-6 gap-y-4 flex-wrap mb-7">
|
||||
<x-shop.result-count :paginator="$products" />
|
||||
<x-shop.sort :options="$sortOptions" id="shop-sort" />
|
||||
|
||||
<div class="flex items-center gap-6">
|
||||
{{-- Opens the filters drawer below `lg`; at `lg` the sidebar is always shown. --}}
|
||||
<button
|
||||
type="button"
|
||||
popovertarget="shop-filters"
|
||||
aria-controls="shop-filters"
|
||||
class="inline-flex items-center gap-2 font-display font-bold uppercase italic lg:hidden"
|
||||
>
|
||||
<x-ui.icon name="filter" :size="20" />
|
||||
<span class="underline-slide [--slide-h:1px]">{{ __('storefront.shop.filters') }}</span>
|
||||
</button>
|
||||
|
||||
<x-shop.sort :options="$sortOptions" id="shop-sort" />
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="hidden lg:block"></div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-[1fr_230px] gap-14">
|
||||
@@ -35,62 +49,86 @@
|
||||
</div>
|
||||
|
||||
{{-- Sidebar — sort, price and in-stock are wired to the back-end; product
|
||||
search lives in the nav overlay, not here. --}}
|
||||
<aside class="flex flex-col gap-10">
|
||||
search lives in the nav overlay, not here.
|
||||
|
||||
{{-- Filter form: a plain GET form whose fields ARE the state. Changing
|
||||
any control auto-submits (auto-submit controller); Turbo captures
|
||||
the GET, navigates the frame, and advances the URL. `sort` rides
|
||||
along as a hidden field so it survives a filter change; `page` is
|
||||
deliberately absent, so filtering drops back to page 1. Without JS
|
||||
the sr-only submit button applies the range inputs. --}}
|
||||
<form
|
||||
method="get"
|
||||
action="{{ $listingAction }}"
|
||||
data-controller="auto-submit"
|
||||
data-action="change->auto-submit#submit range-slider:change->auto-submit#submit"
|
||||
class="contents"
|
||||
>
|
||||
@if ($listing->sort)
|
||||
<input type="hidden" name="sort" value="{{ $listing->sort->value }}" />
|
||||
@endif
|
||||
Below `lg` it's a [popover] drawer (.drawer slide-in from the left),
|
||||
opened by the Filters button above; the lg: utilities undo the
|
||||
popover's fixed positioning so at `lg` it's a plain, always-visible
|
||||
sidebar. Changes only auto-submit at `lg` — in the drawer they wait for
|
||||
Apply, and the frame reload that follows closes the drawer. --}}
|
||||
<aside
|
||||
id="shop-filters"
|
||||
popover
|
||||
aria-label="{{ __('storefront.shop.filters') }}"
|
||||
class="drawer fixed inset-y-0 left-0 right-auto m-0 h-dvh max-h-dvh w-full max-w-sm overflow-y-auto border-0 border-r border-black bg-neutral-200 p-0 text-black lg:static lg:block lg:h-auto lg:max-h-none lg:w-auto lg:max-w-none lg:overflow-visible lg:border-r-0 lg:bg-transparent lg:transform-none"
|
||||
>
|
||||
<div class="flex flex-col gap-10 px-4 py-6 sm:px-8 lg:p-0">
|
||||
|
||||
@if ($priceFloor !== null && $priceCeil !== null && $priceCeil > $priceFloor)
|
||||
<div class="flex flex-col gap-4 -mt-2">
|
||||
<p class="font-extrabold text-h4">{{ __('storefront.shop.filter_price') }}</p>
|
||||
<button
|
||||
type="button"
|
||||
popovertarget="shop-filters"
|
||||
popovertargetaction="hide"
|
||||
class="flex items-center justify-center w-10 h-10 -ml-2 hover:opacity-70 transition-opacity lg:hidden"
|
||||
aria-label="{{ __('storefront.nav.close') }}"
|
||||
>
|
||||
<x-ui.icon name="close" :size="32" />
|
||||
</button>
|
||||
|
||||
<x-ui.range-slider
|
||||
name="price"
|
||||
:min="$priceFloor"
|
||||
:max="$priceCeil"
|
||||
:min-value="max($priceFloor, $listing->minPrice ?? $priceFloor)"
|
||||
:max-value="min($priceCeil, $listing->maxPrice ?? $priceCeil)"
|
||||
prefix="€"
|
||||
separator=" - "
|
||||
:legend="__('storefront.shop.filter_price')"
|
||||
:min-label="__('storefront.shop.price_min')"
|
||||
:max-label="__('storefront.shop.price_max')"
|
||||
>
|
||||
@if ($clearPriceUrl)
|
||||
<a
|
||||
href="{{ $clearPriceUrl }}"
|
||||
class="underline-slide [--slide-h:1px] font-display text-sm font-bold uppercase italic"
|
||||
>{{ __('storefront.shop.reset') }}</a>
|
||||
@endif
|
||||
</x-ui.range-slider>
|
||||
{{-- Filter form: a plain GET form whose fields ARE the state. Changing
|
||||
any control auto-submits (auto-submit controller); Turbo captures
|
||||
the GET, navigates the frame, and advances the URL. `sort` rides
|
||||
along as a hidden field so it survives a filter change; `page` is
|
||||
deliberately absent, so filtering drops back to page 1. Without JS
|
||||
(or in the drawer) the submit button applies the range inputs. --}}
|
||||
<form
|
||||
method="get"
|
||||
action="{{ $listingAction }}"
|
||||
data-controller="auto-submit"
|
||||
data-auto-submit-media-value="(min-width: 64rem)"
|
||||
data-action="change->auto-submit#submit range-slider:change->auto-submit#submit"
|
||||
class="contents"
|
||||
>
|
||||
@if ($listing->sort)
|
||||
<input type="hidden" name="sort" value="{{ $listing->sort->value }}" />
|
||||
@endif
|
||||
|
||||
@if ($priceFloor !== null && $priceCeil !== null && $priceCeil > $priceFloor)
|
||||
<div class="flex flex-col gap-4 -mt-2">
|
||||
<p class="font-extrabold text-h4">{{ __('storefront.shop.filter_price') }}</p>
|
||||
|
||||
<x-ui.range-slider
|
||||
name="price"
|
||||
:min="$priceFloor"
|
||||
:max="$priceCeil"
|
||||
:min-value="max($priceFloor, $listing->minPrice ?? $priceFloor)"
|
||||
:max-value="min($priceCeil, $listing->maxPrice ?? $priceCeil)"
|
||||
prefix="€"
|
||||
separator=" - "
|
||||
:legend="__('storefront.shop.filter_price')"
|
||||
:min-label="__('storefront.shop.price_min')"
|
||||
:max-label="__('storefront.shop.price_max')"
|
||||
>
|
||||
@if ($clearPriceUrl)
|
||||
<a
|
||||
href="{{ $clearPriceUrl }}"
|
||||
class="underline-slide [--slide-h:1px] font-display text-sm font-bold uppercase italic"
|
||||
>{{ __('storefront.shop.reset') }}</a>
|
||||
@endif
|
||||
</x-ui.range-slider>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col gap-4 [&_label]:text-base">
|
||||
<p class="font-extrabold text-h4">{{ __('storefront.shop.availability') }}</p>
|
||||
<x-ui.checkbox id="shop-in-stock" name="in_stock" :checked="$listing->inStockOnly">
|
||||
{{ __('storefront.shop.in_stock_only') }}
|
||||
</x-ui.checkbox>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col gap-4 [&_label]:text-base">
|
||||
<p class="font-extrabold text-h4">{{ __('storefront.shop.availability') }}</p>
|
||||
<x-ui.checkbox id="shop-in-stock" name="in_stock" :checked="$listing->inStockOnly">
|
||||
{{ __('storefront.shop.in_stock_only') }}
|
||||
</x-ui.checkbox>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="sr-only">{{ __('storefront.shop.apply') }}</button>
|
||||
</form>
|
||||
<x-ui.button type="submit" size="md" class="self-start lg:sr-only">{{ __('storefront.shop.apply') }}</x-ui.button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
@@ -9,7 +9,7 @@
|
||||
<x-ui.button :href="route('products')" size="md">{{ __('storefront.orders.shop_now') }}</x-ui.button>
|
||||
</div>
|
||||
@else
|
||||
<ul class="grid grid-cols-2 gap-9 md:grid-cols-3 2xl:grid-cols-4">
|
||||
<ul class="grid grid-cols-2 gap-x-4 gap-y-8 sm:gap-9 md:grid-cols-3 2xl:grid-cols-4">
|
||||
@foreach ($products as $product)
|
||||
<li class="flex flex-col gap-4">
|
||||
<x-ui.product-card
|
||||
|
||||
Reference in new issue
Block a user