init
This commit is contained in:
236 files changed
+24692
No files matched your search
@@ -0,0 +1,57 @@
|
||||
<link rel="preload" href="{{ asset('fonts/vazirmatn.woff2') }}" as="font" type="font/woff2" crossorigin>
|
||||
|
||||
<style>
|
||||
.fi-panel-studio .fi-wi-chart .fi-wi-chart-text-color {
|
||||
color: #574c53;
|
||||
}
|
||||
|
||||
.dark .fi-panel-studio .fi-wi-chart .fi-wi-chart-text-color {
|
||||
color: #d0c7ce;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const family = 'Vazirmatn, sans-serif';
|
||||
const font = '500 13px Vazirmatn';
|
||||
const sample = 'آذر ۱۲۳۴۵۶۷۸۹۰';
|
||||
const labelFont = ({ chart }) => chart.options.font;
|
||||
const labelColor = ({ chart }) => chart.options.color;
|
||||
|
||||
window.filamentChartJsPlugins ??= [];
|
||||
window.filamentChartJsPlugins.push({
|
||||
id: 'porint-dashboard-typography',
|
||||
beforeInit(chart) {
|
||||
const options = chart.config.options;
|
||||
const needsFont = document.fonts && !document.fonts.check(font, sample);
|
||||
|
||||
options.font = { ...options.font, family: needsFont ? 'sans-serif' : family, size: 13, weight: 500 };
|
||||
|
||||
for (const scale of Object.values(options.scales ?? {})) {
|
||||
scale.ticks = { ...scale.ticks, font: labelFont, color: labelColor, padding: 7 };
|
||||
}
|
||||
|
||||
const legend = options.plugins?.legend;
|
||||
if (legend && legend.display !== false) {
|
||||
legend.labels = { ...legend.labels, font: labelFont, color: labelColor, padding: 16 };
|
||||
}
|
||||
|
||||
const tooltip = options.plugins?.tooltip;
|
||||
if (tooltip) {
|
||||
tooltip.bodyFont = labelFont;
|
||||
tooltip.titleFont = ({ chart }) => ({ ...chart.options.font, size: 14, weight: 650 });
|
||||
}
|
||||
|
||||
if (needsFont) {
|
||||
// A different family invalidates widths measured before the webfont loaded.
|
||||
document.fonts.load(font, sample).then((faces) => {
|
||||
if (!chart.canvas || !faces.length) return;
|
||||
|
||||
options.font.family = family;
|
||||
chart.update('resize');
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,11 @@
|
||||
<x-filament-panels::page>
|
||||
<form class="fi-sc-form" wire:submit="save">
|
||||
{{ $this->form }}
|
||||
|
||||
<div>
|
||||
<x-filament::button type="submit">
|
||||
{{ __('admin.footer.save') }}
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</form>
|
||||
</x-filament-panels::page>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script>
|
||||
document.addEventListener('livewire:init', () => {
|
||||
let expirationShown = false;
|
||||
|
||||
Livewire.interceptRequest(({ onError }) => {
|
||||
onError(({ response, body, preventDefault }) => {
|
||||
const expired = response.status === 419;
|
||||
const emptyResponse = response.ok && body.trim() === '';
|
||||
|
||||
if (!expired && !emptyResponse) return;
|
||||
|
||||
preventDefault();
|
||||
if (expired && expirationShown) return;
|
||||
expirationShown ||= expired;
|
||||
|
||||
const message = expired
|
||||
? @js(__('admin.livewire.expired'))
|
||||
: @js(__('admin.livewire.empty_response'));
|
||||
|
||||
if (window.confirm(message)) window.location.reload();
|
||||
});
|
||||
});
|
||||
}, { once: true });
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
<span class="porint-wordmark" dir="ltr" role="img" aria-label="{{ filament()->getBrandName() }}">PORINT</span>
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('studio.layout')
|
||||
@section('content')
|
||||
<section class="shell inner-page">
|
||||
<div class="section-heading"><h1>{{ __('studio.titles.catalog') }}</h1></div>
|
||||
@include('studio.collection-grid')
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="collection-grid">
|
||||
@foreach ($collections as $collection)
|
||||
<a class="collection-card {{ $loop->even ? 'collection-sound' : 'collection-rose' }}" href="{{ route($locale.'.collection', $collection->text('slug')) }}">
|
||||
<div class="collection-copy">
|
||||
<h3>{{ $collection->text('name') }}</h3>
|
||||
<p>{{ $collection->text('description') }}</p>
|
||||
<span class="card-link">{{ __('studio.open_collection') }}</span>
|
||||
</div>
|
||||
@if ($collection->cover)
|
||||
<img src="{{ $collection->coverUrl() }}" alt="" width="572" height="740" loading="lazy">
|
||||
@endif
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
@extends('studio.layout')
|
||||
@section('content')
|
||||
<section class="shell inner-page">
|
||||
<a class="text-link" href="{{ route($locale.'.catalog') }}">{{ __('studio.back_collections') }}</a>
|
||||
<div class="collection-feature">
|
||||
<div><h1>{{ $title }}</h1><p>{{ $description }}</p></div>
|
||||
@if ($collection->cover)
|
||||
<img src="{{ $collection->coverUrl() }}" alt="{{ $title }}" width="572" height="740">
|
||||
@endif
|
||||
</div>
|
||||
@if ($designs->isEmpty())
|
||||
<p class="empty-note">{{ __('studio.loading_empty') }}</p>
|
||||
@else
|
||||
<h2>{{ __('studio.designs') }}</h2>
|
||||
<div class="motif-grid">
|
||||
@foreach ($designs as $design)
|
||||
<a class="motif" href="{{ route($locale.'.design', $design->text('slug')) }}">
|
||||
<img src="{{ route('artwork', ['id' => $design->id, 'file' => basename($design->artwork_path)]) }}" alt="" loading="lazy">
|
||||
<div><h3>{{ $design->text('name') }}</h3><span class="text-link">{{ __('studio.try') }}</span></div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,71 @@
|
||||
@extends('studio.layout')
|
||||
@section('content')
|
||||
@php
|
||||
$staffPreview = $draft ?? false;
|
||||
$art = route($staffPreview ? 'studio.preview-art' : 'artwork', ['id' => $design->id, 'file' => basename($design->artwork_path ?? '') ?: 'unavailable.webp']);
|
||||
$number = new \NumberFormatter($locale, \NumberFormatter::DECIMAL);
|
||||
$sizeLabel = $number->format((float) $design->width_cm).' × '.$number->format((float) $design->height_cm);
|
||||
$labels = [
|
||||
'garment' => __('studio.garment_labels'),
|
||||
'color' => __('studio.color_labels'),
|
||||
'placement' => __('studio.placement_labels'),
|
||||
];
|
||||
@endphp
|
||||
<section class="shell inner-page design-page">
|
||||
@if ($staffPreview)
|
||||
<p class="draft-label">{{ __('studio.draft') }} · <a href="{{ \App\Filament\Resources\Designs\DesignResource::getUrl('view', ['record' => $design], panel: 'studio') }}">{{ __('studio.return_admin') }}</a></p>
|
||||
@else
|
||||
<a class="text-link" href="{{ route($locale.'.collection', $design->collection->text('slug')) }}">{{ $design->collection->text('name') }}</a>
|
||||
@endif
|
||||
<div class="design-intro">
|
||||
<div><h1>{{ $title }}</h1><p>{{ $description }}</p></div>
|
||||
<p class="size">
|
||||
<span>{{ __('studio.dimensions') }}</span>
|
||||
<strong><bdi dir="ltr">{{ $sizeLabel }}</bdi> {{ __('studio.centimeters') }}</strong>
|
||||
</p>
|
||||
</div>
|
||||
@if ($templates && $design->artwork_path)
|
||||
@php($first = $templates[0])
|
||||
@php($anchor = reset($first['placements']))
|
||||
<section class="try-on" data-preview>
|
||||
<script type="application/json" data-preview-data>@json(['templates' => $templates, 'labels' => $labels])</script>
|
||||
<div class="preview-heading">
|
||||
<h2>{{ __('studio.preview_heading') }}</h2>
|
||||
@if (count($templates) > 1)
|
||||
<button type="button" class="button button-outline compare-button" data-compare aria-pressed="false" data-single="{{ __('studio.single') }}" data-dual="{{ __('studio.compare') }}" hidden>{{ __('studio.compare') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="fitting-room">
|
||||
@for ($slot = 0; $slot < 2; $slot++)
|
||||
<div class="fitting-slot" data-slot @if ($slot === 1) hidden @endif>
|
||||
<figure class="garment-display">
|
||||
<div class="garment-frame">
|
||||
<img src="{{ $first['photo'] }}" alt="{{ $first['name'] }}" width="627" height="627" data-garment-photo>
|
||||
<img src="{{ $art }}" class="garment-print" alt="{{ $title }}" data-print style="--print-width: {{ $first['width'] }}%; --print-x: {{ $anchor['x'] }}%; --print-y: {{ $anchor['y'] }}%">
|
||||
</div>
|
||||
<figcaption data-garment-caption aria-live="polite">{{ $first['name'] }}</figcaption>
|
||||
</figure>
|
||||
<div class="fitting-controls" data-controls hidden>
|
||||
<p class="slot-name" data-slot-name hidden>{{ __('studio.'.($slot === 0 ? 'first_slot' : 'second_slot')) }}</p>
|
||||
@foreach (['garment' => 'choose_garment', 'color' => 'choose_color', 'placement' => 'choose_placement'] as $field => $label)
|
||||
<label>{{ __("studio.$label") }}<select data-selection="{{ $field }}"></select></label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endfor
|
||||
</div>
|
||||
<p class="preview-note">{{ $design->illustrative || collect($templates)->contains('illustrative', true) ? __('studio.illustrative') : __('studio.preview_note') }}</p>
|
||||
</section>
|
||||
@else
|
||||
<div class="empty-preview">
|
||||
@if ($design->artwork_path)
|
||||
<img src="{{ $art }}" alt="{{ $title }}">
|
||||
@endif
|
||||
<p>{{ __('studio.no_preview') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<aside class="guide-promo"><div><h2>{{ __('studio.guide_call') }}</h2><p>{{ __('studio.guide_copy') }}</p></div>
|
||||
<a class="button button-ghost" href="{{ route($locale.'.guides') }}">{{ __('studio.guide_link') }}</a>
|
||||
</aside>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,63 @@
|
||||
@php
|
||||
$phoneNumbers = $studioInformation['phone_numbers'] ?? [];
|
||||
$email = $studioInformation['email'] ?? null;
|
||||
$postalCode = $studioInformation['postal_code'] ?? null;
|
||||
$address = $studioInformation["address_$locale"] ?? null;
|
||||
$contactNote = $studioInformation["contact_note_$locale"] ?? null;
|
||||
$licensing = $studioInformation["licensing_$locale"] ?? null;
|
||||
@endphp
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="shell">
|
||||
<div class="footer-main">
|
||||
<div class="footer-identity">
|
||||
<a class="brand porint-wordmark" href="{{ route($locale.'.home') }}" aria-label="PORINT · {{ __('studio.home') }}">PORINT</a>
|
||||
<p>{{ __('studio.print_studio') }}</p>
|
||||
<nav class="footer-nav" aria-label="{{ __('studio.footer.navigation') }}">
|
||||
<a href="{{ route($locale.'.catalog') }}">{{ __('studio.catalog') }}</a>
|
||||
<a href="{{ route($locale.'.guides') }}">{{ __('studio.guides') }}</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@if ($phoneNumbers || filled($email) || filled($contactNote))
|
||||
<section class="footer-section">
|
||||
<h2>{{ __('studio.footer.contact') }}</h2>
|
||||
<address class="footer-contact">
|
||||
@foreach ($phoneNumbers as $number)
|
||||
<a href="tel:{{ \App\Support\PhoneNumber::dialString($number) }}" dir="ltr">{{ $number }}</a>
|
||||
@endforeach
|
||||
|
||||
@if (filled($email))
|
||||
<a href="mailto:{{ str_replace('%40', '@', rawurlencode($email)) }}" dir="ltr">{{ $email }}</a>
|
||||
@endif
|
||||
|
||||
@if (filled($contactNote))
|
||||
<p class="footer-copy">{{ $contactNote }}</p>
|
||||
@endif
|
||||
</address>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
@if (filled($address) || filled($postalCode))
|
||||
<section class="footer-section">
|
||||
<h2>{{ __('studio.footer.address') }}</h2>
|
||||
@if (filled($address))
|
||||
<address class="footer-copy">{{ $address }}</address>
|
||||
@endif
|
||||
@if (filled($postalCode))
|
||||
<p class="footer-postal">
|
||||
{{ __('studio.footer.postal_code') }} <bdi dir="ltr">{{ $postalCode }}</bdi>
|
||||
</p>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if (filled($licensing))
|
||||
<section class="footer-licensing">
|
||||
<h2>{{ __('studio.footer.licensing') }}</h2>
|
||||
<p class="footer-copy">{{ $licensing }}</p>
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,82 @@
|
||||
@extends('studio.layout')
|
||||
|
||||
@push('head')
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{{ $title }} · PORINT">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:url" content="{{ $alternates[$locale] }}">
|
||||
<meta property="og:image" content="{{ asset('porint/guide-workbench.webp') }}">
|
||||
<meta property="og:image:alt" content="{{ __('guide.hero_alt') }}">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<article class="print-guide">
|
||||
<header class="guide-hero">
|
||||
<div class="shell guide-hero-inner">
|
||||
<div>
|
||||
<p class="guide-kicker">{{ __('guide.hero_label') }}</p>
|
||||
<h1>{{ $title }}</h1>
|
||||
<p class="guide-deck">{{ $description }}</p>
|
||||
<nav class="button-group" aria-label="{{ __('guide.jump_label') }}">
|
||||
<a class="button button-primary" href="#apply">{{ __('guide.apply') }}</a>
|
||||
<a class="button button-ghost" href="#care">{{ __('guide.care') }}</a>
|
||||
<a class="button button-ghost" href="#questions">{{ __('guide.questions') }}</a>
|
||||
</nav>
|
||||
</div>
|
||||
<figure>
|
||||
<img src="{{ asset('porint/guide-workbench.webp') }}" alt="{{ __('guide.hero_alt') }}" width="1200" height="800" fetchpriority="high">
|
||||
<figcaption>{{ __('guide.hero_caption') }}</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="shell guide-content">
|
||||
<div class="guide-workflow">
|
||||
<aside class="guide-checklist" aria-labelledby="guide-checklist-title">
|
||||
<h2 id="guide-checklist-title">{{ __('guide.checklist_title') }}</h2>
|
||||
<ul>
|
||||
@foreach (__('guide.checklist') as $item)
|
||||
<li>{{ $item }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<h3>{{ __('guide.press_note_title') }}</h3>
|
||||
<p>{{ __('guide.press_note') }}</p>
|
||||
</aside>
|
||||
|
||||
<section class="guide-section" id="apply">
|
||||
<h2>{{ __('guide.application_title') }}</h2>
|
||||
<ol class="guide-steps" role="list">
|
||||
@foreach (__('guide.steps') as [$heading, $body])
|
||||
<li>
|
||||
<h3>{{ $heading }}</h3>
|
||||
<p>{{ $body }}</p>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="guide-section" id="care">
|
||||
<h2>{{ __('guide.care_title') }}</h2>
|
||||
<div class="guide-care">
|
||||
@foreach (__('guide.care_items') as [$heading, $body])
|
||||
<div>
|
||||
<h3>{{ $heading }}</h3>
|
||||
<p>{{ $body }}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="guide-section guide-faq" id="questions">
|
||||
<h2>{{ __('guide.questions') }}</h2>
|
||||
@foreach (__('guide.faq') as [$question, $answer])
|
||||
<details>
|
||||
<summary>{{ $question }}</summary>
|
||||
<p>{{ $answer }}</p>
|
||||
</details>
|
||||
@endforeach
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
@endsection
|
||||
@@ -0,0 +1,47 @@
|
||||
@extends('studio.layout')
|
||||
@section('content')
|
||||
<section class="hero">
|
||||
<picture class="hero-media">
|
||||
<img src="{{ asset('porint/hero.webp') }}" alt="{{ __('studio.hero_alt') }}" fetchpriority="high" width="1448" height="1086">
|
||||
</picture>
|
||||
<div class="shell hero-inner">
|
||||
<div class="hero-copy">
|
||||
<p class="eyebrow"><span></span>{{ __('studio.product') }}</p>
|
||||
<h1>{{ __('studio.hero_first') }}<br><em>{{ __('studio.hero_second') }}</em></h1>
|
||||
<p>{{ __('studio.hero_copy') }}</p>
|
||||
<div class="button-group">
|
||||
<a class="button button-primary" href="#collections">{{ __('studio.see_collection') }}</a>
|
||||
<a class="button button-ghost" href="{{ route($locale.'.guides') }}">{{ __('studio.guides') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="hero-caption" dir="{{ $locale === 'fa' ? 'rtl' : 'ltr' }}">{{ __('studio.hero_mockup') }}</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="shell shelf" id="collections">
|
||||
<div class="section-heading">
|
||||
<h2>{{ __('studio.collection_heading') }}</h2>
|
||||
<a class="text-link" href="{{ route($locale.'.catalog') }}">{{ __('studio.back_collections') }}</a>
|
||||
</div>
|
||||
@include('studio.collection-grid')
|
||||
</section>
|
||||
|
||||
@if ($featured)
|
||||
<section class="shell preview-promo">
|
||||
<div class="preview-promo-copy">
|
||||
<h2>{{ __('studio.preview_heading') }}</h2>
|
||||
<p>{{ __('studio.preview_copy') }}</p>
|
||||
<a class="button button-ink" href="{{ route($locale.'.design', $featured->text('slug')) }}">{{ __('studio.try') }}</a>
|
||||
</div>
|
||||
<figure>
|
||||
<img src="{{ asset('porint/compare.webp') }}" width="1254" height="627" alt="{{ $locale === 'fa' ? 'یک طرح روی تیشرت و هودی' : 'The same print on a T-shirt and a hoodie' }}" loading="lazy">
|
||||
<figcaption>{{ __('studio.closeup') }}</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<section class="shell guide-promo">
|
||||
<div><h2>{{ __('studio.guide_call') }}</h2><p>{{ __('studio.guide_copy') }}</p></div>
|
||||
<a class="button button-ghost" href="{{ route($locale.'.guides') }}">{{ __('studio.guide_link') }}</a>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ $locale }}" dir="{{ $locale === 'fa' ? 'rtl' : 'ltr' }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title }} · PORINT</title>
|
||||
<meta name="description" content="{{ $description }}">
|
||||
@if ($draft ?? false)
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
@else
|
||||
<link rel="canonical" href="{{ $alternates[$locale] }}">
|
||||
@foreach ($alternates as $language => $url)
|
||||
<link rel="alternate" hreflang="{{ $language }}" href="{{ $url }}">
|
||||
@endforeach
|
||||
@endif
|
||||
@stack('head')
|
||||
<link rel="preload" href="{{ asset('fonts/vazirmatn.woff2') }}" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="stylesheet" href="{{ asset('fonts/studio-font.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('porint/wordmark.css') }}">
|
||||
<link rel="icon" href="{{ asset('porint/favicon.png') }}" type="image/png">
|
||||
@vite(['resources/css/studio.css', 'resources/js/preview.ts'])
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#content">{{ $locale === 'fa' ? 'رفتن به محتوا' : 'Skip to content' }}</a>
|
||||
<header class="site-header">
|
||||
<div class="shell masthead">
|
||||
<a class="brand porint-wordmark" href="{{ route($locale.'.home') }}" aria-label="PORINT · {{ __('studio.home') }}">PORINT</a>
|
||||
<nav aria-label="{{ $locale === 'fa' ? 'منوی اصلی' : 'Main menu' }}">
|
||||
<a href="{{ route($locale.'.catalog') }}">{{ __('studio.catalog') }}</a>
|
||||
<a href="{{ route($locale.'.guides') }}">{{ __('studio.guides') }}</a>
|
||||
</nav>
|
||||
<a class="language" lang="{{ $alternateLocale }}" hreflang="{{ $alternateLocale }}" href="{{ $alternates[$alternateLocale] }}">{{ __('studio.language') }}</a>
|
||||
</div>
|
||||
</header>
|
||||
<main id="content">
|
||||
@yield('content')
|
||||
</main>
|
||||
@include('studio.footer')
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user