generated from boboko/starter
Compare commits
26
Commits
master
..
8a07c772f8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a07c772f8 | ||
|
|
b070a7d1e6 | ||
|
|
74e554884f | ||
|
|
4387459aed | ||
|
|
adb847f442 | ||
|
|
c7cd1138fe | ||
|
|
defe1dab12 | ||
|
|
86c645fb36 | ||
|
|
0dcaf112be | ||
|
|
b3405c1b60 | ||
|
|
65205e2760 | ||
|
|
36ff25657d | ||
|
|
4923bf82c3 | ||
|
|
325d71bac5 | ||
|
|
525c920f83 | ||
|
|
90e32e337d | ||
|
|
50c9670f2a | ||
|
|
092fab8740 | ||
|
|
fab9cc08a8 | ||
|
|
45057f9083 | ||
|
|
7677d10821 | ||
|
|
e46276a31b | ||
|
|
bf8b9219fc | ||
|
|
b88fde739c | ||
|
|
ace8290c62 | ||
|
|
dbc8866056 |
+1
-1
@@ -8,7 +8,7 @@ APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_LOCALE=el
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
# Front-end Guidelines
|
||||
|
||||
This is a Laravel 12 e-commerce project using Lunar PHP (headless). These guidelines apply to all front-end work.
|
||||
|
||||
---
|
||||
|
||||
## Project Language Settings
|
||||
|
||||
<!-- CHANGE THESE PER PROJECT -->
|
||||
- **Greek register:** `singular` — use the informal second person (εσύ/σου/σε). e.g. "Η κριτική σου", "Το όνομά σου", "Το email σου"
|
||||
<!-- singular = informal (εσύ) | plural = formal (εσείς) -->
|
||||
|
||||
All UI text written for this project must follow the register above.
|
||||
|
||||
---
|
||||
|
||||
## Localization
|
||||
|
||||
Uses classic Laravel localization (https://laravel.com/docs/13.x/localization) — no third-party i18n routing package.
|
||||
|
||||
**Locales:** Greek (`el`) is primary/default, English (`en`) is secondary. Set in `config('app.available_locales')` (`config/app.php`).
|
||||
|
||||
**URL structure:** every route is prefixed with `{locale}`, including the default — `3dealer.gr/el/...` and `3dealer.gr/en/...`. Bare root (`/`) 301-redirects to `/el` (see `routes/web.php`). This avoids the ambiguity of an unprefixed default locale (see the reasoning in project memory / past conversation — prefixing every locale keeps hreflang symmetrical and scales cleanly to a third language later).
|
||||
|
||||
**URL slugs are the same across both locales, permanently** — e.g. `/el/products/{x}` and `/en/products/{x}`, not `/el/proionta/{x}` vs `/en/products/{x}`. This is a deliberate, standing decision for this project, not a placeholder to revisit later. Only the visible content is translated, not the slug. Do not introduce per-locale translated slugs (e.g. a `lang/{locale}/routes.php` segment map) unless the user explicitly asks for that to change.
|
||||
|
||||
**How it's wired:**
|
||||
- All routes live inside `Route::prefix('{locale}')->where('locale', ...)->middleware('setlocale')` in `routes/web.php`.
|
||||
- `App\Http\Middleware\SetLocale` validates the `{locale}` segment (404s if not in `available_locales`), calls `App::setLocale()`, and shares `$currentLocale`, `$altLocale`, and `$altLocaleUrl` (the same page in the other locale) to every view — this is what powers both the header's language switcher and the `<head>` hreflang tags in `resources/views/layouts/app.blade.php`. Don't recompute this logic elsewhere; read those shared variables instead.
|
||||
- When adding a new route, put it inside that `{locale}` group and give it a route `name()` — the alt-locale URL generation in the middleware depends on the current route being named (falls back to the locale root if unnamed).
|
||||
- When linking to a page in Blade, prefer `route('name', [...])` (locale is a normal route param, defaults to `app()->getLocale()` implicitly via the shared route group) over hand-built path strings, except for pages that don't have a controller/route yet (e.g. `/products`, `/contact`, `/cart` placeholders in the header currently use `url('/'.app()->getLocale().'/products')` — replace with `route()` once those pages exist).
|
||||
- **Every controller action for a route inside the `{locale}` group must declare `$locale` as its first parameter, even if unused** — e.g. `show(string $locale, Product $product)`. Laravel's `ControllerDispatcher` ultimately calls the controller with `...array_values($parameters)`, i.e. **positionally**. If a route-bound model parameter (like `$product`) isn't preceded by a matching `$locale` parameter in the method signature, the resolved values shift out of position and the wrong value (the locale string) gets passed where the model was expected — a `TypeError` that's easy to misread as a binding failure. Closures with zero declared parameters are unaffected (PHP just ignores the extra positional arg), so this only bites real controller methods.
|
||||
|
||||
**Where translatable strings go:**
|
||||
- Most UI copy is editable by the client/marketing team via **Stoic** (the headless CMS) — don't hardcode it here.
|
||||
- Small strings that don't need client editing (nav labels, aria-labels, tab labels, pluralized counts) go in Laravel's own lang files at **`lang/{locale}/*.php`** (project root, per Laravel 12+ convention — not `resources/lang`). Current file: `lang/el/general.php` / `lang/en/general.php`. Use `__('general.key')` or `trans_choice('general.key', $count, [...])` for pluralized strings.
|
||||
|
||||
---
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Laravel 12** + **Lunar PHP 1.3** (headless e-commerce)
|
||||
- **Blade** for templating (`@extends`, `@section`, `@yield`, components)
|
||||
- **Tailwind CSS v4** via `@tailwindcss/vite` — zero config, `@import 'tailwindcss'` only
|
||||
- **Stimulus JS** for interactivity — controllers registered in `resources/js/stimulus/index.js`
|
||||
- **Popover API** (native browser) for overlays — no JS overlay libraries
|
||||
- SQLite database, `npm run dev` for local asset compilation
|
||||
|
||||
---
|
||||
|
||||
## Key File Locations
|
||||
|
||||
| What | Where |
|
||||
|---|---|
|
||||
| CSS entry point | `resources/css/app.css` |
|
||||
| Font definitions | `resources/css/fonts.css` |
|
||||
| JS entry point | `resources/js/app.js` |
|
||||
| Stimulus controllers | `resources/js/stimulus/` |
|
||||
| JS utilities | `resources/js/utils/` |
|
||||
| Layout | `resources/views/layouts/app.blade.php` |
|
||||
| UI components (atomic) | `resources/views/components/ui/` |
|
||||
| Section components | `resources/views/components/` |
|
||||
| Page views | `resources/views/{page}/` |
|
||||
| Public assets | `public/images/` |
|
||||
|
||||
---
|
||||
|
||||
## Design Reference
|
||||
|
||||
The Bluebeard template (`resources/css/bluebeard.css`) is used as a **reference only** for colors, spacing, typography, and effects. It is never imported or used directly. Everything is translated to Tailwind utilities or custom CSS where unavoidable.
|
||||
|
||||
The boboko project at `/Users/farenoubi/Projects/boboko-test` can be referenced for CSS architecture patterns.
|
||||
|
||||
---
|
||||
|
||||
## Tailwind vs. Custom CSS
|
||||
|
||||
**Prefer Tailwind utilities by default.** Write custom CSS only when something genuinely cannot be expressed as a utility:
|
||||
|
||||
- Pseudo-elements (`::before`, `::after`) with dynamic transforms or transitions
|
||||
- Complex descendant/sibling selectors (e.g. `.group:hover .nav-dropdown`)
|
||||
- Keyframe animations
|
||||
- The underline-slide animation on nav links (background-size trick)
|
||||
|
||||
**Never** write inline CSS (`style="..."`). **Never** write custom CSS for something Tailwind already covers.
|
||||
|
||||
When a component requires a CSS class (e.g. as a hook for a pseudo-element), still put all properties that can be Tailwind utilities as classes on the element in the component file. The CSS rule should contain only what genuinely cannot be a utility — pseudo-elements, complex selectors, keyframes. Do not default to putting all styles in the CSS class just because the class exists.
|
||||
|
||||
When custom CSS is needed, add it to `resources/css/app.css` inside `@layer components`. Keep the rule minimal — only what can't be a utility.
|
||||
|
||||
---
|
||||
|
||||
## Design Tokens
|
||||
|
||||
Defined in `@theme {}` in `app.css`:
|
||||
|
||||
- `--font-sans`: Manrope (body text)
|
||||
- `--font-display`: Manrope (headings, nav, buttons) — kept separate from `--font-sans` in case they diverge later
|
||||
|
||||
Reuse existing colors (`neutral-200`, `black`), font sizes, spacing, and border styles as components are built. Do not invent new values — check what's already in use first.
|
||||
|
||||
---
|
||||
|
||||
## Component Structure
|
||||
|
||||
### `resources/views/components/ui/` — atomic, reusable UI elements
|
||||
|
||||
Single-purpose, stateless or minimally stateful elements used across many contexts:
|
||||
|
||||
- `button.blade.php` ✓
|
||||
- `input.blade.php`
|
||||
- `input-group.blade.php`
|
||||
- `icon.blade.php`
|
||||
- `image.blade.php`
|
||||
- `tabs.blade.php` / `tab.blade.php`
|
||||
- `accordion.blade.php`
|
||||
- `tooltip.blade.php`
|
||||
- `badge.blade.php`
|
||||
- etc.
|
||||
|
||||
### `resources/views/components/` — section-level or composite components
|
||||
|
||||
Larger reusable blocks made of several elements, often with real content:
|
||||
|
||||
- `header.blade.php` ✓
|
||||
- `footer.blade.php`
|
||||
- `cta.blade.php`
|
||||
- `product-card.blade.php`
|
||||
- `contact-section.blade.php`
|
||||
- etc.
|
||||
|
||||
---
|
||||
|
||||
## Interactivity
|
||||
|
||||
### Popover API for overlays
|
||||
|
||||
For **tooltips, modals, dropdowns, and any overlay**: use the native [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) with CSS — no JS, no libraries.
|
||||
|
||||
```html
|
||||
<button popovertarget="my-popover">Open</button>
|
||||
<div id="my-popover" popover>...</div>
|
||||
```
|
||||
|
||||
Style open/closed states with `[popover]` and `:popover-open` selectors in CSS.
|
||||
|
||||
### Stimulus JS for behavior
|
||||
|
||||
Use Stimulus when JS is genuinely needed (form handling, cart updates, dynamic state, etc.).
|
||||
|
||||
- Keep controllers lean: manage state and coordinate the DOM, don't build UI inside them
|
||||
- Use Stimulus values, targets, and outlets — avoid reading from the DOM imperatively
|
||||
- **Never inject HTML strings or classes from inside a controller.** Instead, drive appearance via data attributes or CSS classes toggled on existing elements, and let CSS handle the visual result
|
||||
- Never write inline JS (`onclick="..."`, etc.)
|
||||
|
||||
### Pure CSS for simple interactions
|
||||
|
||||
Hover dropdowns, focus states, active states — handle with CSS (`:hover`, `:focus-within`, `.group:hover`) before reaching for Stimulus.
|
||||
|
||||
---
|
||||
|
||||
## Accessibility (ARIA)
|
||||
|
||||
Always add ARIA attributes. This is not optional:
|
||||
|
||||
- Interactive elements: `aria-label`, `aria-expanded`, `aria-controls`, `aria-haspopup` as appropriate
|
||||
- Images: meaningful `alt` text, or `alt=""` + `aria-hidden="true"` for decorative images
|
||||
- Icons used as buttons: `aria-label` on the button, `aria-hidden="true"` on the SVG
|
||||
- Form fields: always associated `<label>`, `aria-describedby` for hints/errors
|
||||
- Dynamic content: `aria-live` regions where content updates without navigation
|
||||
- When refactoring or adding interactivity, review ARIA impact — don't break existing roles
|
||||
|
||||
---
|
||||
|
||||
## Greek Typography
|
||||
|
||||
CSS `text-transform: uppercase` leaves Greek tonos accents in place (e.g. Ά instead of Α), which is incorrect. The utility at `resources/js/utils/strip-accents.js` handles this automatically for any element with the `uppercase` Tailwind class. **Always add the `uppercase` class to elements** rather than applying `text-transform: uppercase` in CSS — this keeps the strip-accents utility working without extra configuration.
|
||||
|
||||
---
|
||||
|
||||
## Performance & Core Web Vitals
|
||||
|
||||
Every frontend change should assume it will be measured by PageSpeed/Lighthouse. These rules exist because we hit each of these mistakes in production and had to fix them after the fact — bake them in up front instead.
|
||||
|
||||
### CSS bundling
|
||||
- Before adding a CSS import to a shared/global entry point (e.g. `app.css`), ask whether every page actually needs it. Page- or component-specific styles (date pickers, legal-page typography, admin-only widgets) should not ship on pages that don't use them.
|
||||
- Scope non-critical CSS to load only where it's used — either a dedicated build entry for that page, or import the `.css` file inside the same JS module that already lazy-loads that component (e.g. a Stimulus/JS controller), so the bundler emits it as a separate chunk fetched only when that component actually mounts.
|
||||
- Exception: never defer CSS for anything the page shows immediately on load (above-the-fold content, or a component that renders as soon as its JS runs — an FAQ accordion, a cookie-consent banner). Even a well-scoped async CSS chunk arrives a beat after the JS that displays the element, causing a visible flash of unstyled/wrong-state content and a layout shift. Keep that CSS in the blocking bundle on purpose.
|
||||
- Never import a full icon-font library (Phosphor, Font Awesome, etc.) — it ships every icon regardless of usage. Use inline SVGs for only the icons actually referenced; check the shared icon component for an existing icon before adding a new one.
|
||||
- Only declare design tokens / CSS custom properties that are actually used somewhere in the codebase (Tailwind v4 already tree-shakes unused `@theme` tokens from output, so this is for keeping the source legible, not for bytes).
|
||||
|
||||
### Fonts
|
||||
- `font-display: swap` means any text using a font weight will visibly reflow once that weight's file finishes downloading, if the fallback font's metrics differ. Preload every font weight used in above-the-fold text, not just the default body-copy weight — bold/black heading weights are usually the most visually prominent element on the page and cause the most visible reflow if not preloaded.
|
||||
- When introducing a new heavy-weight text utility (e.g. a bold/black heading class) in a hero or above-the-fold component, confirm that weight has a matching `<link rel="preload" as="font">` in the layout `<head>`.
|
||||
|
||||
### Images
|
||||
- Any image that could be the Largest Contentful Paint element (hero/banner images) must have: `fetchpriority="high"`, `loading="eager"`, explicit `width`/`height`, a responsive `srcset`/`sizes`, and a `<link rel="preload" as="image">` in `<head>` with matching `imagesrcset`/`imagesizes` — this lets the browser start the fetch as soon as it parses `<head>`, instead of waiting to discover the `<img>` tag in the body.
|
||||
- Every other image: `loading="lazy"` with explicit `width`/`height` to reserve its layout space.
|
||||
|
||||
### Layout shift (CLS)
|
||||
- Never animate `top`/`bottom`/`left`/`right`/`width`/`height`/`margin` on any element that appears or moves without direct user interaction (banners, toasts, slide-in modals, accordions). These are layout-affecting properties — the browser recalculates layout on every animation frame, and each frame's position delta counts toward CLS. Animate `transform` (translate/scale) and `opacity` instead — both are compositor-only and fully excluded from CLS scoring, no matter how far or long the animation runs.
|
||||
- This applies to vendor/third-party CSS too (cookie-consent widgets, modal libraries) — check its default show/hide mechanism before shipping, and override it if it animates a layout property directly.
|
||||
- Any element with a collapsed/expanded default state (accordions, dropdowns) needs its collapsed-state CSS in the blocking stylesheet, never a lazily-loaded chunk — otherwise it renders in its expanded/default state for a frame before the async CSS applies.
|
||||
|
||||
---
|
||||
|
||||
## Forms
|
||||
|
||||
Never add `novalidate` to forms. Always use the browser's default validation.
|
||||
|
||||
---
|
||||
|
||||
## Asking Questions
|
||||
|
||||
When the approach is unclear — layout structure, whether something should be a component, which Tailwind pattern fits — **ask before building**. A short question is cheaper than a refactor.
|
||||
+5
-7
@@ -119,13 +119,11 @@ COPY docker/php/php.dev.ini /etc/php/8.5/cli/conf.d/99-app.ini
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY composer.json composer.lock ./
|
||||
RUN composer install \
|
||||
--no-interaction \
|
||||
--no-scripts \
|
||||
--prefer-dist \
|
||||
--ignore-platform-reqs
|
||||
|
||||
# No build-time `composer install` here: composer.json's boboko/core path repo
|
||||
# (../boboko-core) isn't visible in the build context, only once bind-mounted at
|
||||
# container start — entrypoint.sh already runs composer install +
|
||||
# composer update boboko/* on every boot, so this would be redundant even if it
|
||||
# could work.
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
COPY docker/entrypoint-worker.sh /entrypoint-worker.sh
|
||||
RUN chmod +x /entrypoint.sh /entrypoint-worker.sh
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace App\Catalog;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Core\Catalog\DTOs\ProductFilters;
|
||||
use Modules\Core\Catalog\Enums\ProductSort;
|
||||
|
||||
/**
|
||||
* The parsed state of a category listing request. The query string is the single
|
||||
* source of truth for sort / filters / page — build one of these from the
|
||||
* request, read the applied values off it, and use query() to build links (sort
|
||||
* options, pagination, "clear filter") that carry the rest of the state along.
|
||||
*
|
||||
* A param is only ever emitted when it differs from its default, so a pristine
|
||||
* listing is just `/category/{id}` with no query string.
|
||||
*/
|
||||
final class CategoryListing
|
||||
{
|
||||
private function __construct(
|
||||
public readonly ?ProductSort $sort,
|
||||
public readonly ?int $minPrice,
|
||||
public readonly ?int $maxPrice,
|
||||
public readonly bool $inStockOnly,
|
||||
public readonly int $page,
|
||||
) {}
|
||||
|
||||
public static function fromRequest(Request $request): self
|
||||
{
|
||||
return new self(
|
||||
sort: ProductSort::tryFrom((string) $request->query('sort')),
|
||||
minPrice: self::intOrNull($request->query('price_min')),
|
||||
maxPrice: self::intOrNull($request->query('price_max')),
|
||||
inStockOnly: $request->boolean('in_stock'),
|
||||
page: max(1, (int) $request->query('page', 1)),
|
||||
);
|
||||
}
|
||||
|
||||
public function filters(int $collectionId): ProductFilters
|
||||
{
|
||||
return new ProductFilters(
|
||||
collectionId: $collectionId,
|
||||
minPrice: $this->minPrice,
|
||||
maxPrice: $this->maxPrice,
|
||||
inStockOnly: $this->inStockOnly,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The applied params as a clean array (defaults omitted), with `$overrides`
|
||||
* merged on top — pass `['key' => null]` to drop one. Feeds straight into
|
||||
* route('category.show', ['id' => $id] + $listing->query([...])).
|
||||
*
|
||||
* @param array<string, string|int|null> $overrides
|
||||
* @return array<string, string|int>
|
||||
*/
|
||||
public function query(array $overrides = []): array
|
||||
{
|
||||
return array_filter([
|
||||
'sort' => $this->sort?->value,
|
||||
'price_min' => $this->minPrice,
|
||||
'price_max' => $this->maxPrice,
|
||||
'in_stock' => $this->inStockOnly ? 1 : null,
|
||||
'page' => $this->page > 1 ? $this->page : null,
|
||||
...$overrides,
|
||||
], fn ($value) => $value !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the listing is reordered/narrowed enough that it shouldn't be
|
||||
* indexed as its own page (the canonical still points at the bare category
|
||||
* URL either way). A plain in-stock toggle is left indexable.
|
||||
*/
|
||||
public function isRefined(): bool
|
||||
{
|
||||
return $this->sort !== null
|
||||
|| $this->minPrice !== null
|
||||
|| $this->maxPrice !== null
|
||||
|| $this->page > 1;
|
||||
}
|
||||
|
||||
private static function intOrNull(mixed $value): ?int
|
||||
{
|
||||
return is_numeric($value) ? (int) $value : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Catalog\CategoryListing;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Core\Catalog\Services\CollectionService;
|
||||
use Modules\Core\Catalog\Services\ProductService;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ProductService $products,
|
||||
private readonly CollectionService $collections,
|
||||
) {}
|
||||
|
||||
public function show(string $locale, int $collection)
|
||||
{
|
||||
$collectionData = $this->collections->getById($collection);
|
||||
abort_if($collectionData === null, Response::HTTP_NOT_FOUND);
|
||||
|
||||
$listing = CategoryListing::fromRequest(request());
|
||||
$filters = $listing->filters($collectionData['id']);
|
||||
$perPage = 12;
|
||||
|
||||
// Listing/filtering reads from the Meilisearch index via ProductService,
|
||||
// not Eloquent — see Modules\Core\Catalog\Services\ProductService. list() returns a
|
||||
// real LengthAwarePaginator of plain arrays (already localized/flattened),
|
||||
// not Product models. Sort/filter/page all come from the query string via
|
||||
// CategoryListing, which is the single source of truth for that state.
|
||||
$products = $this->products->list(
|
||||
filters: $filters,
|
||||
perPage: $perPage,
|
||||
page: $listing->page,
|
||||
sort: $listing->sort,
|
||||
)->through(fn (array $product) => [
|
||||
'name' => $product['name'],
|
||||
'price' => $product['price'],
|
||||
'image' => $product['media'][0]['url'] ?? null,
|
||||
'href' => route('product.show', ['id' => $product['id']]),
|
||||
])->appends($listing->query(['page' => null]));
|
||||
|
||||
// Slider bounds — the price span of everything matching the *other*
|
||||
// filters (priceRange() drops the price filter itself, so the handles
|
||||
// don't collapse to whatever's already selected). Whole euros.
|
||||
$priceRange = $this->products->priceRange($filters);
|
||||
$priceFloor = $priceRange['min'] !== null ? (int) floor($priceRange['min']) : null;
|
||||
$priceCeil = $priceRange['max'] !== null ? (int) ceil($priceRange['max']) : null;
|
||||
|
||||
// A price param is only a real filter if it's tighter than the bounds —
|
||||
// drives whether the "clear" link shows.
|
||||
$priceFiltered = ($listing->minPrice !== null && $listing->minPrice > ($priceFloor ?? PHP_INT_MIN))
|
||||
|| ($listing->maxPrice !== null && $listing->maxPrice < ($priceCeil ?? PHP_INT_MAX));
|
||||
|
||||
return view('category.show', [
|
||||
'collection' => $collectionData,
|
||||
'products' => $products,
|
||||
'listing' => $listing,
|
||||
'priceFloor' => $priceFloor,
|
||||
'priceCeil' => $priceCeil,
|
||||
'priceFiltered' => $priceFiltered,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
class ContactController extends Controller
|
||||
{
|
||||
public function index(string $locale)
|
||||
{
|
||||
return view('contact');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\StoicPage;
|
||||
use Lunar\Models\Product;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function index(string $locale)
|
||||
{
|
||||
$page = StoicPage::firstWhere('slug', 'home');
|
||||
|
||||
if (! $page) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$products = Product::with(['variants.prices.currency', 'media'])
|
||||
->inRandomOrder()
|
||||
->limit(13)
|
||||
->get()
|
||||
->map(fn (Product $product) => [
|
||||
'name' => $product->translateAttribute('name'),
|
||||
'price' => $product->variants->first()?->prices->first()?->price->decimal,
|
||||
'image' => $product->media->first()?->getUrl(),
|
||||
'href' => route('product.show', ['id' => $product->id]),
|
||||
]);
|
||||
|
||||
return view('home', [
|
||||
'page' => $page,
|
||||
'heroProducts' => $products->take(5)->values(),
|
||||
'classicsProducts' => $products->slice(5)->values(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\StoicPage;
|
||||
|
||||
class LegalPageController extends Controller
|
||||
{
|
||||
public function terms(string $locale)
|
||||
{
|
||||
return $this->show('terms-and-conditions');
|
||||
}
|
||||
|
||||
public function shippingReturns(string $locale)
|
||||
{
|
||||
return $this->show('shipping-returns');
|
||||
}
|
||||
|
||||
public function privacy(string $locale)
|
||||
{
|
||||
return $this->show('privacy-policy');
|
||||
}
|
||||
|
||||
public function cookies(string $locale)
|
||||
{
|
||||
return $this->show('cookies-policy');
|
||||
}
|
||||
|
||||
private function show(string $slug)
|
||||
{
|
||||
$page = StoicPage::firstWhere('slug', $slug);
|
||||
|
||||
if (! $page) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return view('legal', ['page' => $page]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Core\Catalog\Services\ProductService;
|
||||
|
||||
class ProductController extends Controller
|
||||
{
|
||||
public function __construct(private readonly ProductService $products) {}
|
||||
|
||||
public function show(string $locale, int $id)
|
||||
{
|
||||
$product = $this->products->getById($id);
|
||||
abort_if($product === null, Response::HTTP_NOT_FOUND);
|
||||
|
||||
$collection = $product['collections'][0] ?? null;
|
||||
|
||||
$variantsData = collect($product['variants'])
|
||||
->map(fn (array $variant) => [
|
||||
'id' => $variant['id'],
|
||||
'price' => $variant['prices'][0]['price'] ?? null,
|
||||
'image' => $variant['media'][0]['url'] ?? null,
|
||||
])
|
||||
->values()
|
||||
->all();
|
||||
|
||||
$firstVariant = $product['variants'][0] ?? null;
|
||||
$option = $firstVariant['options'][0]['option'] ?? null;
|
||||
|
||||
return view('product.show', [
|
||||
'collection' => $collection,
|
||||
'product' => $product,
|
||||
'option' => $option,
|
||||
'variantsData' => $variantsData,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use JacobJoergensen\LaravelPaper\Attributes\ContentPath;
|
||||
use JacobJoergensen\LaravelPaper\Attributes\Driver;
|
||||
use JacobJoergensen\LaravelPaper\Attributes\Timestamps;
|
||||
use JacobJoergensen\LaravelPaper\Paper;
|
||||
|
||||
#[Driver("markdown")]
|
||||
#[ContentPath("resources/stoic/content/pages")]
|
||||
#[Timestamps]
|
||||
class StoicPage extends Model
|
||||
{
|
||||
use Paper;
|
||||
}
|
||||
@@ -6,9 +6,14 @@
|
||||
use App\Models\Staff;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\View\View as ViewInstance;
|
||||
use Lunar\Facades\ModelManifest;
|
||||
use Lunar\Facades\Telemetry;
|
||||
use Modules\Core\Catalog\DTOs\CollectionFilters;
|
||||
use Modules\Core\Catalog\Enums\CollectionSort;
|
||||
use Modules\Core\Catalog\Services\CollectionService;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -16,6 +21,17 @@ public function boot(): void
|
||||
{
|
||||
Telemetry::optOut();
|
||||
|
||||
// header.blade.php's category dropdown — root collections only, resolved
|
||||
// per-request so the composer runs after `locale` middleware has already
|
||||
// set App::getLocale(), which CollectionService's name resolution depends on.
|
||||
View::composer('components.header', function (ViewInstance $view) {
|
||||
$view->with('categories', app(CollectionService::class)->list(
|
||||
filters: new CollectionFilters(rootOnly: true),
|
||||
perPage: 100,
|
||||
sort: CollectionSort::Position,
|
||||
)->items());
|
||||
});
|
||||
|
||||
if ($this->app->environment('production')) {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
class Stoic
|
||||
{
|
||||
public static array $config = [];
|
||||
public static array $presets = [];
|
||||
public static string $thumbs_path;
|
||||
|
||||
private static function loadConfig(): void
|
||||
{
|
||||
if (!empty(static::$config)) {
|
||||
return;
|
||||
}
|
||||
$config = Yaml::parseFile(resource_path("stoic/stoic_config.yml"));
|
||||
static::$config = $config;
|
||||
static::$thumbs_path = $config["thumbs_path"];
|
||||
static::$presets = $config["presets"];
|
||||
}
|
||||
|
||||
public static function presets(): array
|
||||
{
|
||||
static::loadConfig();
|
||||
return static::$presets;
|
||||
}
|
||||
|
||||
// Returns the public URL for a stoic image at a given preset.
|
||||
public static function image(string $filename, string $preset): string
|
||||
{
|
||||
static::loadConfig();
|
||||
|
||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
|
||||
if ($ext === "svg") {
|
||||
$rel = static::thumbsRelPath() . "images/" . $filename;
|
||||
return Storage::disk("public")->url($rel);
|
||||
}
|
||||
|
||||
$webp = substr($filename, 0, -strlen($ext)) . "webp";
|
||||
$rel = static::thumbsRelPath() . "presets/" . $preset . "/" . $webp;
|
||||
|
||||
return Storage::disk("public")->url($rel);
|
||||
}
|
||||
|
||||
// Generates the full srcset string for all configured presets.
|
||||
public static function srcset(string $filename): string
|
||||
{
|
||||
static::loadConfig();
|
||||
|
||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
if ($ext === "svg") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return collect(static::$presets)
|
||||
->map(
|
||||
fn($p) => static::image($filename, $p["code"]) .
|
||||
" " .
|
||||
$p["width"] .
|
||||
"w",
|
||||
)
|
||||
->implode(", ");
|
||||
}
|
||||
|
||||
// Returns [width, height] for a given preset from the sidecar JSON.
|
||||
public static function dimensions(string $filename, string $preset): array
|
||||
{
|
||||
static::loadConfig();
|
||||
|
||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
if ($ext === "svg") {
|
||||
return [null, null];
|
||||
}
|
||||
|
||||
$rel = static::thumbsRelPath() . "images/" . $filename . ".json";
|
||||
$path = Storage::disk("public")->path($rel);
|
||||
$meta = json_decode(@file_get_contents($path), true);
|
||||
|
||||
$p = $meta["presets"][$preset] ?? null;
|
||||
if (!$p) {
|
||||
return [null, null];
|
||||
}
|
||||
|
||||
return [(int) $p["w"], (int) $p["h"]];
|
||||
}
|
||||
|
||||
// Path of the thumbs directory relative to the public storage disk root.
|
||||
// Uses a fixed marker so it works regardless of the app's base path (local vs Docker).
|
||||
private static function thumbsRelPath(): string
|
||||
{
|
||||
$marker = "/storage/app/public/";
|
||||
$pos = strpos(static::$thumbs_path, $marker);
|
||||
|
||||
if ($pos !== false) {
|
||||
return substr(static::$thumbs_path, $pos + strlen($marker));
|
||||
}
|
||||
|
||||
return ltrim(static::$thumbs_path, "/");
|
||||
}
|
||||
|
||||
public static function token(string $email): string
|
||||
{
|
||||
$ttl = 60;
|
||||
$payload = base64_encode(
|
||||
json_encode([
|
||||
"email" => $email,
|
||||
"exp" => time() + $ttl,
|
||||
]),
|
||||
);
|
||||
|
||||
$sig = hash_hmac(
|
||||
"sha256",
|
||||
$payload,
|
||||
config("services.stoic.sso_secret"),
|
||||
);
|
||||
|
||||
$token = "t=" . urlencode($payload) . "&s=" . $sig;
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
public static function hasMany(
|
||||
string $relation,
|
||||
array $slugs,
|
||||
string $prefix,
|
||||
) {
|
||||
$slugs = array_map(
|
||||
fn($i) => str_replace($prefix . "/", "", $i),
|
||||
$slugs,
|
||||
);
|
||||
|
||||
$entries = $relation::whereIn("slug", $slugs)->get();
|
||||
|
||||
return collect(array_map(
|
||||
fn($i) => $entries->firstWhere("slug", $i),
|
||||
$slugs
|
||||
));
|
||||
}
|
||||
|
||||
public static function hasOne(
|
||||
string $relation,
|
||||
string $slug,
|
||||
string $prefix,
|
||||
) {
|
||||
$slug = str_replace($prefix . "/", "", $slug);
|
||||
return $relation::firstWhere("slug", $slug);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
class Price
|
||||
{
|
||||
/**
|
||||
* Format a price the Greek way: comma as the decimal separator, dot as
|
||||
* the thousands separator, and no decimals shown unless the amount
|
||||
* actually needs them (19.00 -> "19", 19.50 -> "19,5", 19.55 -> "19,55").
|
||||
*/
|
||||
public static function format(float|int|string|null $amount, string $currency = '€'): ?string
|
||||
{
|
||||
if ($amount === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$amount = round((float) $amount, 2);
|
||||
$cents = (int) round($amount * 100);
|
||||
|
||||
$decimals = match (true) {
|
||||
$cents % 100 === 0 => 0,
|
||||
$cents % 10 === 0 => 1,
|
||||
default => 2,
|
||||
};
|
||||
|
||||
return $currency.number_format($amount, $decimals, ',', '.');
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
"require": {
|
||||
"artesaos/seotools": "^1.4",
|
||||
"boboko/core": "0.*",
|
||||
"jacobjoergensen/laravel-paper": "^1.12",
|
||||
"open-telemetry/exporter-otlp": "^1.4",
|
||||
"open-telemetry/opentelemetry-auto-laravel": "^1.7",
|
||||
"open-telemetry/sdk": "^1.14",
|
||||
|
||||
Generated
+1448
-1793
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -78,7 +78,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
'locale' => env('APP_LOCALE', 'el'),
|
||||
|
||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
*/
|
||||
'cart_lines' => [
|
||||
Lunar\Pipelines\CartLine\GetUnitPrice::class,
|
||||
Modules\Core\Cart\Pipelines\ZeroSavedForLaterPrice::class,
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
| Determines whether the cart sholud be soft deleted when the user logs out.
|
||||
|
|
||||
*/
|
||||
'delete_on_forget' => true,
|
||||
'delete_on_forget' => false,
|
||||
];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Modules\Core\Payment\Drivers\OfflinePaymentDriver;
|
||||
|
||||
return [
|
||||
|
||||
'default' => env('PAYMENTS_TYPE', 'cash-in-hand'),
|
||||
@@ -7,6 +9,7 @@
|
||||
'types' => [
|
||||
'cash-in-hand' => [
|
||||
'driver' => 'offline',
|
||||
'payment_driver' => OfflinePaymentDriver::class,
|
||||
'authorized' => 'payment-offline',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
|
||||
'indexers' => [
|
||||
Lunar\Models\Brand::class => Lunar\Search\BrandIndexer::class,
|
||||
Lunar\Models\Collection::class => Lunar\Search\CollectionIndexer::class,
|
||||
Lunar\Models\Collection::class => Modules\Core\Catalog\Services\CollectionIndexer::class,
|
||||
Lunar\Models\Customer::class => Lunar\Search\CustomerIndexer::class,
|
||||
Lunar\Models\Order::class => Lunar\Search\OrderIndexer::class,
|
||||
Lunar\Models\Product::class => Modules\Core\Search\ProductIndexer::class,
|
||||
Lunar\Models\Product::class => Modules\Core\Catalog\Services\ProductIndexer::class,
|
||||
Lunar\Models\ProductOption::class => Lunar\Search\ProductOptionIndexer::class,
|
||||
],
|
||||
|
||||
|
||||
@@ -35,4 +35,9 @@
|
||||
],
|
||||
],
|
||||
|
||||
'stoic' => [
|
||||
'sso_secret' => env('STOIC_SSO_SECRET'),
|
||||
'host' => env('STOIC_HOST'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -148,10 +148,10 @@ services:
|
||||
working_dir: /app
|
||||
command: npm run dev
|
||||
ports:
|
||||
- "${VITE_PORT:-5173}:5173"
|
||||
- "${VITE_PORT:-5174}:${VITE_PORT:-5174}"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_PORT=${VITE_PORT:-5173}
|
||||
- VITE_PORT=${VITE_PORT:-5174}
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
|
||||
@@ -34,7 +34,10 @@ if [ "$APP_ENV" != "production" ]; then
|
||||
echo "[entrypoint] Running migrations..."
|
||||
rm -f storage/framework/migrated
|
||||
php artisan migrate --force
|
||||
echo "[entrypoint] Touching migrated file"
|
||||
touch storage/framework/migrated
|
||||
echo "[entrypoint] Touched migrated file"
|
||||
|
||||
|
||||
# boboko/core overrides lunar:install to skip the interactive prompts (migrate
|
||||
# confirm, admin creation, GitHub star) and just seed the idempotent store
|
||||
@@ -42,11 +45,13 @@ if [ "$APP_ENV" != "production" ]; then
|
||||
# product type. queue/scheduler wait on the marker above rather than running
|
||||
# this themselves, since the country import's check-then-insert isn't safe to
|
||||
# run concurrently.
|
||||
echo "[entrypoint] Trying Lunar install"
|
||||
php artisan lunar:install --quiet || true
|
||||
|
||||
# Upserts by primary key (no --refresh), so this stays cheap and idempotent on
|
||||
# every boot rather than flushing and rebuilding the whole index each time.
|
||||
echo "[entrypoint] Syncing search indexes..."
|
||||
php artisan lunar:meilisearch:setup
|
||||
php artisan lunar:search:index --quiet || true
|
||||
fi
|
||||
|
||||
|
||||
+1
-3
@@ -16,8 +16,6 @@
|
||||
"dependencies": {
|
||||
"@hotwired/stimulus": "^3.2.2",
|
||||
"@hotwired/turbo": "^8.0.23",
|
||||
"@phosphor-icons/web": "^2.1.2",
|
||||
"axios": "^1.15.2",
|
||||
"flatpickr": "^4.6.13"
|
||||
"axios": "^1.15.2"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-IYF56FF6.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-JEOLYBOO.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-EOVOK2B5.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-IRE366VL.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-CE5GGD3W.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-HA22NDSG.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-NRMW37G5.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(()=>{var o=({livewireId:s})=>({actionNestingIndex:null,shouldOverlayParentActions:!1,closedActionNestingIndexes:[],focusTargetsByNestingIndex:{},boundSyncActionModals:null,boundOnModalClosed:null,init(){this.boundSyncActionModals=e=>{e.detail.id===s&&this.syncActionModals(e.detail.newActionNestingIndex,e.detail.shouldOverlayParentActions??!1)},this.boundOnModalClosed=e=>{let t=this.getActionNestingIndexFromModalId(e.detail.id);t!==null&&((this.shouldOverlayParentActions||t===0)&&this.restorePreviouslyFocusedElement(t-1),this.closedActionNestingIndexes.push(t))},window.addEventListener("sync-action-modals",this.boundSyncActionModals),window.addEventListener("modal-closed",this.boundOnModalClosed)},destroy(){this.boundSyncActionModals&&(window.removeEventListener("sync-action-modals",this.boundSyncActionModals),this.boundSyncActionModals=null),this.boundOnModalClosed&&(window.removeEventListener("modal-closed",this.boundOnModalClosed),this.boundOnModalClosed=null)},syncActionModals(e,t=!1){if(this.actionNestingIndex===e){this.actionNestingIndex!==null&&this.$nextTick(()=>this.openModal());return}let n=this.actionNestingIndex!==null&&e!==null&&e>this.actionNestingIndex,i=this.actionNestingIndex!==null&&e!==null&&e<this.actionNestingIndex,d=this.actionNestingIndex===null&&e!==null;if((n||d)&&this.rememberPreviouslyFocusedElement(),this.actionNestingIndex!==null&&!(t&&n)&&this.closeModal(),this.actionNestingIndex=e,this.actionNestingIndex===null){this.restorePreviouslyFocusedElement(-1),this.closedActionNestingIndexes=[],this.focusTargetsByNestingIndex={},this.shouldOverlayParentActions=!1;return}if(this.shouldOverlayParentActions=t,this.closedActionNestingIndexes=this.closedActionNestingIndexes.filter(l=>l<=this.actionNestingIndex),!this.closedActionNestingIndexes.includes(this.actionNestingIndex)){if(!this.$el.querySelector(`#${this.generateModalId(e)}`)){this.$nextTick(()=>{this.openModal(),i&&this.restorePreviouslyFocusedElement()});return}this.openModal(),i&&this.restorePreviouslyFocusedElement()}},rememberPreviouslyFocusedElement(){let e=this.$focus.focused();if(!e)return;if(this.actionNestingIndex===null){this.focusTargetsByNestingIndex[-1]=e;return}this.$el.querySelector(`#${this.generateModalId(this.actionNestingIndex)}`)?.contains(e)&&(this.focusTargetsByNestingIndex[this.actionNestingIndex]=e)},restorePreviouslyFocusedElement(e=this.actionNestingIndex){let t=this.focusTargetsByNestingIndex[e];if(t){for(let n in this.focusTargetsByNestingIndex)Number(n)>=e&&delete this.focusTargetsByNestingIndex[n];requestAnimationFrame(()=>requestAnimationFrame(()=>this.$nextTick(()=>{t.focus({preventScroll:!0})})))}},generateModalId(e){return`fi-${s}-action-`+e},getActionNestingIndexFromModalId(e){let t=`fi-${s}-action-`;if(!e?.startsWith(t))return null;let n=Number(e.slice(t.length));return Number.isInteger(n)?n:null},openModal(){let e=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("open-modal",{bubbles:!0,composed:!0,detail:{id:e}}))},closeModal(){let e=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("close-modal-quietly",{bubbles:!0,composed:!0,detail:{id:e}}))}});document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentActionModals",o)});})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function c({livewireId:s}){return{areAllCheckboxesChecked:!1,checkboxListOptions:[],search:"",unsubscribeLivewireHook:null,visibleCheckboxListOptions:[],init(){this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.$nextTick(()=>{this.checkIfAllCheckboxesAreChecked()}),this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:t,succeed:i,fail:o,respond:h})=>{i(({snapshot:r,effect:l})=>{this.$nextTick(()=>{e.id===s&&(this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked())})})}),this.$watch("search",()=>{this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked()})},checkIfAllCheckboxesAreChecked(){this.areAllCheckboxesChecked=this.visibleCheckboxListOptions.length===this.visibleCheckboxListOptions.filter(e=>e.querySelector("input[type=checkbox]:checked, input[type=checkbox]:disabled")).length},toggleAllCheckboxes(){this.checkIfAllCheckboxesAreChecked();let e=!this.areAllCheckboxesChecked;this.visibleCheckboxListOptions.forEach(t=>{let i=t.querySelector("input[type=checkbox]");i.disabled||i.checked!==e&&(i.checked=e,i.dispatchEvent(new Event("change")))}),this.areAllCheckboxesChecked=e},updateVisibleCheckboxListOptions(){this.visibleCheckboxListOptions=this.checkboxListOptions.filter(e=>["",null,void 0].includes(this.search)||e.querySelector(".fi-fo-checkbox-list-option-label")?.innerText.toLowerCase().includes(this.search.toLowerCase())?!0:e.querySelector(".fi-fo-checkbox-list-option-description")?.innerText.toLowerCase().includes(this.search.toLowerCase()))},destroy(){this.unsubscribeLivewireHook?.()}}}export{c as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function r({state:o}){return{state:o,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows);this.rows=[];let s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.$nextTick(()=>{this.rows=e,this.updateState()})},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default};
|
||||
function a({state:r}){return{state:r,rows:[],init(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(e,t)=>{if(!Array.isArray(e))return;let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(e)===0&&s(t)===0||this.updateRows()})},addRow(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow(e){this.rows.splice(e,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows(e){let t=Alpine.raw(this.rows);this.rows=[];let s=t.splice(e.oldIndex,1)[0];t.splice(e.newIndex,0,s),this.$nextTick(()=>{this.rows=t,this.updateState()})},updateRows(){let t=Alpine.raw(this.state).map(({key:s,value:i})=>({key:s,value:i}));this.rows.forEach(s=>{(s.key===""||s.key===null)&&t.push({key:"",value:s.value})}),this.rows=t},updateState(){let e=[];this.rows.forEach(t=>{t.key===""||t.key===null||e.push({key:t.key,value:t.value})}),JSON.stringify(this.state)!==JSON.stringify(e)&&(this.state=e)}}}export{a as default};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
||||
function r({state:n,splitKeys:i,tagAddedMessage:a,tagRemovedMessage:s}){return{newTag:"",state:n,liveRegionClearTimeout:null,announce(e){let t=this.$refs.liveRegion;t&&(this.liveRegionClearTimeout!==null&&clearTimeout(this.liveRegionClearTimeout),t.textContent=e,this.liveRegionClearTimeout=setTimeout(()=>{t.textContent="",this.liveRegionClearTimeout=null},3e3))},createTag(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.announce(a?.replace(":tag",()=>this.newTag)),this.newTag=""}},deleteTag(e){this.state=this.state.filter(t=>t!==e),this.announce(s?.replace(":tag",()=>e))},reorderTags(e){let t=this.state.splice(e.oldIndex,1)[0];this.state.splice(e.newIndex,0,t),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(e){["Enter",...i].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(i.length===0){this.createTag();return}let e=i.map(t=>t.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(e,"g")).forEach(t=>{this.newTag=t,this.createTag()})})}}}}export{r as default};
|
||||
|
||||
@@ -1 +1 @@
|
||||
function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default};
|
||||
function n({initialHeight:e,shouldAutosize:i,state:h}){return{state:h,wrapperEl:null,init(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=e+"rem")},resize(){if(this.$el.scrollHeight<=0)return;let t=this.$el.style.height;this.$el.style.height="0px";let r=this.$el.scrollHeight;this.$el.style.height=t;let l=parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),s=Math.max(r,l)+"px";this.wrapperEl.style.height!==s&&(this.wrapperEl.style.height=s)},setUpResizeObserver(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{n as default};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
var i=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let e=this.$el.parentElement;e&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(e),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let e=this.$el.parentElement;if(!e)return;let t=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=e.offsetWidth+parseInt(t.marginInlineStart,10)*-1+parseInt(t.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});export{i as default};
|
||||
@@ -0,0 +1 @@
|
||||
function x({activeTab:p,isScrollable:m,isTabPersisted:T,isTabPersistedInQueryString:w,livewireId:g,schemaKey:D,tab:W,tabQueryStringKey:r}){return{boundResizeHandler:null,boundResetHandler:null,isScrollable:m,resizeDebounceTimer:null,tab:W,unsubscribeLivewireHook:null,withinDropdownIndex:null,withinDropdownMounted:!1,init(){let t=this.getTabs(),e=new URLSearchParams(window.location.search);w&&e.has(r)&&t.includes(e.get(r))&&(this.tab=e.get(r)),(!this.tab||!t.includes(this.tab))&&(this.tab=t[p-1]),this.$watch("tab",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.unsubscribeLivewireHook=Livewire.hook("commit",({component:i,commit:d,succeed:c,fail:h,respond:u})=>{c(({snapshot:b,effect:n})=>{this.$nextTick(()=>{if(i.id!==g)return;let o=this.getTabs();o.includes(this.tab)||(this.tab=o[p-1]??this.tab)})})}),this.boundResetHandler=i=>{i.detail.livewireId!==g||i.detail.schemaKey!==D||T||w||this.$nextTick(()=>{this.tab=this.getTabs()[p-1]??this.tab})},window.addEventListener("reset-schema-component-state",this.boundResetHandler),m||(this.boundResizeHandler=this.debouncedUpdateTabsWithinDropdown.bind(this),window.addEventListener("resize",this.boundResizeHandler),this.updateTabsWithinDropdown())},calculateAvailableWidth(t){let e=window.getComputedStyle(t);return Math.floor(t.clientWidth)-Math.ceil(parseFloat(e.paddingLeft))*2},calculateContainerGap(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.columnGap))},calculateDropdownIconWidth(t){let e=t.querySelector(".fi-icon");return Math.ceil(e.clientWidth)},calculateTabItemGap(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.columnGap)||8)},calculateTabItemPadding(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.paddingLeft))+Math.ceil(parseFloat(e.paddingRight))},findOverflowIndex(t,e,i,d,c,h){let u=t.map(n=>Math.ceil(n.clientWidth)),b=t.map(n=>{let o=n.querySelector(".fi-tabs-item-label"),s=n.querySelector(".fi-badge"),a=Math.ceil(o.clientWidth),l=s?Math.ceil(s.clientWidth):0;return{label:a,badge:l,total:a+(l>0?d+l:0)}});for(let n=0;n<t.length;n++){let o=u.slice(0,n+1).reduce((f,I)=>f+I,0),s=n*i,a=b.slice(n+1),l=a.length>0,v=l?Math.max(...a.map(f=>f.total)):0,y=l?c+v+d+h+i:0;if(o+s+y>e)return n}return-1},get isDropdownButtonVisible(){return this.withinDropdownMounted?this.withinDropdownIndex===null?!1:this.getTabs().findIndex(e=>e===this.tab)<this.withinDropdownIndex:!0},getTabs(){return this.$refs.tabsData?JSON.parse(this.$refs.tabsData.value):[]},updateQueryString(){if(!w)return;let t=new URL(window.location.href);t.searchParams.set(r,this.tab),history.replaceState(null,document.title,t.toString())},autofocusFields(t=!1){this.$nextTick(()=>{if(t&&document.activeElement&&document.activeElement!==document.body&&this.$el.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let e=this.$el.querySelectorAll(".fi-sc-tabs-tab.fi-active [autofocus]");for(let i of e)if(i.focus(),document.activeElement===i)break})},debouncedUpdateTabsWithinDropdown(){clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>this.updateTabsWithinDropdown(),150)},async updateTabsWithinDropdown(){this.withinDropdownIndex=null,this.withinDropdownMounted=!1,await this.$nextTick();let t=this.$el.querySelector(".fi-tabs"),e=t.querySelector(".fi-tabs-item:last-child"),i=Array.from(t.children).slice(0,-1),d=i.map(s=>s.style.display);i.forEach(s=>s.style.display=""),t.offsetHeight;let c=this.calculateAvailableWidth(t),h=this.calculateContainerGap(t),u=this.calculateDropdownIconWidth(e),b=this.calculateTabItemGap(i[0]),n=this.calculateTabItemPadding(i[0]),o=this.findOverflowIndex(i,c,h,b,n,u);i.forEach((s,a)=>s.style.display=d[a]),o!==-1&&(this.withinDropdownIndex=o),this.withinDropdownMounted=!0},destroy(){this.unsubscribeLivewireHook?.(),this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler),this.boundResizeHandler&&window.removeEventListener("resize",this.boundResizeHandler),clearTimeout(this.resizeDebounceTimer)}}}export{x as default};
|
||||
@@ -0,0 +1 @@
|
||||
function l({isSkippable:i,isStepPersistedInQueryString:n,key:o,livewireId:h,schemaKey:p,startStep:r,stepQueryStringKey:d}){return{boundResetHandler:null,step:null,init(){this.step=this.getSteps().at(r-1),this.$watch("step",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.boundResetHandler=t=>{t.detail.livewireId!==h||t.detail.schemaKey!==p||n||this.$nextTick(()=>{this.step=this.getSteps().at(r-1)??this.step})},window.addEventListener("reset-schema-component-state",this.boundResetHandler)},async requestNextStep(){await this.$wire.callSchemaComponentMethod(o,"nextStep",{currentStepIndex:this.getStepIndex(this.step)})},goToNextStep(){let t=this.getStepIndex(this.step)+1;t>=this.getSteps().length||(this.step=this.getSteps()[t],this.scroll())},goToPreviousStep(){let t=this.getStepIndex(this.step)-1;t<0||(this.step=this.getSteps()[t],this.scroll())},goToStep(t){let e=this.getStepIndex(t);e<=-1||!i&&e>this.getStepIndex(this.step)||(this.step=t,this.scroll())},scroll(){this.$nextTick(()=>{this.$refs.header?.children[this.getStepIndex(this.step)].scrollIntoView({behavior:"smooth",block:"start"})})},autofocusFields(t=!1){this.$nextTick(()=>{if(t&&document.activeElement&&document.activeElement!==document.body&&this.$el.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let e=this.$refs[`step-${this.step}`]?.querySelectorAll("[autofocus]")??[];for(let s of e)if(s.focus(),document.activeElement===s)break})},getStepIndex(t){let e=this.getSteps().findIndex(s=>s===t);return e===-1?0:e},getSteps(){return JSON.parse(this.$refs.stepsData.value)},isFirstStep(){return this.getStepIndex(this.step)<=0},isLastStep(){return this.getStepIndex(this.step)+1>=this.getSteps().length},isStepAccessible(t){return i||this.getStepIndex(this.step)>this.getStepIndex(t)},updateQueryString(){if(!n)return;let t=new URL(window.location.href);t.searchParams.set(d,this.step),history.replaceState(null,document.title,t.toString())},destroy(){this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler)}}}export{l as default};
|
||||
@@ -0,0 +1 @@
|
||||
(()=>{var d=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let i=this.$el.parentElement;i&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(i),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let i=this.$el.parentElement;if(!i)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=i.offsetWidth+parseInt(e.marginInlineStart,10)*-1+parseInt(e.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});var u=function(i,e,n){let t=i;if(e.startsWith("/")&&(n=!0,e=e.slice(1)),n)return e;for(;e.startsWith("../");)t=t.includes(".")?t.slice(0,t.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(t)?e:["",null,void 0].includes(e)?t:`${t}.${e}`},h=i=>{let e=Alpine.findClosest(i,n=>n.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire};document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:i,schemaKey:e})=>({handleFormValidationError(n){n.detail.livewireId===i&&this.$nextTick(()=>{let t=this.$el.querySelector("[data-validation-error]");if(!t)return;let r=t;for(;r;)r.dispatchEvent(new CustomEvent("expand")),r=r.parentNode;setTimeout(()=>t.closest("[data-field-wrapper]").scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),200)})},handleClientSideStateReset(n){n.detail.livewireId!==i||n.detail.schemaKey!==e||this.$nextTick(()=>{let t=this.$el.querySelectorAll("[autofocus]");for(let r of t)if(r.offsetParent!==null&&(r.focus(),document.activeElement===r))break})},isStateChanged(n,t){if(n===void 0)return!1;try{return JSON.stringify(n)!==JSON.stringify(t)}catch{return n!==t}}})),window.Alpine.data("filamentSchemaComponent",({path:i,containerPath:e,$wire:n})=>({$statePath:i,$get:(t,r)=>n.$get(u(e,t,r)),$set:(t,r,a,o=!1)=>n.$set(u(e,t,a),r,o),get $state(){return n.$get(i)}})),window.Alpine.data("filamentActionsSchemaComponent",d),Livewire.hook("commit",({component:i,commit:e,respond:n,succeed:t,fail:r})=>{t(({snapshot:a,effects:o})=>{o.dispatches?.forEach(s=>{if(!s.params?.awaitSchemaComponent)return;let l=Array.from(i.el.querySelectorAll(`[wire\\:partial="schema-component::${s.params.awaitSchemaComponent}"]`)).filter(c=>h(c)===i);if(l.length!==1){if(l.length>1)throw`Multiple schema components found with key [${s.params.awaitSchemaComponent}].`;window.addEventListener(`schema-component-${i.id}-${s.params.awaitSchemaComponent}-loaded`,()=>{window.dispatchEvent(new CustomEvent(s.name,{detail:s.params}))},{once:!0})}})})})});})();
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function o({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:i,succeed:a,fail:u,respond:h})=>{a(({snapshot:d,effect:f})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||Alpine.raw(this.state)===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let i=await this.$wire.updateTableColumnState(r,s,this.state);this.error=i?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{o as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function o({name:i,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:r,succeed:a,fail:u,respond:d})=>{a(({snapshot:h,effect:l})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||this.getNormalizedState()===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||this.getNormalizedState()===e)return;this.isLoading=!0;let r=await this.$wire.updateTableColumnState(i,s,this.state);this.error=r?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.getNormalizedState()),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[null,void 0].includes(this.$refs.serverState.value)?"":this.$refs.serverState.value.replaceAll('\\"','"')},getNormalizedState(){let e=Alpine.raw(this.state);return[null,void 0].includes(e)?"":e},destroy(){this.unsubscribeLivewireHook?.()}}}export{o as default};
|
||||
@@ -0,0 +1 @@
|
||||
function o({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:i,succeed:a,fail:u,respond:h})=>{a(({snapshot:d,effect:f})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||Alpine.raw(this.state)===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let i=await this.$wire.updateTableColumnState(r,s,this.state);this.error=i?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{o as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+377
-4
@@ -1,11 +1,384 @@
|
||||
@import 'tailwindcss';
|
||||
|
||||
@import "tailwindcss";
|
||||
@import "./fonts.css";
|
||||
@import "./dropdown.css";
|
||||
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
|
||||
@source '../../storage/framework/views/*.php';
|
||||
@source '../**/*.blade.php';
|
||||
@source '../**/*.js';
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
DESIGN TOKENS
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
@theme {
|
||||
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
||||
'Segoe UI Symbol', 'Noto Color Emoji';
|
||||
/*--font-sans: "Nunito", ui-sans-serif, system-ui, sans-serif;*/
|
||||
--font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
|
||||
/*--font-display: "DM Sans", ui-sans-serif, system-ui, sans-serif;*/
|
||||
--font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
|
||||
|
||||
--color-brand: #18c28a;
|
||||
--color-brand-light: #69cba7;
|
||||
|
||||
--text-h1: 60px;
|
||||
--text-h2: 48px;
|
||||
--text-h3: 36px;
|
||||
--text-h4: 26px;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
BASE
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
@layer base {
|
||||
body {
|
||||
background-color: theme(colors.neutral.200);
|
||||
font-family: var(--font-sans);
|
||||
font-size: 18px;
|
||||
line-height: 1.389;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* Browsers don't give <button> a pointer cursor by default (unlike <a>),
|
||||
and Tailwind's Preflight stopped forcing it a few versions back — so
|
||||
every button sitewide needs it set explicitly, once, here. */
|
||||
button:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* <turbo-frame> is a custom element — inline by default. Give it a box so
|
||||
the grid it wraps on the category page lays out normally. */
|
||||
turbo-frame {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
COMPONENTS
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
@layer components {
|
||||
/* ── Nav link — only the span underline-slide animation ──────── */
|
||||
.nav-link span {
|
||||
display: inline-block;
|
||||
background-image: linear-gradient(currentColor, currentColor);
|
||||
background-position: 0 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 0 5px;
|
||||
transition: background-size 0.35s cubic-bezier(0.61, 1, 0.88, 1);
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.nav-link:hover span,
|
||||
.nav-link.is-active span {
|
||||
background-size: 100% 5px;
|
||||
}
|
||||
|
||||
/* ── Nav dropdown ─────────────────────────────────────────────── */
|
||||
.nav-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: -24px;
|
||||
min-width: 220px;
|
||||
background-color: theme(colors.neutral.200);
|
||||
border: 1px solid #000;
|
||||
border-top: none;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-4px);
|
||||
transition:
|
||||
opacity 0.2s ease,
|
||||
transform 0.2s ease,
|
||||
visibility 0.2s ease;
|
||||
}
|
||||
|
||||
.group:hover .nav-dropdown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0px);
|
||||
}
|
||||
|
||||
.nav-dropdown a {
|
||||
display: block;
|
||||
padding: 10px 20px;
|
||||
font-family: var(--font-sans);
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.nav-dropdown a:hover {
|
||||
background-color: #000;
|
||||
color: theme(colors.neutral.200);
|
||||
}
|
||||
|
||||
/* ── Hero star — same burst shape/spin as back-to-top, always on ─ */
|
||||
.rotating-star {
|
||||
transform-origin: center;
|
||||
animation: spin 7s infinite linear;
|
||||
}
|
||||
|
||||
/* ── Back to top ──────────────────────────────────────────────── */
|
||||
.back-to-top {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition:
|
||||
opacity 0.15s ease,
|
||||
visibility 0s 0.15s;
|
||||
}
|
||||
|
||||
.back-to-top.is-visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.back-to-top-shape path {
|
||||
fill: theme(colors.brand-light);
|
||||
transform-origin: center;
|
||||
animation: spin 7s infinite linear;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
|
||||
.back-to-top a:hover .back-to-top-shape path {
|
||||
animation-play-state: running;
|
||||
}
|
||||
|
||||
.back-to-top-arrow path {
|
||||
transition: transform 0.5s cubic-bezier(0.39, 0.1, 0, 0.98);
|
||||
}
|
||||
|
||||
.back-to-top a:hover .back-to-top-arrow path {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
/* ── Product lightbox (popover) ──────────────────────────────── */
|
||||
.product-lightbox {
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin: 0;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition:
|
||||
opacity 0.3s ease,
|
||||
display 0.3s allow-discrete,
|
||||
overlay 0.3s allow-discrete;
|
||||
}
|
||||
|
||||
.product-lightbox:popover-open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.product-lightbox:popover-open {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.product-lightbox::backdrop {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
transition:
|
||||
background-color 0.3s ease,
|
||||
display 0.3s allow-discrete,
|
||||
overlay 0.3s allow-discrete;
|
||||
}
|
||||
|
||||
.product-lightbox:popover-open::backdrop {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.product-lightbox:popover-open::backdrop {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Shared underline-slide animation ────────────────────────── */
|
||||
.underline-slide {
|
||||
background-image: linear-gradient(currentColor, currentColor);
|
||||
background-position: 0 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 0 var(--slide-h, 2px);
|
||||
transition: background-size 0.35s cubic-bezier(0.61, 1, 0.88, 1);
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.underline-slide:hover,
|
||||
.underline-slide.is-active {
|
||||
background-size: 100% var(--slide-h, 2px);
|
||||
}
|
||||
|
||||
/* ── Lightbox arrows + close ─────────────────────────────────── */
|
||||
.lightbox-arrow svg {
|
||||
transition: transform 0.25s cubic-bezier(0.39, 0.1, 0, 0.98);
|
||||
}
|
||||
|
||||
.lightbox-arrow[aria-label="Previous image"]:hover svg {
|
||||
transform: translateX(-6px);
|
||||
}
|
||||
|
||||
.lightbox-arrow[aria-label="Next image"]:hover svg {
|
||||
transform: translateX(6px);
|
||||
}
|
||||
|
||||
.lightbox-close svg {
|
||||
transition: stroke 0.2s ease;
|
||||
}
|
||||
|
||||
.lightbox-close:hover svg {
|
||||
stroke: theme(colors.brand);
|
||||
}
|
||||
|
||||
/* ── Gallery arrows ──────────────────────────────────────────── */
|
||||
.gallery-arrow svg {
|
||||
transition: transform 0.25s cubic-bezier(0.39, 0.1, 0, 0.98);
|
||||
}
|
||||
|
||||
.gallery-arrow:first-child:hover svg {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
.gallery-arrow:last-child:hover svg {
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
/* ── Checkbox ────────────────────────────────────────────────── */
|
||||
.checkbox:checked::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 2px;
|
||||
background: theme(colors.brand);
|
||||
}
|
||||
|
||||
/* ── Color swatches ───────────────────────────────────────────── */
|
||||
.color-swatch {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 1px solid #000;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
transition: border-width 0.1s ease;
|
||||
}
|
||||
|
||||
.color-swatch.is-selected {
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
/* ── Button — ::before is the button bg, ::after is the shadow ── */
|
||||
.btn-primary::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-color: theme(colors.neutral.200);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.btn-primary::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-color: #000;
|
||||
z-index: -1;
|
||||
transform: translate(10px, 10px);
|
||||
transition: transform 0.35s cubic-bezier(0.2, 0.78, 0.12, 0.86);
|
||||
}
|
||||
|
||||
.btn-primary:hover::after {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
|
||||
.text-dance {
|
||||
display: inline-block;
|
||||
font-weight: inherit;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.text-dance::before {
|
||||
content: attr(data-text);
|
||||
display: block;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
font-weight: 800;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.is-visible .text-dance {
|
||||
animation: text-dance 0.8s ease 3 forwards;
|
||||
animation-delay: var(--dance-delay, 0s);
|
||||
}
|
||||
|
||||
/* Typography for markdown rendered from Stoic legal-page bodies (h1.h6, p, lists,
|
||||
links, tables) — a plain set of descendant selectors, not expressible as
|
||||
utilities on the wrapper alone since the markup itself is generated by Str::markdown(). */
|
||||
.legal-content {
|
||||
@apply text-neutral-700;
|
||||
}
|
||||
|
||||
.legal-content > * + * {
|
||||
@apply mt-6;
|
||||
}
|
||||
|
||||
.legal-content h2 {
|
||||
@apply font-display text-2xl font-bold text-black;
|
||||
}
|
||||
|
||||
.legal-content h3 {
|
||||
@apply font-display text-xl font-bold text-black;
|
||||
}
|
||||
|
||||
.legal-content ul,
|
||||
.legal-content ol {
|
||||
@apply ml-6 space-y-2;
|
||||
}
|
||||
|
||||
.legal-content ul {
|
||||
@apply list-disc;
|
||||
}
|
||||
|
||||
.legal-content ol {
|
||||
@apply list-decimal;
|
||||
}
|
||||
|
||||
.legal-content a {
|
||||
@apply underline hover:text-black;
|
||||
}
|
||||
|
||||
.legal-content strong {
|
||||
@apply font-bold text-black;
|
||||
}
|
||||
|
||||
.legal-content table {
|
||||
@apply w-full border-collapse text-left text-sm;
|
||||
}
|
||||
|
||||
.legal-content th,
|
||||
.legal-content td {
|
||||
@apply border border-neutral-300 px-3 py-2;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes text-dance {
|
||||
0%, 60% { font-weight: inherit; font-style: normal; }
|
||||
70%, 100% { font-weight: 800; font-style: italic; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
/* ── Dropdown (Popover API) ──────────────────────────────────── */
|
||||
/* The panel is a [popover] → it renders in the top layer, so its
|
||||
containing block is the viewport, not the .dropdown wrapper, and
|
||||
CSS alone can't tie it to the trigger (anchor positioning isn't
|
||||
everywhere yet). The `dropdown` Stimulus controller measures the
|
||||
trigger on open and writes --dropdown-top/left/width here; the
|
||||
open/close animation below stays pure CSS. Opens on a click, so
|
||||
animating transform + opacity is CLS-safe. */
|
||||
.dropdown-panel {
|
||||
top: var(--dropdown-top, 0);
|
||||
left: var(--dropdown-left, 0);
|
||||
min-width: var(--dropdown-width, 0);
|
||||
|
||||
opacity: 0;
|
||||
transform: translateY(-4px);
|
||||
transition:
|
||||
opacity 0.2s ease,
|
||||
transform 0.2s ease,
|
||||
display 0.2s allow-discrete,
|
||||
overlay 0.2s allow-discrete;
|
||||
}
|
||||
|
||||
.dropdown-panel:popover-open {
|
||||
opacity: 1;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.dropdown-panel:popover-open {
|
||||
opacity: 0;
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Caret flips while the panel is open — :has() is the only route
|
||||
back up from the popover's :popover-open state to the caret. */
|
||||
.dropdown:has(.dropdown-panel:popover-open) .dropdown-caret {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/* manrope-300 - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-300.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* manrope-regular - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-regular.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* manrope-500 - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-500.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* manrope-600 - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-600.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* manrope-700 - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-700.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
/* manrope-800 - greek_latin */
|
||||
@font-face {
|
||||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
|
||||
font-family: "Manrope";
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
src: url("/fonts/manrope/manrope-v20-greek_latin-800.woff2")
|
||||
format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
|
||||
}
|
||||
+17
-1
@@ -1 +1,17 @@
|
||||
import './bootstrap';
|
||||
import "./bootstrap";
|
||||
import "./utils/strip-accents";
|
||||
import "./utils/refresh-scroll";
|
||||
|
||||
// Frames only — no site-wide Turbo Drive. <turbo-frame> navigations still work
|
||||
// (that's how the category listing reloads); every other link and form on the
|
||||
// site keeps its normal full-page browser behaviour.
|
||||
import "@hotwired/turbo";
|
||||
window.Turbo.session.drive = false;
|
||||
|
||||
import { Application } from "@hotwired/stimulus";
|
||||
import { registerControllers } from "./stimulus/index";
|
||||
|
||||
const application = Application.start();
|
||||
application.debug = false;
|
||||
|
||||
registerControllers(application);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
static classes = ['visible']
|
||||
|
||||
connect() {
|
||||
this.observer = new IntersectionObserver(([entry]) => {
|
||||
if (!entry.isIntersecting) return
|
||||
|
||||
this.element.classList.add(this.visibleClass)
|
||||
this.observer.disconnect()
|
||||
}, { threshold: 0.3 })
|
||||
|
||||
this.observer.observe(this.element)
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.observer?.disconnect()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
// Submits the host <form> a short beat after a control inside it changes,
|
||||
// coalescing a burst — rapid slider nudges, or holding an arrow key on a range
|
||||
// input — into a single submit. Wire it on the <form>:
|
||||
//
|
||||
// <form data-controller="auto-submit"
|
||||
// data-action="change->auto-submit#submit range-slider:change->auto-submit#submit"
|
||||
// data-auto-submit-delay-value="300"> (delay optional, ms)
|
||||
//
|
||||
// `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.
|
||||
export default class extends Controller {
|
||||
static values = { delay: { type: Number, default: 300 } }
|
||||
|
||||
submit() {
|
||||
clearTimeout(this.#timer)
|
||||
this.#timer = setTimeout(() => this.element.requestSubmit(), this.delayValue)
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
clearTimeout(this.#timer)
|
||||
}
|
||||
|
||||
#timer
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
this.scrollHandler = this.onScroll.bind(this)
|
||||
window.addEventListener('scroll', this.scrollHandler, { passive: true })
|
||||
this.onScroll()
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
window.removeEventListener('scroll', this.scrollHandler)
|
||||
}
|
||||
|
||||
onScroll() {
|
||||
this.element.classList.toggle('is-visible', window.scrollY > 300)
|
||||
}
|
||||
|
||||
scrollToTop(e) {
|
||||
e.preventDefault()
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['slide']
|
||||
static values = { index: { type: Number, default: 0 } }
|
||||
|
||||
connect() {
|
||||
this.showSlide()
|
||||
}
|
||||
|
||||
next() {
|
||||
this.indexValue = (this.indexValue + 1) % this.slideTargets.length
|
||||
}
|
||||
|
||||
prev() {
|
||||
this.indexValue = (this.indexValue - 1 + this.slideTargets.length) % this.slideTargets.length
|
||||
}
|
||||
|
||||
indexValueChanged() {
|
||||
this.showSlide()
|
||||
}
|
||||
|
||||
showSlide() {
|
||||
this.slideTargets.forEach((slide, i) => {
|
||||
slide.classList.toggle('hidden', i !== this.indexValue)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
// Positions the popover panel directly under its trigger.
|
||||
//
|
||||
// A [popover] renders in the top layer, so its containing block is the
|
||||
// viewport, not the .dropdown wrapper — CSS alone can't tie it to the trigger
|
||||
// without anchor positioning, which isn't in every browser yet. So on each
|
||||
// open we measure the trigger and write the geometry to CSS custom properties
|
||||
// that .dropdown-panel consumes (top / left / min-width). The open/close
|
||||
// animation stays entirely in CSS; the controller only feeds it three numbers.
|
||||
export default class extends Controller {
|
||||
static targets = ['trigger', 'panel']
|
||||
|
||||
|
||||
|
||||
// Wired to `click->dropdown#position` on the trigger, which also fires for
|
||||
// keyboard activation (Enter/Space on a <button>), so this runs before the
|
||||
// native popover toggle paints the panel.
|
||||
position() {
|
||||
const rect = this.triggerTarget.getBoundingClientRect()
|
||||
const style = this.panelTarget.style
|
||||
|
||||
style.setProperty('--dropdown-top', `${rect.bottom + window.scrollY}px`)
|
||||
style.setProperty('--dropdown-left', `${rect.left + window.scrollX}px`)
|
||||
style.setProperty('--dropdown-width', `${rect.width}px`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Register all Stimulus controllers here.
|
||||
// Example:
|
||||
// import HelloController from './controllers/hello_controller';
|
||||
// application.register('hello', HelloController);
|
||||
|
||||
import AppearController from './appear-controller'
|
||||
import AutoSubmitController from './auto-submit-controller'
|
||||
import BackToTopController from './back-to-top-controller'
|
||||
import CarouselController from './carousel-controller'
|
||||
import DropdownController from './dropdown-controller'
|
||||
import ProductFormController from './product-form-controller'
|
||||
import ProductGalleryController from './product-gallery-controller'
|
||||
import QuantityController from './quantity-controller'
|
||||
import RangeSliderController from './range-slider-controller'
|
||||
import StarRatingController from './star-rating-controller'
|
||||
import TabsController from './tabs-controller'
|
||||
|
||||
export function registerControllers(application) {
|
||||
application.register('appear', AppearController)
|
||||
application.register('auto-submit', AutoSubmitController)
|
||||
application.register('back-to-top', BackToTopController)
|
||||
application.register('carousel', CarouselController)
|
||||
application.register('dropdown', DropdownController)
|
||||
application.register('product-form', ProductFormController)
|
||||
application.register('product-gallery', ProductGalleryController)
|
||||
application.register('quantity', QuantityController)
|
||||
application.register('range-slider', RangeSliderController)
|
||||
application.register('star-rating', StarRatingController)
|
||||
application.register('tabs', TabsController)
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
import { formatPrice } from '../utils/format-price'
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['price', 'image', 'swatch', 'colorName']
|
||||
static values = { variants: Array, selected: Number }
|
||||
|
||||
connect() {
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const urlId = parseInt(params.get('variant'))
|
||||
const defaultId = this.variantsValue[0]?.id
|
||||
|
||||
this.selectedValue = urlId && this.variantsValue.find(v => v.id === urlId)
|
||||
? urlId
|
||||
: defaultId
|
||||
}
|
||||
|
||||
selectVariant(event) {
|
||||
const id = parseInt(event.currentTarget.dataset.variantId)
|
||||
this.selectedValue = id
|
||||
|
||||
const url = new URL(window.location)
|
||||
url.searchParams.set('variant', id)
|
||||
window.history.pushState({}, '', url)
|
||||
}
|
||||
|
||||
selectedValueChanged(id) {
|
||||
if (!id) return
|
||||
|
||||
const variant = this.variantsValue.find(v => v.id === id)
|
||||
if (!variant) return
|
||||
|
||||
if (this.hasPriceTarget && variant.price !== null) {
|
||||
this.priceTarget.textContent = formatPrice(variant.price)
|
||||
}
|
||||
|
||||
if (this.hasImageTarget && variant.image) {
|
||||
this.imageTarget.src = variant.image
|
||||
}
|
||||
|
||||
this.swatchTargets.forEach(swatch => {
|
||||
const isSelected = parseInt(swatch.dataset.variantId) === id
|
||||
swatch.classList.toggle('is-selected', isSelected)
|
||||
swatch.setAttribute('aria-pressed', String(isSelected))
|
||||
|
||||
if (isSelected && this.hasColorNameTarget) {
|
||||
this.colorNameTarget.textContent = swatch.getAttribute('aria-label')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
import { Controller } from "@hotwired/stimulus";
|
||||
|
||||
const SCROLL_STEP = 1;
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ["main", "thumb", "track", "lightbox", "lightboxImage", "lightboxCounter"];
|
||||
|
||||
connect() {
|
||||
this.offset = 0;
|
||||
this.lightboxIndex = 0;
|
||||
this.#syncHeight();
|
||||
|
||||
this.mainTarget.addEventListener("load", () => this.#syncHeight());
|
||||
|
||||
this._onKeydown = this.#handleKeydown.bind(this);
|
||||
document.addEventListener("keydown", this._onKeydown);
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
document.removeEventListener("keydown", this._onKeydown);
|
||||
}
|
||||
|
||||
select(event) {
|
||||
const btn = event.currentTarget;
|
||||
this.#setThumb(btn);
|
||||
this.lightboxIndex = this.thumbTargets.indexOf(btn);
|
||||
}
|
||||
|
||||
scrollUp() {
|
||||
this.offset = Math.max(0, this.offset - SCROLL_STEP);
|
||||
this.#applyScroll();
|
||||
}
|
||||
|
||||
scrollDown() {
|
||||
this.offset = Math.min(this.thumbTargets.length - 1, this.offset + SCROLL_STEP);
|
||||
this.#applyScroll();
|
||||
}
|
||||
|
||||
closeLightboxOnBackdrop(event) {
|
||||
// Only close if clicking directly on the backdrop (the popover div itself),
|
||||
// not on the image, arrows, close button, or counter
|
||||
if (event.target === this.lightboxTarget) {
|
||||
this.lightboxTarget.hidePopover();
|
||||
}
|
||||
}
|
||||
|
||||
noop(event) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
openLightbox() {
|
||||
this.#updateLightbox(this.lightboxIndex);
|
||||
this.lightboxTarget.showPopover();
|
||||
}
|
||||
|
||||
prevImage() {
|
||||
const next = (this.lightboxIndex - 1 + this.thumbTargets.length) % this.thumbTargets.length;
|
||||
this.#updateLightbox(next);
|
||||
}
|
||||
|
||||
nextImage() {
|
||||
const next = (this.lightboxIndex + 1) % this.thumbTargets.length;
|
||||
this.#updateLightbox(next);
|
||||
}
|
||||
|
||||
// ── Private ────────────────────────────────────────────────────
|
||||
|
||||
#updateLightbox(index) {
|
||||
this.lightboxIndex = index;
|
||||
const thumb = this.thumbTargets[index];
|
||||
if (!thumb) return;
|
||||
|
||||
this.lightboxImageTarget.src = thumb.dataset.src;
|
||||
this.lightboxImageTarget.alt = thumb.dataset.alt;
|
||||
this.lightboxCounterTarget.textContent =
|
||||
`${index + 1} of ${this.thumbTargets.length}`;
|
||||
}
|
||||
|
||||
#setThumb(btn) {
|
||||
const src = btn.dataset.src;
|
||||
const alt = btn.dataset.alt;
|
||||
|
||||
this.mainTarget.src = src;
|
||||
this.mainTarget.alt = alt;
|
||||
|
||||
this.thumbTargets.forEach((t) => {
|
||||
const active = t === btn;
|
||||
t.classList.toggle("border-2", active);
|
||||
t.classList.toggle("border-1", !active);
|
||||
t.setAttribute("aria-pressed", String(active));
|
||||
});
|
||||
}
|
||||
|
||||
#applyScroll() {
|
||||
if (!this.thumbTargets.length) return;
|
||||
const thumbHeight = this.thumbTargets[0].offsetHeight;
|
||||
const gap = 16; // gap-4 = 16px
|
||||
this.trackTarget.scrollTop = this.offset * (thumbHeight + gap);
|
||||
}
|
||||
|
||||
#syncHeight() {
|
||||
const h = this.mainTarget.offsetHeight;
|
||||
if (h > 0) {
|
||||
this.trackTarget.style.maxHeight = h + "px";
|
||||
}
|
||||
}
|
||||
|
||||
#handleKeydown(e) {
|
||||
if (!this.hasLightboxTarget) return;
|
||||
if (!this.lightboxTarget.matches(":popover-open")) return;
|
||||
|
||||
if (e.key === "ArrowLeft") { e.preventDefault(); this.prevImage(); }
|
||||
if (e.key === "ArrowRight") { e.preventDefault(); this.nextImage(); }
|
||||
if (e.key === "Escape") { this.lightboxTarget.hidePopover(); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['input', 'decrement']
|
||||
static values = { min: { type: Number, default: 1 } }
|
||||
|
||||
connect() {
|
||||
this.#updateDecrement()
|
||||
}
|
||||
|
||||
increment() {
|
||||
this.#setValue(this.#current + 1)
|
||||
}
|
||||
|
||||
decrement() {
|
||||
this.#setValue(this.#current - 1)
|
||||
}
|
||||
|
||||
clamp() {
|
||||
this.#setValue(this.#current)
|
||||
}
|
||||
|
||||
get #current() {
|
||||
return parseInt(this.inputTarget.value, 10) || this.minValue
|
||||
}
|
||||
|
||||
#setValue(val) {
|
||||
const clamped = Math.max(this.minValue, val)
|
||||
this.inputTarget.value = clamped
|
||||
this.#updateDecrement()
|
||||
this.inputTarget.dispatchEvent(new Event('quantity:change', { bubbles: true }))
|
||||
}
|
||||
|
||||
#updateDecrement() {
|
||||
const atMin = this.#current <= this.minValue
|
||||
this.decrementTarget.disabled = atMin
|
||||
this.decrementTarget.setAttribute('aria-disabled', atMin)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
// Dual-thumb range slider.
|
||||
//
|
||||
// Two real <input type="range"> elements stay authoritative — they carry the
|
||||
// value, the form data, native keyboard support and the no-JS fallback. On
|
||||
// connect this controller hides their <label>s and mirrors their state onto a
|
||||
// presentational track: a baseline, a filled span between the two carets, and
|
||||
// the carets themselves, all positioned with the --min / --max percentage
|
||||
// custom properties written on the track element.
|
||||
//
|
||||
// Pointer drag moves the carets (writing back to the inputs); the keyboard
|
||||
// drives the inputs directly. Values can't cross — min stays one step below
|
||||
// max and vice versa. Emits `range-slider:input` while dragging and
|
||||
// `range-slider:change` on commit, both with { min, max }.
|
||||
export default class extends Controller {
|
||||
static targets = ['minInput', 'maxInput', 'field', 'track', 'minThumb', 'maxThumb', 'output']
|
||||
static values = {
|
||||
min: Number,
|
||||
max: Number,
|
||||
step: { type: Number, default: 1 },
|
||||
prefix: { type: String, default: '' },
|
||||
suffix: { type: String, default: '' },
|
||||
separator: { type: String, default: ' – ' },
|
||||
}
|
||||
|
||||
connect() {
|
||||
this.#clamp()
|
||||
this.fieldTargets.forEach((field) => field.classList.add('sr-only'))
|
||||
this.#render()
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.#stopDrag()
|
||||
}
|
||||
|
||||
// ── keyboard / programmatic ──────────────────────────────────────
|
||||
|
||||
onInput(event) {
|
||||
this.#clamp(this.#side(event.target))
|
||||
this.#render()
|
||||
this.#emit('input')
|
||||
}
|
||||
|
||||
onChange(event) {
|
||||
this.#clamp(this.#side(event.target))
|
||||
this.#render()
|
||||
this.#emit('change')
|
||||
}
|
||||
|
||||
// The real inputs are visually hidden, so mirror their focus ring onto
|
||||
// the matching caret to keep a visible focus indicator for keyboard use.
|
||||
syncFocus(event) {
|
||||
const thumb = event.target === this.minInputTarget ? this.minThumbTarget : this.maxThumbTarget
|
||||
thumb.classList.toggle('ring-2', event.type === 'focus')
|
||||
thumb.classList.toggle('ring-black', event.type === 'focus')
|
||||
}
|
||||
|
||||
// ── pointer drag ────────────────────────────────────────────────────
|
||||
|
||||
thumbPointerDown(event) {
|
||||
const input = event.currentTarget === this.minThumbTarget ? this.minInputTarget : this.maxInputTarget
|
||||
this.#startDrag(event, input)
|
||||
}
|
||||
|
||||
trackPointerDown(event) {
|
||||
if (event.target.closest('button')) return // a caret handles its own press
|
||||
|
||||
const value = this.#valueAt(event.clientX)
|
||||
const input = Math.abs(value - this.#lo) <= Math.abs(value - this.#hi)
|
||||
? this.minInputTarget
|
||||
: this.maxInputTarget
|
||||
|
||||
input.value = value
|
||||
this.#clamp(this.#side(input))
|
||||
this.#render()
|
||||
this.#startDrag(event, input)
|
||||
}
|
||||
|
||||
// ── internals ──────────────────────────────────────────────────────
|
||||
|
||||
#startDrag(event, input) {
|
||||
event.preventDefault()
|
||||
this.#stopDrag()
|
||||
const side = this.#side(input)
|
||||
this.#onMove = (e) => {
|
||||
input.value = this.#valueAt(e.clientX)
|
||||
this.#clamp(side)
|
||||
this.#render()
|
||||
this.#emit('input')
|
||||
}
|
||||
this.#onUp = () => {
|
||||
this.#stopDrag()
|
||||
this.#emit('change')
|
||||
}
|
||||
window.addEventListener('pointermove', this.#onMove)
|
||||
window.addEventListener('pointerup', this.#onUp)
|
||||
}
|
||||
|
||||
#side(input) {
|
||||
return input === this.maxInputTarget ? 'max' : 'min'
|
||||
}
|
||||
|
||||
#stopDrag() {
|
||||
if (this.#onMove) window.removeEventListener('pointermove', this.#onMove)
|
||||
if (this.#onUp) window.removeEventListener('pointerup', this.#onUp)
|
||||
this.#onMove = this.#onUp = null
|
||||
}
|
||||
|
||||
get #lo() { return Number(this.minInputTarget.value) }
|
||||
get #hi() { return Number(this.maxInputTarget.value) }
|
||||
|
||||
// Keep both thumbs inside the group bounds and stop them crossing. When a
|
||||
// thumb is being moved (`side`), only that one gives way, so the other
|
||||
// stays put instead of being dragged along.
|
||||
#clamp(side = null) {
|
||||
const gap = this.stepValue
|
||||
let lo = Math.max(this.minValue, Math.min(this.maxValue, Number(this.minInputTarget.value)))
|
||||
let hi = Math.max(this.minValue, Math.min(this.maxValue, Number(this.maxInputTarget.value)))
|
||||
|
||||
if (side === 'max') hi = Math.max(hi, lo + gap)
|
||||
else if (side === 'min') lo = Math.min(lo, hi - gap)
|
||||
else if (lo > hi - gap) lo = hi - gap
|
||||
|
||||
this.minInputTarget.value = lo
|
||||
this.maxInputTarget.value = hi
|
||||
}
|
||||
|
||||
#valueAt(clientX) {
|
||||
const rect = this.trackTarget.getBoundingClientRect()
|
||||
const ratio = rect.width ? Math.max(0, Math.min(1, (clientX - rect.left) / rect.width)) : 0
|
||||
const raw = this.minValue + ratio * (this.maxValue - this.minValue)
|
||||
const step = this.stepValue
|
||||
return Math.round(raw / step) * step
|
||||
}
|
||||
|
||||
#percent(value) {
|
||||
const span = this.maxValue - this.minValue
|
||||
return span ? ((value - this.minValue) / span) * 100 : 0
|
||||
}
|
||||
|
||||
#render() {
|
||||
const lo = this.#lo
|
||||
const hi = this.#hi
|
||||
|
||||
this.trackTarget.style.setProperty('--min', `${this.#percent(lo)}%`)
|
||||
this.trackTarget.style.setProperty('--max', `${this.#percent(hi)}%`)
|
||||
|
||||
if (this.hasOutputTarget) {
|
||||
const fmt = (v) => `${this.prefixValue}${v}${this.suffixValue}`
|
||||
this.outputTarget.textContent = fmt(lo) + this.separatorValue + fmt(hi)
|
||||
}
|
||||
}
|
||||
|
||||
#emit(name) {
|
||||
const detail = { min: this.#lo, max: this.#hi }
|
||||
const key = `${detail.min},${detail.max}`
|
||||
if (name === 'input' && key === this.#lastInputKey) return // no change since last frame
|
||||
this.#lastInputKey = key
|
||||
this.dispatch(name, { detail })
|
||||
}
|
||||
|
||||
#onMove = null
|
||||
#onUp = null
|
||||
#lastInputKey = null
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['star', 'input']
|
||||
static values = { rating: { type: Number, default: 0 } }
|
||||
|
||||
hover(event) {
|
||||
this.#fill(parseInt(event.currentTarget.dataset.value))
|
||||
}
|
||||
|
||||
leave() {
|
||||
this.#fill(this.ratingValue)
|
||||
}
|
||||
|
||||
select(event) {
|
||||
const val = parseInt(event.currentTarget.dataset.value)
|
||||
this.ratingValue = val
|
||||
this.inputTarget.value = val
|
||||
|
||||
this.starTargets.forEach(star => {
|
||||
star.setAttribute('aria-pressed', String(parseInt(star.dataset.value) === val))
|
||||
})
|
||||
}
|
||||
|
||||
#fill(upTo) {
|
||||
this.starTargets.forEach(star => {
|
||||
const filled = parseInt(star.dataset.value) <= upTo
|
||||
star.querySelector('svg').setAttribute('fill', filled ? 'currentColor' : 'none')
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['button', 'panel']
|
||||
|
||||
show(event) {
|
||||
this.#activate(event.currentTarget.dataset.panel)
|
||||
}
|
||||
|
||||
#activate(panelId) {
|
||||
this.buttonTargets.forEach(btn => {
|
||||
const active = btn.dataset.panel === panelId
|
||||
btn.classList.toggle('is-active', active)
|
||||
btn.setAttribute('aria-selected', String(active))
|
||||
})
|
||||
|
||||
this.panelTargets.forEach(panel => {
|
||||
panel.hidden = panel.id !== `tab-panel-${panelId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Mirrors App\Support\Price::format() — keep both in sync. Greek formatting:
|
||||
// comma as the decimal separator, dot as the thousands separator, and no
|
||||
// decimals shown unless the amount actually needs them.
|
||||
// 19.00 -> "€19", 19.50 -> "€19,5", 19.55 -> "€19,55"
|
||||
export function formatPrice(amount, currency = '€') {
|
||||
if (amount === null || amount === undefined) return null
|
||||
|
||||
const value = Math.round(parseFloat(amount) * 100) / 100
|
||||
const cents = Math.round(value * 100)
|
||||
|
||||
const decimals = cents % 100 === 0 ? 0 : (cents % 10 === 0 ? 1 : 2)
|
||||
|
||||
const formatted = value.toLocaleString('el-GR', {
|
||||
minimumFractionDigits: decimals,
|
||||
maximumFractionDigits: decimals,
|
||||
})
|
||||
|
||||
return currency + formatted
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Make a refresh land back where you were — accurately.
|
||||
//
|
||||
// Turbo Drive is off site-wide (see app.js), so a refresh is a full browser
|
||||
// load. The browser restores the scroll position early in that load — before
|
||||
// the Manrope web fonts swap in and reflow the header, <h1> and result count
|
||||
// above the product grid — so it settles a bit too low. We record the position
|
||||
// ourselves and re-apply it once the layout has actually stopped moving.
|
||||
//
|
||||
// Separately: drop focus on the way out. Otherwise the browser re-focuses
|
||||
// whatever filter control was active and scrolls it into view on reload, and
|
||||
// that sidebar stacks below the grid on narrow screens — hence the jump to the
|
||||
// bottom.
|
||||
//
|
||||
// The real fix for the drift is preloading the above-the-fold font weights so
|
||||
// there's no reflow to chase; this keeps the restore correct until then, and
|
||||
// harmless after.
|
||||
|
||||
const key = 'scrollY:' + location.pathname + location.search
|
||||
|
||||
let frame = 0
|
||||
window.addEventListener(
|
||||
'scroll',
|
||||
() => {
|
||||
if (frame) return
|
||||
frame = requestAnimationFrame(() => {
|
||||
frame = 0
|
||||
try {
|
||||
sessionStorage.setItem(key, String(Math.round(window.scrollY)))
|
||||
} catch {}
|
||||
})
|
||||
},
|
||||
{ passive: true },
|
||||
)
|
||||
|
||||
window.addEventListener('pagehide', () => {
|
||||
const el = document.activeElement
|
||||
if (el && el !== document.body) el.blur()
|
||||
})
|
||||
|
||||
// Only reloads and back/forward should resume a position; a fresh visit to the
|
||||
// page starts where it naturally would.
|
||||
const [nav] = performance.getEntriesByType('navigation')
|
||||
if (nav && (nav.type === 'reload' || nav.type === 'back_forward')) {
|
||||
let saved = null
|
||||
try {
|
||||
saved = sessionStorage.getItem(key)
|
||||
} catch {}
|
||||
|
||||
if (saved !== null) {
|
||||
const y = Number(saved)
|
||||
const apply = () => window.scrollTo(0, y)
|
||||
|
||||
window.addEventListener(
|
||||
'load',
|
||||
() => {
|
||||
apply()
|
||||
// Fonts (and any late above-the-fold image) can still nudge
|
||||
// layout a frame or two after load — re-apply once they settle.
|
||||
document.fonts?.ready.then(() => requestAnimationFrame(apply))
|
||||
},
|
||||
{ once: true },
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Strip Greek tonos (accent marks) from text inside elements that have the
|
||||
* `uppercase` CSS class.
|
||||
*
|
||||
* In Greek typography, capital letters do not carry the tonos accent.
|
||||
* CSS `text-transform: uppercase` uppercases the glyph but leaves the tonos
|
||||
* in place, producing visually incorrect output (e.g. Ά instead of Α).
|
||||
* This utility rewrites the text nodes directly so the rendered result is clean.
|
||||
*
|
||||
* The diaeresis (ϊ, ϋ) is preserved — it is retained in Greek uppercase.
|
||||
*
|
||||
* Runs once on DOMContentLoaded and then watches for dynamically added nodes
|
||||
* via MutationObserver.
|
||||
*/
|
||||
|
||||
const ACCENT_MAP = {
|
||||
// Lowercase with tonos → without tonos
|
||||
'ά': 'α', 'έ': 'ε', 'ή': 'η', 'ί': 'ι', 'ό': 'ο', 'ύ': 'υ', 'ώ': 'ω',
|
||||
// Uppercase with tonos → without tonos (for already-uppercased text)
|
||||
'Ά': 'Α', 'Έ': 'Ε', 'Ή': 'Η', 'Ί': 'Ι', 'Ό': 'Ο', 'Ύ': 'Υ', 'Ώ': 'Ω',
|
||||
// Combined tonos + diaeresis → diaeresis only (preserve the diaeresis)
|
||||
'ΐ': 'ϊ', 'ΰ': 'ϋ',
|
||||
}
|
||||
|
||||
const ACCENT_RE = /[άέήίόύώΆΈΉΊΌΎΏΐΰ]/g
|
||||
|
||||
function stripAccents(str) {
|
||||
return str.replace(ACCENT_RE, c => ACCENT_MAP[c] ?? c)
|
||||
}
|
||||
|
||||
function processElement(el) {
|
||||
const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT)
|
||||
let node
|
||||
while ((node = walker.nextNode())) {
|
||||
const val = node.nodeValue
|
||||
if (val && /[άέήίόύώΆΈΉΊΌΎΏΐΰ]/.test(val)) {
|
||||
node.nodeValue = stripAccents(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyToPage() {
|
||||
document.querySelectorAll('.uppercase').forEach(processElement)
|
||||
}
|
||||
|
||||
// ── Initial pass ──────────────────────────────────────────────────────────────
|
||||
document.addEventListener('DOMContentLoaded', applyToPage)
|
||||
|
||||
// ── Observe dynamic additions ─────────────────────────────────────────────────
|
||||
const observer = new MutationObserver(mutations => {
|
||||
for (const { addedNodes } of mutations) {
|
||||
for (const node of addedNodes) {
|
||||
if (node.nodeType !== Node.ELEMENT_NODE) continue
|
||||
if (node.classList?.contains('uppercase')) processElement(node)
|
||||
node.querySelectorAll?.('.uppercase').forEach(processElement)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
observer.observe(document.body, { childList: true, subtree: true })
|
||||
@@ -0,0 +1,138 @@
|
||||
---
|
||||
name: "Πολιτική Cookies"
|
||||
slug: "cookies-policy"
|
||||
|
||||
meta_title: ""
|
||||
meta_description: ""
|
||||
og_image: ""
|
||||
noindex: true
|
||||
|
||||
---
|
||||
|
||||
|
||||
Η παρούσα Πολιτική Cookies εξηγεί πώς η 3DEALER χρησιμοποιεί cookies και παρόμοιες τεχνολογίες κατά την επίσκεψή σας στο ηλεκτρονικό κατάστημα.
|
||||
|
||||
## 1. Τι είναι τα cookies
|
||||
|
||||
Τα cookies είναι μικρά αρχεία κειμένου που αποθηκεύονται στη συσκευή σας όταν επισκέπτεστε έναν ιστότοπο. Χρησιμοποιούνται για την ορθή λειτουργία του ιστότοπου, την αποθήκευση προτιμήσεων, τη συλλογή στατιστικών στοιχείων και, όπου επιτρέπεται, την προβολή ή μέτρηση διαφημίσεων.
|
||||
|
||||
Εκτός από cookies, ενδέχεται να χρησιμοποιούμε και παρόμοιες τεχνολογίες, όπως pixels και tags.
|
||||
|
||||
## 2. Ποια cookies χρησιμοποιούμε
|
||||
|
||||
Η 3DEALER χρησιμοποιεί διαφορετικές κατηγορίες cookies, ανάλογα με τον σκοπό τους.
|
||||
|
||||
### Απαραίτητα cookies
|
||||
|
||||
Τα απαραίτητα cookies είναι αυτά που απαιτούνται για τη σωστή και ασφαλή λειτουργία του ηλεκτρονικού καταστήματος.
|
||||
|
||||
Μπορούν να χρησιμοποιούνται, μεταξύ άλλων, για:
|
||||
|
||||
* τη λειτουργία του καλαθιού αγορών,
|
||||
* τη διατήρηση της συνεδρίας σας,
|
||||
* τη σύνδεση στον λογαριασμό σας,
|
||||
* την ολοκλήρωση του checkout,
|
||||
* την ασφάλεια του ιστοτόπου,
|
||||
* την αποθήκευση των επιλογών σας σχετικά με τα cookies.
|
||||
|
||||
Τα συγκεκριμένα cookies δεν μπορούν να απενεργοποιηθούν μέσω του μηχανισμού συγκατάθεσης, καθώς χωρίς αυτά ορισμένες βασικές λειτουργίες του ηλεκτρονικού καταστήματος δεν θα είναι διαθέσιμες.
|
||||
|
||||
### Cookies λειτουργικότητας
|
||||
|
||||
Τα cookies λειτουργικότητας χρησιμοποιούνται για την αποθήκευση επιλογών και προτιμήσεων που βελτιώνουν την εμπειρία χρήσης του ηλεκτρονικού καταστήματος.
|
||||
|
||||
**@TODO: Να καταγραφούν τα συγκεκριμένα cookies λειτουργικότητας που χρησιμοποιεί το Boboko/3DEALER.**
|
||||
|
||||
### Cookies Analytics
|
||||
|
||||
Τα cookies analytics χρησιμοποιούνται για να κατανοούμε τον τρόπο με τον οποίο οι επισκέπτες χρησιμοποιούν το ηλεκτρονικό κατάστημα.
|
||||
|
||||
Η 3DEALER χρησιμοποιεί υπηρεσίες όπως το **Google Analytics** και ενδέχεται να χρησιμοποιεί το **Google Tag Manager** για τη διαχείριση των σχετικών tags.
|
||||
|
||||
Οι πληροφορίες που συλλέγονται μπορούν να περιλαμβάνουν στοιχεία όπως:
|
||||
|
||||
* ποιες σελίδες επισκέπτεστε,
|
||||
* πόσο χρόνο παραμένετε στον ιστότοπο,
|
||||
* από ποια σελίδα προέρχεστε,
|
||||
* τη συσκευή και το πρόγραμμα περιήγησης που χρησιμοποιείτε,
|
||||
* γενικές πληροφορίες σχετικά με την αλληλεπίδρασή σας με τον ιστότοπο.
|
||||
|
||||
Τα συγκεκριμένα cookies ενεργοποιούνται μόνο σύμφωνα με τις επιλογές συγκατάθεσής σας, όπου απαιτείται από την ισχύουσα νομοθεσία.
|
||||
|
||||
### Cookies διαφήμισης και marketing
|
||||
|
||||
Η 3DEALER χρησιμοποιεί τεχνολογίες διαφημιστικής μέτρησης και marketing, όπως:
|
||||
|
||||
* **Meta Pixel**
|
||||
* **TikTok Pixel**
|
||||
|
||||
Οι τεχνολογίες αυτές μπορούν να χρησιμοποιούνται για τη μέτρηση της αποτελεσματικότητας των διαφημιστικών ενεργειών, την κατανόηση των αλληλεπιδράσεων με τις διαφημίσεις και, όπου υποστηρίζεται και επιτρέπεται, την προβολή πιο σχετικών διαφημίσεων.
|
||||
|
||||
Τα σχετικά cookies και pixels ενεργοποιούνται μόνο σύμφωνα με τις επιλογές συγκατάθεσής σας, όπου απαιτείται.
|
||||
|
||||
**@TODO: Να επιβεβαιωθούν τα ακριβή Meta/TikTok cookies και events που χρησιμοποιούνται στο production.**
|
||||
|
||||
## 3. Πίνακας cookies
|
||||
|
||||
Ο παρακάτω πίνακας θα πρέπει να ενημερωθεί με βάση τα πραγματικά cookies που χρησιμοποιούνται στο production περιβάλλον.
|
||||
|
||||
| Cookie / Τεχνολογία | Πάροχος | Κατηγορία | Σκοπός | Διάρκεια |
|
||||
| ------------------- | ---------------- | ---------- | ---------------------------------------------- | -------- |
|
||||
| @TODO | Boboko / 3DEALER | Απαραίτητο | Λειτουργία καταστήματος | @TODO |
|
||||
| @TODO | Boboko / 3DEALER | Απαραίτητο | Καλάθι / checkout | @TODO |
|
||||
| @TODO | Google | Analytics | Στατιστικά χρήσης | @TODO |
|
||||
| @TODO | Meta | Marketing | Διαφημιστική μέτρηση | @TODO |
|
||||
| @TODO | TikTok | Marketing | Διαφημιστική μέτρηση | @TODO |
|
||||
| @TODO | hCaptcha | Ασφάλεια | Προστασία από αυτοματοποιημένη/κακόβουλη χρήση | @TODO |
|
||||
|
||||
**@TODO: Ο πίνακας πρέπει να συμπληρωθεί μετά από έλεγχο του production site, ιδανικά με cookie scan.**
|
||||
|
||||
## 4. Συγκατάθεση για τη χρήση cookies
|
||||
|
||||
Κατά την πρώτη επίσκεψή σας στο ηλεκτρονικό κατάστημα, εμφανίζεται μηχανισμός διαχείρισης συγκατάθεσης cookies, μέσω του οποίου μπορείτε να επιλέξετε ποιες κατηγορίες μη απαραίτητων cookies επιτρέπετε.
|
||||
|
||||
Μπορείτε να:
|
||||
|
||||
* αποδεχτείτε όλα τα cookies,
|
||||
* απορρίψετε τα μη απαραίτητα cookies,
|
||||
* επιλέξετε συγκεκριμένες κατηγορίες cookies.
|
||||
|
||||
Τα απαραίτητα cookies παραμένουν ενεργά, καθώς είναι αναγκαία για τη λειτουργία του ηλεκτρονικού καταστήματος.
|
||||
|
||||
Η επιλογή σας αποθηκεύεται και εφαρμόζεται στις επόμενες επισκέψεις σας.
|
||||
|
||||
## 5. Ανάκληση ή αλλαγή συγκατάθεσης
|
||||
|
||||
Μπορείτε να αλλάξετε ή να ανακαλέσετε τη συγκατάθεσή σας για τη χρήση μη απαραίτητων cookies οποιαδήποτε στιγμή.
|
||||
|
||||
**@TODO: Να προστεθεί ο τρόπος με τον οποίο ανοίγει ξανά το cookie preference centre του Boboko, π.χ. μέσω συνδέσμου «Ρυθμίσεις Cookies» στο footer.**
|
||||
|
||||
Η ανάκληση της συγκατάθεσης δεν επηρεάζει τη νομιμότητα της επεξεργασίας που πραγματοποιήθηκε πριν από την ανάκλησή της.
|
||||
|
||||
## 6. Cookies τρίτων
|
||||
|
||||
Ορισμένες από τις υπηρεσίες που χρησιμοποιούμε παρέχονται από τρίτους, όπως η Google, η Meta, η TikTok και η hCaptcha.
|
||||
|
||||
Οι τρίτοι αυτοί πάροχοι ενδέχεται να επεξεργάζονται πληροφορίες που συλλέγονται μέσω cookies ή παρόμοιων τεχνολογιών σύμφωνα με τις δικές τους πολιτικές και τους δικούς τους όρους.
|
||||
|
||||
Η χρήση υπηρεσιών τρίτων μπορεί επίσης να συνεπάγεται διαβίβαση δεδομένων εκτός του Ευρωπαϊκού Οικονομικού Χώρου. Όπου απαιτείται, εφαρμόζονται οι προβλεπόμενες από τη νομοθεσία εγγυήσεις για τη συγκεκριμένη διαβίβαση.
|
||||
|
||||
## 7. Cookies και προσωπικά δεδομένα
|
||||
|
||||
Ορισμένα cookies ή παρόμοιες τεχνολογίες μπορεί να οδηγήσουν σε επεξεργασία πληροφοριών που θεωρούνται προσωπικά δεδομένα.
|
||||
|
||||
Για περισσότερες πληροφορίες σχετικά με τον τρόπο με τον οποίο η 3DEALER συλλέγει και επεξεργάζεται προσωπικά δεδομένα, δείτε την **Πολιτική Απορρήτου**.
|
||||
|
||||
## 8. Ρυθμίσεις του browser
|
||||
|
||||
Μπορείτε επίσης να περιορίσετε ή να διαγράψετε cookies μέσω των ρυθμίσεων του προγράμματος περιήγησής σας.
|
||||
|
||||
Ωστόσο, η απενεργοποίηση ορισμένων cookies ενδέχεται να επηρεάσει τη λειτουργία του ηλεκτρονικού καταστήματος ή να εμποδίσει τη σωστή λειτουργία ορισμένων υπηρεσιών.
|
||||
|
||||
## 9. Τροποποιήσεις της Πολιτικής Cookies
|
||||
|
||||
Η παρούσα Πολιτική Cookies μπορεί να τροποποιείται όταν αλλάζουν οι τεχνολογίες που χρησιμοποιούμε, οι υπηρεσίες του ηλεκτρονικού καταστήματος ή η σχετική νομοθεσία.
|
||||
|
||||
Η πιο πρόσφατη έκδοση θα είναι πάντοτε διαθέσιμη στην ιστοσελίδα της 3DEALER.
|
||||
|
||||
**Τελευταία ενημέρωση:** @TODO
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: "Αρχική"
|
||||
slug: "home"
|
||||
|
||||
meta_title: "3dealer — Ό,τι φαντάζεσαι, τυπωμένο σε 3D"
|
||||
meta_description: "Gaming φιγούρες, κρανία, κλειδοθήκες και ό,τι πιο τρελό σου περνάει απ' το μυαλό. Σχεδιασμένα και τυπωμένα σε 3D, ένα προς ένα."
|
||||
og_image: ""
|
||||
|
||||
trivia_image: "3dealer-clickers-square.jpeg"
|
||||
trivia_body: "Gaming φιγούρες, κρανία, κλειδοθήκες, dark humor και ό,τι πιο τρελό σου περνάει απ' το μυαλό, όλα σχεδιασμένα και τυπωμένα εδώ, στην Ελλάδα."
|
||||
trivia_body_image: "3d-printed-hands-heart-1200.png"
|
||||
classics_title: "Θρυλικά & ασυναγώνιστα"
|
||||
---
|
||||
|
||||
# Content
|
||||
@@ -0,0 +1,202 @@
|
||||
---
|
||||
name: "Πολιτική Απορρήτου"
|
||||
slug: "privacy-policy"
|
||||
|
||||
meta_title: ""
|
||||
meta_description: ""
|
||||
og_image: ""
|
||||
noindex: true
|
||||
|
||||
---
|
||||
|
||||
|
||||
Η 3DEALER («3DEALER», «εμείς», «μας») σέβεται την ιδιωτικότητα των επισκεπτών και των πελατών της και προστατεύει τα προσωπικά τους δεδομένα σύμφωνα με την ισχύουσα νομοθεσία, συμπεριλαμβανομένου του Γενικού Κανονισμού Προστασίας Δεδομένων (ΕΕ) 2016/679 («GDPR») και της σχετικής ελληνικής νομοθεσίας.
|
||||
|
||||
Η παρούσα Πολιτική Απορρήτου εξηγεί ποια προσωπικά δεδομένα συλλέγουμε, για ποιους σκοπούς τα χρησιμοποιούμε, με ποιους μπορεί να τα μοιραζόμαστε και ποια δικαιώματα έχετε.
|
||||
|
||||
## 1. Υπεύθυνος επεξεργασίας
|
||||
|
||||
Υπεύθυνος επεξεργασίας των προσωπικών δεδομένων που συλλέγονται μέσω του ηλεκτρονικού καταστήματος είναι:
|
||||
|
||||
**3DEALER**
|
||||
Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα
|
||||
ΑΦΜ: @TODO
|
||||
ΓΕΜΗ: @TODO
|
||||
Email: [print@3dealer.gr](mailto:print@3dealer.gr)
|
||||
Τηλέφωνο: 6976 443140
|
||||
|
||||
Η 3DEALER καθορίζει τους σκοπούς και τα μέσα επεξεργασίας των προσωπικών δεδομένων των πελατών και χρηστών του ηλεκτρονικού καταστήματος.
|
||||
|
||||
## 2. Ποια δεδομένα συλλέγουμε
|
||||
|
||||
Ανάλογα με τον τρόπο με τον οποίο χρησιμοποιείτε το ηλεκτρονικό κατάστημα, ενδέχεται να συλλέγουμε:
|
||||
|
||||
* ονοματεπώνυμο,
|
||||
* διεύθυνση email,
|
||||
* αριθμό τηλεφώνου,
|
||||
* διεύθυνση αποστολής και χρέωσης,
|
||||
* στοιχεία παραγγελίας και προϊόντων,
|
||||
* στοιχεία που σχετίζονται με την πληρωμή,
|
||||
* στοιχεία επικοινωνίας και το περιεχόμενο μηνυμάτων που μας αποστέλλετε,
|
||||
* στοιχεία λογαριασμού χρήστη,
|
||||
* κριτικές που επιλέγετε να δημοσιεύσετε,
|
||||
* τεχνικά δεδομένα σχετικά με τη χρήση της ιστοσελίδας,
|
||||
* δεδομένα που συλλέγονται μέσω cookies και παρόμοιων τεχνολογιών, σύμφωνα με την Πολιτική Cookies.
|
||||
|
||||
Δεν αποθηκεύουμε τα πλήρη στοιχεία της πιστωτικής ή χρεωστικής σας κάρτας στους διακομιστές της 3DEALER. Οι ηλεκτρονικές πληρωμές πραγματοποιούνται μέσω εξωτερικών παρόχων πληρωμών.
|
||||
|
||||
## 3. Δημιουργία λογαριασμού
|
||||
|
||||
Μπορείτε να δημιουργήσετε λογαριασμό στο ηλεκτρονικό κατάστημα για να διαχειρίζεστε τις παραγγελίες και τα στοιχεία σας.
|
||||
|
||||
Για τη δημιουργία και λειτουργία του λογαριασμού ενδέχεται να επεξεργαζόμαστε στοιχεία όπως το όνομα, email και στοιχεία σύνδεσης.
|
||||
|
||||
Η επεξεργασία αυτή είναι απαραίτητη για την παροχή της υπηρεσίας λογαριασμού.
|
||||
|
||||
Το ηλεκτρονικό κατάστημα υποστηρίζει επίσης guest checkout. Στην περίπτωση guest checkout δεν δημιουργείται λογαριασμός χρήστη. Τα στοιχεία που παρέχετε χρησιμοποιούνται αποκλειστικά στον βαθμό που είναι απαραίτητος για την επεξεργασία και ολοκλήρωση της παραγγελίας και για τις σχετικές νομικές υποχρεώσεις.
|
||||
|
||||
## 4. Παραγγελίες και αγορές
|
||||
|
||||
Όταν πραγματοποιείτε παραγγελία, επεξεργαζόμαστε τα απαραίτητα στοιχεία για:
|
||||
|
||||
* την καταχώριση και εκτέλεση της παραγγελίας,
|
||||
* την επεξεργασία της πληρωμής,
|
||||
* την αποστολή και παράδοση των προϊόντων,
|
||||
* την επικοινωνία μαζί σας σχετικά με την παραγγελία,
|
||||
* την έκδοση των απαραίτητων παραστατικών,
|
||||
* την τήρηση των φορολογικών και λογιστικών υποχρεώσεών μας,
|
||||
* την αντιμετώπιση τυχόν επιστροφών, ακυρώσεων ή παραπόνων.
|
||||
|
||||
Η νομική βάση για τις παραπάνω επεξεργασίες είναι κατά περίπτωση η εκτέλεση της σύμβασης, η συμμόρφωση με νομική υποχρέωση και το έννομο συμφέρον της 3DEALER για την ορθή λειτουργία και προστασία της επιχείρησής της.
|
||||
|
||||
## 5. Επικοινωνία
|
||||
|
||||
Εάν επικοινωνήσετε μαζί μας μέσω email, τηλεφώνου ή της φόρμας επικοινωνίας, επεξεργαζόμαστε τα στοιχεία που μας παρέχετε προκειμένου να απαντήσουμε στο αίτημά σας.
|
||||
|
||||
Η νομική βάση είναι, ανάλογα με την περίπτωση, η λήψη μέτρων κατόπιν αιτήματός σας πριν από τη σύναψη σύμβασης, η εκτέλεση σύμβασης ή το έννομο συμφέρον μας για την εξυπηρέτηση των χρηστών και πελατών μας.
|
||||
|
||||
## 6. Newsletter και εμπορική επικοινωνία
|
||||
|
||||
Εφόσον επιλέξετε να εγγραφείτε στο newsletter της 3DEALER, χρησιμοποιούμε τη διεύθυνση email σας για την αποστολή ενημερώσεων, προσφορών και άλλου εμπορικού περιεχομένου.
|
||||
|
||||
Η εγγραφή στο newsletter πραγματοποιείται με τη συγκατάθεσή σας.
|
||||
|
||||
Μπορείτε να ανακαλέσετε τη συγκατάθεσή σας οποιαδήποτε στιγμή, χρησιμοποιώντας τον σύνδεσμο απεγγραφής που περιλαμβάνεται στα emails ή επικοινωνώντας μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
||||
|
||||
Η ανάκληση της συγκατάθεσης δεν επηρεάζει τη νομιμότητα της επεξεργασίας που πραγματοποιήθηκε πριν από αυτήν.
|
||||
|
||||
## 7. Κριτικές προϊόντων
|
||||
|
||||
Εφόσον επιλέξετε να υποβάλετε κριτική για ένα προϊόν, ενδέχεται να δημοσιεύσουμε το όνομα ή άλλο στοιχείο που επιλέξατε να εμφανίζεται μαζί με την κριτική.
|
||||
|
||||
Παρακαλούμε να μην συμπεριλαμβάνετε προσωπικά δεδομένα δικά σας ή τρίτων στο περιεχόμενο μιας δημόσιας κριτικής, εφόσον δεν είναι απαραίτητο.
|
||||
|
||||
## 8. Πάροχοι πληρωμών
|
||||
|
||||
Για την ολοκλήρωση των πληρωμών ενδέχεται να χρησιμοποιούμε τρίτους παρόχους, όπως Stripe και PayPal, καθώς και τραπεζικά ιδρύματα για πληρωμές μέσω τραπεζικής κατάθεσης ή IRIS.
|
||||
|
||||
Τα δεδομένα που απαιτούνται για την ολοκλήρωση μιας πληρωμής ενδέχεται να διαβιβάζονται στον αντίστοιχο πάροχο πληρωμών.
|
||||
|
||||
**@TODO: Να επιβεβαιωθούν οι ακριβείς πάροχοι πληρωμών/τράπεζες που θα χρησιμοποιούνται στο production και να προστεθούν στην τελική έκδοση.**
|
||||
|
||||
Οι πάροχοι αυτοί επεξεργάζονται τα δεδομένα σύμφωνα με τις δικές τους πολιτικές απορρήτου και τους ισχύοντες όρους τους.
|
||||
|
||||
## 9. Εταιρείες μεταφοράς και παράδοσης
|
||||
|
||||
Για την αποστολή των παραγγελιών σας χρησιμοποιούμε υπηρεσίες μεταφοράς και παράδοσης, μεταξύ άλλων από την ELTA Courier και την BOX NOW.
|
||||
|
||||
Για την παράδοση μιας παραγγελίας ενδέχεται να διαβιβάζονται στον αντίστοιχο πάροχο στοιχεία όπως ονοματεπώνυμο, διεύθυνση, τηλέφωνο και στοιχεία που είναι απαραίτητα για την παράδοση.
|
||||
|
||||
## 10. Λογιστικές και φορολογικές υπηρεσίες
|
||||
|
||||
Τα στοιχεία των παραγγελιών και τα απαραίτητα στοιχεία των πελατών ενδέχεται να διαβιβάζονται στο σύστημα Epsilon που χρησιμοποιείται από την 3DEALER για την έκδοση και διαχείριση παραστατικών και για την εκπλήρωση των φορολογικών και λογιστικών υποχρεώσεών της.
|
||||
|
||||
## 11. Ασφάλεια και προστασία από κατάχρηση
|
||||
|
||||
Χρησιμοποιούμε τεχνικά και οργανωτικά μέτρα για την προστασία των προσωπικών δεδομένων από απώλεια, μη εξουσιοδοτημένη πρόσβαση, αλλοίωση ή παράνομη επεξεργασία.
|
||||
|
||||
Για την προστασία της ιστοσελίδας από κακόβουλη ή αυτοματοποιημένη χρήση ενδέχεται να χρησιμοποιούμε την υπηρεσία hCaptcha. Η χρήση της υπηρεσίας μπορεί να συνεπάγεται επεξεργασία τεχνικών δεδομένων σύμφωνα με την πολιτική απορρήτου του αντίστοιχου παρόχου.
|
||||
|
||||
## 12. Analytics και διαφημιστικές υπηρεσίες
|
||||
|
||||
Η 3DEALER χρησιμοποιεί υπηρεσίες ανάλυσης επισκεψιμότητας και διαφημιστικής μέτρησης, όπως:
|
||||
|
||||
* Google Analytics
|
||||
* Google Tag Manager
|
||||
* Meta Pixel
|
||||
* TikTok Pixel
|
||||
|
||||
Οι συγκεκριμένες τεχνολογίες ενδέχεται να χρησιμοποιούν cookies ή παρόμοιες τεχνολογίες για τη συλλογή πληροφοριών σχετικά με τη χρήση της ιστοσελίδας και την αποτελεσματικότητα των διαφημιστικών ενεργειών.
|
||||
|
||||
Οι μη απολύτως απαραίτητες τεχνολογίες ενεργοποιούνται μόνο σύμφωνα με τις επιλογές συγκατάθεσης που πραγματοποιείτε μέσω του μηχανισμού διαχείρισης cookies.
|
||||
|
||||
Περισσότερες πληροφορίες παρέχονται στην Πολιτική Cookies.
|
||||
|
||||
**@TODO: Να επιβεβαιωθούν τα ακριβή εργαλεία, οι λογαριασμοί και οι υπηρεσίες που θα είναι ενεργά στο production.**
|
||||
|
||||
## 13. Ποιοι μπορεί να έχουν πρόσβαση στα δεδομένα
|
||||
|
||||
Η 3DEALER δεν πωλεί ούτε εκμισθώνει τα προσωπικά σας δεδομένα.
|
||||
|
||||
Πρόσβαση στα προσωπικά δεδομένα μπορεί να έχουν, στον βαθμό που είναι απαραίτητο για την παροχή των αντίστοιχων υπηρεσιών:
|
||||
|
||||
* πάροχοι πληρωμών,
|
||||
* εταιρείες courier,
|
||||
* πάροχοι υπηρεσιών φιλοξενίας και τεχνικής υποστήριξης,
|
||||
* πάροχοι υπηρεσιών email/newsletter,
|
||||
* πάροχοι analytics και διαφημιστικών υπηρεσιών,
|
||||
* λογιστικές και φορολογικές υπηρεσίες,
|
||||
* δημόσιες αρχές και φορείς, όταν αυτό απαιτείται από τον νόμο.
|
||||
|
||||
Οι τρίτοι πάροχοι που επεξεργάζονται δεδομένα για λογαριασμό της 3DEALER χρησιμοποιούνται σύμφωνα με τις απαιτήσεις της ισχύουσας νομοθεσίας περί προστασίας προσωπικών δεδομένων.
|
||||
|
||||
## 14. Διαβιβάσεις εκτός Ευρωπαϊκού Οικονομικού Χώρου
|
||||
|
||||
Ορισμένοι από τους παρόχους που χρησιμοποιούμε ενδέχεται να επεξεργάζονται δεδομένα εκτός του Ευρωπαϊκού Οικονομικού Χώρου.
|
||||
|
||||
Σε αυτές τις περιπτώσεις, η 3DEALER λαμβάνει τα κατάλληλα μέτρα ώστε η διαβίβαση να πραγματοποιείται σύμφωνα με τις απαιτήσεις του GDPR και να παρέχεται το απαιτούμενο επίπεδο προστασίας των προσωπικών δεδομένων.
|
||||
|
||||
**@TODO: Να ελεγχθούν οι ακριβείς χώρες επεξεργασίας και οι μηχανισμοί διαβίβασης για Stripe, PayPal, Google, Meta, TikTok, hCaptcha και τον πάροχο newsletter.**
|
||||
|
||||
## 15. Χρόνος διατήρησης
|
||||
|
||||
Διατηρούμε τα προσωπικά δεδομένα μόνο για όσο διάστημα είναι απαραίτητο για τον σκοπό για τον οποίο συλλέχθηκαν.
|
||||
|
||||
Τα δεδομένα που σχετίζονται με παραγγελίες και συναλλαγές διατηρούνται για όσο απαιτείται από τη φορολογική, λογιστική και εμπορική νομοθεσία.
|
||||
|
||||
Τα δεδομένα λογαριασμού διατηρούνται για όσο ο λογαριασμός παραμένει ενεργός, εκτός εάν υπάρχει νόμιμος λόγος για μεγαλύτερη διατήρηση.
|
||||
|
||||
Τα δεδομένα που χρησιμοποιούνται για newsletter διατηρούνται μέχρι την ανάκληση της συγκατάθεσης ή την απεγγραφή σας, εκτός εάν υπάρχει άλλος νόμιμος λόγος διατήρησης.
|
||||
|
||||
Τα δεδομένα επικοινωνίας διατηρούνται για όσο είναι απαραίτητο για την εξυπηρέτηση του αιτήματος και, όπου απαιτείται, για την προστασία των νόμιμων συμφερόντων μας.
|
||||
|
||||
## 16. Τα δικαιώματά σας
|
||||
|
||||
Σύμφωνα με τον GDPR, έχετε, υπό τις προϋποθέσεις που προβλέπει η νομοθεσία, δικαίωμα:
|
||||
|
||||
* πρόσβασης στα προσωπικά σας δεδομένα,
|
||||
* διόρθωσης ανακριβών ή ελλιπών δεδομένων,
|
||||
* διαγραφής των δεδομένων σας,
|
||||
* περιορισμού της επεξεργασίας,
|
||||
* φορητότητας των δεδομένων,
|
||||
* εναντίωσης σε συγκεκριμένες μορφές επεξεργασίας,
|
||||
* ανάκλησης της συγκατάθεσής σας, όταν η επεξεργασία βασίζεται σε συγκατάθεση.
|
||||
|
||||
Η άσκηση ενός δικαιώματος δεν σημαίνει ότι αυτό μπορεί να εφαρμοστεί σε κάθε περίπτωση. Για παράδειγμα, ενδέχεται να είμαστε υποχρεωμένοι να διατηρήσουμε ορισμένα δεδομένα λόγω φορολογικής ή άλλης νόμιμης υποχρέωσης.
|
||||
|
||||
Για την άσκηση των δικαιωμάτων σας μπορείτε να επικοινωνήσετε μαζί μας:
|
||||
|
||||
**Email:** [print@3dealer.gr](mailto:print@3dealer.gr)
|
||||
**Τηλέφωνο:** 6976 443140
|
||||
|
||||
Θα απαντήσουμε στο αίτημά σας χωρίς αδικαιολόγητη καθυστέρηση και, κατά κανόνα, εντός ενός (1) μήνα από την παραλαβή του.
|
||||
|
||||
## 17. Δικαίωμα υποβολής καταγγελίας
|
||||
|
||||
Εάν θεωρείτε ότι η επεξεργασία των προσωπικών σας δεδομένων παραβιάζει την ισχύουσα νομοθεσία, έχετε δικαίωμα να υποβάλετε καταγγελία στην Αρχή Προστασίας Δεδομένων Προσωπικού Χαρακτήρα.
|
||||
|
||||
## 18. Αλλαγές στην Πολιτική Απορρήτου
|
||||
|
||||
Η παρούσα Πολιτική Απορρήτου μπορεί να τροποποιείται όταν απαιτείται, για παράδειγμα λόγω αλλαγών στη νομοθεσία, στις υπηρεσίες που χρησιμοποιούμε ή στον τρόπο λειτουργίας του ηλεκτρονικού καταστήματος.
|
||||
|
||||
Η πιο πρόσφατη έκδοση θα είναι πάντοτε διαθέσιμη στην ιστοσελίδα μας.
|
||||
@@ -0,0 +1,104 @@
|
||||
---
|
||||
name: "Αποστολές & Επιστροφές"
|
||||
slug: "shipping-returns"
|
||||
|
||||
meta_title: ""
|
||||
meta_description: ""
|
||||
og_image: ""
|
||||
noindex: true
|
||||
|
||||
---
|
||||
|
||||
## 1. Προετοιμασία παραγγελιών
|
||||
|
||||
Όλα τα προϊόντα της 3DEALER εκτυπώνονται και προετοιμάζονται κατά παραγγελία.
|
||||
|
||||
Ο συνήθης χρόνος προετοιμασίας μιας παραγγελίας είναι **2–7 εργάσιμες ημέρες**.
|
||||
|
||||
Ο χρόνος προετοιμασίας δεν περιλαμβάνει τον χρόνο μεταφοράς από την εταιρεία courier.
|
||||
|
||||
Σε περιόδους αυξημένης ζήτησης, ενδέχεται να υπάρξουν καθυστερήσεις. Σε περίπτωση σημαντικής καθυστέρησης, η 3DEALER θα ενημερώσει τον πελάτη.
|
||||
|
||||
## 2. Αποστολές
|
||||
|
||||
Οι παραγγελίες αποστέλλονται μέσω:
|
||||
|
||||
* ELTA Courier
|
||||
* BOX NOW
|
||||
|
||||
Αποστολές πραγματοποιούνται στις περιοχές που υποστηρίζονται από το ηλεκτρονικό κατάστημα:
|
||||
|
||||
* Ελλάδα
|
||||
* Κύπρος
|
||||
|
||||
Το διαθέσιμο κόστος και οι επιλογές αποστολής εμφανίζονται κατά την ολοκλήρωση της παραγγελίας.
|
||||
|
||||
**Κόστος αποστολής:** @TODO — οι τιμές αποστολής ορίζονται δυναμικά από τις ρυθμίσεις του Καταστήματος.
|
||||
|
||||
Δεν παρέχεται δωρεάν αποστολή.
|
||||
|
||||
Δεν υποστηρίζεται πληρωμή με αντικαταβολή.
|
||||
|
||||
## 3. Χρόνος παράδοσης
|
||||
|
||||
Ο χρόνος παράδοσης εξαρτάται από την εταιρεία courier και τον προορισμό.
|
||||
|
||||
Η 3DEALER δεν ευθύνεται για καθυστερήσεις που οφείλονται αποκλειστικά στην εταιρεία μεταφοράς, σε ακραία καιρικά φαινόμενα, απεργίες, προβλήματα στο δίκτυο μεταφορών ή άλλες περιστάσεις που βρίσκονται εκτός του εύλογου ελέγχου της.
|
||||
|
||||
Σε περίπτωση καθυστέρησης, μπορείτε να επικοινωνήσετε μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
||||
|
||||
## 4. Παραλαβή παραγγελίας
|
||||
|
||||
Ο πελάτης είναι υπεύθυνος για την ορθότητα των στοιχείων παράδοσης που καταχωρίζει κατά την παραγγελία.
|
||||
|
||||
Σε περίπτωση λανθασμένης ή ελλιπούς διεύθυνσης, η παράδοση ενδέχεται να καθυστερήσει ή να απαιτηθεί νέα αποστολή. Τυχόν πρόσθετα έξοδα που προκύπτουν από λανθασμένα στοιχεία παράδοσης ενδέχεται να επιβαρύνουν τον πελάτη.
|
||||
|
||||
## 5. Προϊόν που παραδόθηκε κατεστραμμένο
|
||||
|
||||
Σε περίπτωση που το προϊόν παραδοθεί εμφανώς κατεστραμμένο, παρακαλούμε να επικοινωνήσετε μαζί μας το συντομότερο δυνατό στο [print@3dealer.gr](mailto:print@3dealer.gr) και να μας αποστείλετε φωτογραφίες του προϊόντος και της συσκευασίας.
|
||||
|
||||
Η 3DEALER θα εξετάσει το περιστατικό και, εφόσον διαπιστωθεί ζημιά που προέκυψε κατά τη μεταφορά ή άλλη έλλειψη συμμόρφωσης, θα προχωρήσει στην κατάλληλη λύση σύμφωνα με την ισχύουσα νομοθεσία.
|
||||
|
||||
## 6. Δικαίωμα υπαναχώρησης
|
||||
|
||||
Για τις αγορές που εμπίπτουν στο πεδίο εφαρμογής του δικαιώματος υπαναχώρησης, ο καταναλωτής μπορεί να υπαναχωρήσει από τη σύμβαση εντός δεκατεσσάρων (14) ημερολογιακών ημερών από την ημέρα παραλαβής του προϊόντος.
|
||||
|
||||
Για την άσκηση του δικαιώματος υπαναχώρησης, ο πελάτης πρέπει να ενημερώσει την 3DEALER με σαφή δήλωση στο [print@3dealer.gr](mailto:print@3dealer.gr).
|
||||
|
||||
Το προϊόν πρέπει να επιστραφεί χωρίς αδικαιολόγητη καθυστέρηση και, σε κάθε περίπτωση, εντός δεκατεσσάρων (14) ημερών από την ημέρα κατά την οποία ο πελάτης ενημέρωσε την 3DEALER για την απόφασή του να υπαναχωρήσει.
|
||||
|
||||
Ο πελάτης φέρει το άμεσο κόστος επιστροφής του προϊόντος, εκτός εάν έχει συμφωνηθεί διαφορετικά ή η 3DEALER δεν έχει ενημερώσει προηγουμένως σχετικά.
|
||||
|
||||
Ο πελάτης ευθύνεται για τυχόν μείωση της αξίας του προϊόντος που προκύπτει από χειρισμό πέρα από αυτόν που είναι απαραίτητος για τη διαπίστωση της φύσης, των χαρακτηριστικών και της λειτουργίας του.
|
||||
|
||||
## 7. Εξαιρέσεις από το δικαίωμα υπαναχώρησης
|
||||
|
||||
Το δικαίωμα υπαναχώρησης δεν εφαρμόζεται στις περιπτώσεις που εξαιρούνται από την ισχύουσα νομοθεσία.
|
||||
|
||||
Ειδικότερα, μπορεί να μην εφαρμόζεται σε προϊόντα που κατασκευάζονται σύμφωνα με τις ειδικές προδιαγραφές του πελάτη ή είναι σαφώς εξατομικευμένα.
|
||||
|
||||
**@TODO: Να επιβεβαιωθεί ποια προϊόντα της 3DEALER θεωρούνται εξατομικευμένα/custom και εάν υπάρχουν προϊόντα που δεν υπόκεινται στο δικαίωμα υπαναχώρησης.**
|
||||
|
||||
Το γεγονός ότι ένα προϊόν παράγεται μετά την υποβολή της παραγγελίας δεν αποτελεί από μόνο του εξαίρεση από το δικαίωμα υπαναχώρησης.
|
||||
|
||||
## 8. Επιστροφή χρημάτων
|
||||
|
||||
Σε περίπτωση έγκυρης υπαναχώρησης, η 3DEALER επιστρέφει τα χρήματα που έλαβε από τον πελάτη για την αγορά, συμπεριλαμβανομένων, όπου απαιτείται από τη νομοθεσία, των βασικών εξόδων παράδοσης.
|
||||
|
||||
Η επιστροφή χρημάτων πραγματοποιείται με το ίδιο μέσο πληρωμής που χρησιμοποιήθηκε για την αρχική συναλλαγή, εκτός εάν συμφωνηθεί διαφορετικά.
|
||||
|
||||
Η 3DEALER μπορεί να καθυστερήσει την επιστροφή χρημάτων μέχρι να παραλάβει το επιστρεφόμενο προϊόν ή μέχρι ο πελάτης να αποδείξει ότι το έχει αποστείλει, όποιο συμβεί πρώτο.
|
||||
|
||||
## 9. Αλλαγές προϊόντων
|
||||
|
||||
**@TODO: Να επιβεβαιωθεί εάν η 3DEALER προσφέρει αλλαγές προϊόντων/μεγέθους ή εάν οι αλλαγές γίνονται αποκλειστικά μέσω επιστροφής και νέας παραγγελίας.**
|
||||
|
||||
Σε περίπτωση που προσφέρονται αλλαγές, η διαδικασία και τυχόν έξοδα αποστολής θα γνωστοποιούνται στον πελάτη πριν από την ολοκλήρωση της αλλαγής.
|
||||
|
||||
## 10. Ελαττωματικά ή μη συμμορφούμενα προϊόντα
|
||||
|
||||
Σε περίπτωση που ένα προϊόν είναι ελαττωματικό ή δεν ανταποκρίνεται στη σύμβαση, ο πελάτης έχει τα δικαιώματα που προβλέπει η ισχύουσα νομοθεσία περί πώλησης αγαθών και προστασίας καταναλωτή.
|
||||
|
||||
Η ύπαρξη μικρών αισθητικών χαρακτηριστικών που είναι φυσιολογικά για την τρισδιάστατη εκτύπωση, όπως γραμμές στρώσεων ή μικρές διαφοροποιήσεις, δεν αποτελεί από μόνη της ελάττωμα.
|
||||
|
||||
Για οποιοδήποτε πρόβλημα με προϊόν, επικοινωνήστε μαζί μας στο [print@3dealer.gr](mailto:print@3dealer.gr), αναφέροντας τον αριθμό παραγγελίας και, όπου είναι δυνατόν, επισυνάπτοντας φωτογραφίες.
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
name: "Όροι & Προϋποθέσεις"
|
||||
slug: "terms-and-conditions"
|
||||
|
||||
meta_title: ""
|
||||
meta_description: ""
|
||||
og_image: ""
|
||||
noindex: true
|
||||
|
||||
---
|
||||
|
||||
## 1. Γενικά
|
||||
|
||||
Το ηλεκτρονικό κατάστημα 3DEALER (εφεξής «το Κατάστημα» ή «3DEALER») λειτουργεί από την επιχείρηση 3DEALER, με έδρα στην Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα.
|
||||
|
||||
**ΑΦΜ:** @TODO
|
||||
**ΓΕΜΗ:** @TODO
|
||||
|
||||
Για οποιαδήποτε πληροφορία ή επικοινωνία σχετικά με παραγγελίες, προϊόντα ή τη λειτουργία του Καταστήματος, μπορείτε να επικοινωνείτε μαζί μας:
|
||||
|
||||
**Email:** [print@3dealer.gr](mailto:print@3dealer.gr)
|
||||
**Τηλέφωνο:** 6976 443140
|
||||
|
||||
Η χρήση του Καταστήματος και η πραγματοποίηση αγορών μέσω αυτού προϋποθέτουν την αποδοχή των παρόντων Όρων & Προϋποθέσεων.
|
||||
|
||||
Οι παρόντες όροι διέπουν τις αγορές που πραγματοποιούνται μέσω του ηλεκτρονικού καταστήματος και συμπληρώνονται από την Πολιτική Απορρήτου και την Πολιτική Αποστολών & Επιστροφών.
|
||||
|
||||
## 2. Προϊόντα
|
||||
|
||||
Τα προϊόντα που διατίθενται μέσω του Καταστήματος περιγράφονται και απεικονίζονται με όσο το δυνατόν μεγαλύτερη ακρίβεια.
|
||||
|
||||
Τα προϊόντα της 3DEALER κατασκευάζονται με τρισδιάστατη εκτύπωση. Λόγω της φύσης της διαδικασίας παραγωγής, ενδέχεται να εμφανίζουν γραμμές στρώσεων, σημεία ένωσης, μικρές διαφοροποιήσεις ή άλλες μικρές αισθητικές ατέλειες. Τα χαρακτηριστικά αυτά αποτελούν φυσιολογικό αποτέλεσμα της διαδικασίας 3D εκτύπωσης και δεν θεωρούνται από μόνα τους ελάττωμα του προϊόντος.
|
||||
|
||||
Όλα τα προϊόντα εκτυπώνονται και προετοιμάζονται κατά παραγγελία. Ο συνήθης χρόνος προετοιμασίας είναι 2–7 εργάσιμες ημέρες.
|
||||
|
||||
Εκτός εάν αναφέρεται διαφορετικά στην περιγραφή συγκεκριμένου προϊόντος, τα προϊόντα προορίζονται για διακοσμητική χρήση ή για χρήση σε λογικά και ρεαλιστικά πλαίσια. Η χρήση με υπερβολική δύναμη, σε πολύ υψηλές θερμοκρασίες ή με τρόπο διαφορετικό από τον προβλεπόμενο ενδέχεται να προκαλέσει ζημιά στο προϊόν.
|
||||
|
||||
## 3. Τιμές
|
||||
|
||||
Όλες οι τιμές των προϊόντων αναγράφονται σε ευρώ (€) και περιλαμβάνουν τον ισχύοντα ΦΠΑ.
|
||||
|
||||
Το κόστος αποστολής υπολογίζεται κατά την ολοκλήρωση της παραγγελίας και εμφανίζεται πριν από την επιβεβαίωση της αγοράς.
|
||||
|
||||
**Κόστος αποστολής:** @TODO — το ακριβές κόστος υπολογίζεται δυναμικά ανάλογα με τις ρυθμίσεις αποστολής του Καταστήματος.
|
||||
|
||||
## 4. Παραγγελίες
|
||||
|
||||
Ο πελάτης μπορεί να πραγματοποιήσει αγορά είτε δημιουργώντας λογαριασμό στο Κατάστημα είτε χρησιμοποιώντας τη δυνατότητα guest checkout, χωρίς δημιουργία λογαριασμού.
|
||||
|
||||
Για την ολοκλήρωση μιας παραγγελίας απαιτούνται τα στοιχεία που είναι απαραίτητα για την επεξεργασία, πληρωμή και παράδοσή της.
|
||||
|
||||
Πριν από την οριστικοποίηση της παραγγελίας, ο πελάτης έχει τη δυνατότητα να ελέγξει τα στοιχεία της παραγγελίας και το συνολικό κόστος, συμπεριλαμβανομένων τυχόν εξόδων αποστολής.
|
||||
|
||||
Με την ολοκλήρωση της παραγγελίας αποστέλλεται επιβεβαίωση στη διεύθυνση email που έχει δηλώσει ο πελάτης.
|
||||
|
||||
**@TODO: Να επιβεβαιωθεί εάν η παραγγελία θεωρείται οριστική με την ολοκλήρωση της πληρωμής ή με την αποστολή της επιβεβαίωσης παραγγελίας.**
|
||||
|
||||
## 5. Τρόποι πληρωμής
|
||||
|
||||
Το Κατάστημα υποστηρίζει τους ακόλουθους τρόπους πληρωμής:
|
||||
|
||||
* Πιστωτική ή χρεωστική κάρτα
|
||||
* PayPal
|
||||
* Stripe
|
||||
* IRIS
|
||||
* Τραπεζική κατάθεση
|
||||
|
||||
Για τις ηλεκτρονικές πληρωμές ενδέχεται να χρησιμοποιούνται υπηρεσίες τρίτων παρόχων πληρωμών. Τα στοιχεία της κάρτας ή άλλα ευαίσθητα στοιχεία πληρωμής δεν αποθηκεύονται από την 3DEALER, αλλά υποβάλλονται σε επεξεργασία από τον αντίστοιχο πάροχο πληρωμών σύμφωνα με τους δικούς του όρους και την πολιτική απορρήτου του.
|
||||
|
||||
## 6. Ακυρώσεις παραγγελιών
|
||||
|
||||
**@TODO: Να επιβεβαιωθεί η πολιτική ακύρωσης.**
|
||||
|
||||
Ως γενικός κανόνας, ο πελάτης μπορεί να επικοινωνήσει με την 3DEALER το συντομότερο δυνατό μετά την πραγματοποίηση της παραγγελίας, εφόσον επιθυμεί την ακύρωσή της.
|
||||
|
||||
Εφόσον η παραγγελία δεν έχει ακόμη ξεκινήσει να προετοιμάζεται, η 3DEALER μπορεί να προχωρήσει σε ακύρωση και επιστροφή του ποσού που έχει καταβληθεί.
|
||||
|
||||
Εφόσον η παραγωγή έχει ήδη ξεκινήσει, ισχύουν οι όροι της Πολιτικής Αποστολών & Επιστροφών και, όπου εφαρμόζεται, το νόμιμο δικαίωμα υπαναχώρησης.
|
||||
|
||||
## 7. Δικαίωμα υπαναχώρησης και επιστροφές
|
||||
|
||||
Ο καταναλωτής έχει, όπου προβλέπεται από την ισχύουσα νομοθεσία, δικαίωμα υπαναχώρησης από τη σύμβαση εξ αποστάσεως εντός δεκατεσσάρων (14) ημερολογιακών ημερών από την παραλαβή του προϊόντος, χωρίς να χρειάζεται να αιτιολογήσει την απόφασή του.
|
||||
|
||||
Εξαιρέσεις από το δικαίωμα υπαναχώρησης ισχύουν στις περιπτώσεις που προβλέπονται από την ισχύουσα νομοθεσία, μεταξύ άλλων για προϊόντα που κατασκευάζονται σύμφωνα με τις ειδικές προδιαγραφές του καταναλωτή ή είναι σαφώς εξατομικευμένα.
|
||||
|
||||
Η διαδικασία και οι όροι επιστροφών περιγράφονται αναλυτικά στην Πολιτική Αποστολών & Επιστροφών.
|
||||
|
||||
## 8. Νομική εγγύηση και ελαττωματικά προϊόντα
|
||||
|
||||
Η 3DEALER ευθύνεται για τη συμμόρφωση των προϊόντων με τη σύμβαση και για τα νόμιμα δικαιώματα του καταναλωτή σε περίπτωση έλλειψης συμμόρφωσης ή ελαττώματος, σύμφωνα με την ισχύουσα νομοθεσία.
|
||||
|
||||
Η ύπαρξη φυσιολογικών χαρακτηριστικών της τρισδιάστατης εκτύπωσης, όπως οι γραμμές στρώσεων ή μικρές αισθητικές διαφοροποιήσεις που είναι αναμενόμενες από τη συγκεκριμένη διαδικασία παραγωγής, δεν αποτελεί από μόνη της έλλειψη συμμόρφωσης.
|
||||
|
||||
## 9. Διαθεσιμότητα
|
||||
|
||||
Η 3DEALER καταβάλλει κάθε προσπάθεια ώστε οι πληροφορίες σχετικά με τη διαθεσιμότητα των προϊόντων να είναι ακριβείς.
|
||||
|
||||
Σε εξαιρετικές περιπτώσεις όπου ένα προϊόν δεν μπορεί να παραχθεί ή να αποσταλεί, η 3DEALER θα επικοινωνήσει με τον πελάτη και θα ενημερώσει σχετικά με τις διαθέσιμες επιλογές.
|
||||
|
||||
## 10. Πνευματική ιδιοκτησία
|
||||
|
||||
Το περιεχόμενο του Καταστήματος, συμπεριλαμβανομένων ενδεικτικά των σχεδίων, φωτογραφιών, κειμένων, γραφικών, λογοτύπων και λοιπού υλικού, αποτελεί ιδιοκτησία της 3DEALER ή χρησιμοποιείται νόμιμα από αυτήν και προστατεύεται από την ισχύουσα νομοθεσία περί πνευματικής και βιομηχανικής ιδιοκτησίας.
|
||||
|
||||
Δεν επιτρέπεται η αντιγραφή, αναπαραγωγή, τροποποίηση, διανομή ή εμπορική εκμετάλλευση του περιεχομένου χωρίς προηγούμενη γραπτή άδεια.
|
||||
|
||||
## 11. Προσωπικά δεδομένα
|
||||
|
||||
Η επεξεργασία των προσωπικών δεδομένων των πελατών πραγματοποιείται σύμφωνα με την Πολιτική Απορρήτου της 3DEALER.
|
||||
|
||||
## 12. Τροποποίηση των Όρων
|
||||
|
||||
Η 3DEALER διατηρεί το δικαίωμα να τροποποιεί τους παρόντες Όρους & Προϋποθέσεις, όταν αυτό είναι απαραίτητο, ιδίως λόγω αλλαγών στη νομοθεσία, στις υπηρεσίες ή στον τρόπο λειτουργίας του Καταστήματος.
|
||||
|
||||
Οι όροι που ισχύουν για κάθε παραγγελία είναι εκείνοι που ήταν διαθέσιμοι κατά τον χρόνο πραγματοποίησης της συγκεκριμένης παραγγελίας.
|
||||
|
||||
## 13. Εφαρμοστέο δίκαιο
|
||||
|
||||
Οι παρόντες Όροι & Προϋποθέσεις διέπονται από το ελληνικό δίκαιο.
|
||||
|
||||
Για κάθε διαφορά που σχετίζεται με τη χρήση του Καταστήματος ή την αγορά προϊόντων εφαρμόζονται οι διατάξεις της ισχύουσας ελληνικής και ευρωπαϊκής νομοθεσίας περί προστασίας του καταναλωτή.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 689 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user