responsive design
This commit is contained in:
1 parent
9217960de0
commit
0ae5f49bcf
23 files changed
+380
-157
No files matched your search
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user