setup for stoic settings, changes in legal pages to use core's store details and contact page to show contact info next to form

This commit is contained in:
elvira
2026-09-28 17:09:08 +03:00
parent 4634e14924
commit ca362f81c8
22 changed files with 489 additions and 102 deletions
@@ -20,8 +20,8 @@ ## 1. Υπεύθυνος επεξεργασίας
**3DEALER**
Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα
ΑΦΜ: @TODO
ΓΕΜΗ: @TODO
ΑΦΜ: {store_tax_identifier}
ΓΕΜΗ: {store_registration_number}
Email: [print@3dealer.gr](mailto:print@3dealer.gr)
Τηλέφωνο: 6976 443140
@@ -13,8 +13,8 @@ ## 1. Γενικά
Το ηλεκτρονικό κατάστημα 3DEALER (εφεξής «το Κατάστημα» ή «3DEALER») λειτουργεί από την επιχείρηση 3DEALER, με έδρα στην Πάρου 31, Κυψέλη, ΤΚ 11255, Αθήνα.
**ΑΦΜ:** @TODO
**ΓΕΜΗ:** @TODO
**ΑΦΜ:** {store_tax_identifier}
**ΓΕΜΗ:** {store_registration_number}
Για οποιαδήποτε πληροφορία ή επικοινωνία σχετικά με παραγγελίες, προϊόντα ή τη λειτουργία του Καταστήματος, μπορείτε να επικοινωνείτε μαζί μας:
+6
View File
@@ -0,0 +1,6 @@
---
meta_description: ""
facebook_url: ""
instagram_url: ""
tiktok_url: ""
---
+17
View File
@@ -131,3 +131,20 @@ schemas:
- name: body
label: Body
ui: markdown
- name: settings
label: Settings
type: singleton
file: settings.md
fields:
- name: meta_description
label: "Default Meta Description (used when a page has none)"
ui: text
- name: facebook_url
label: Facebook URL
ui: string
- name: instagram_url
label: Instagram URL
ui: string
- name: tiktok_url
label: TikTok URL
ui: string
@@ -0,0 +1,45 @@
{{--
Store address and phone from Lunar's Store Details (Modules\Core\Store),
email from CONTACT_EMAIL until Store Details has an email field too.
Each line is left out when its value is empty.
--}}
@props([
'store' => null,
'email' => null,
])
@php
$address = $store?->translate('address');
$phone = $store?->phone;
@endphp
@if (filled($address) || filled($phone) || filled($email))
<address {{ $attributes->merge(['class' => 'not-italic']) }}>
<dl class="flex flex-col gap-10">
@if (filled($address))
<div class="flex flex-col gap-1">
<dt class="font-display text-sm font-semibold uppercase">{{ __('storefront.contact.address') }}</dt>
<dd class="font-display text-h4 font-semibold leading-tight">{{ $address }}</dd>
</div>
@endif
@if (filled($phone))
<div class="flex flex-col gap-1">
<dt class="font-display text-sm font-semibold uppercase">{{ __('storefront.contact.phone') }}</dt>
<dd class="font-display text-h4 font-semibold leading-tight">
<a href="tel:{{ preg_replace('/[^\d+]/', '', $phone) }}" class="underline-slide [--slide-h:1px] pb-0">{{ $phone }}</a>
</dd>
</div>
@endif
@if (filled($email))
<div class="flex flex-col gap-1">
<dt class="font-display text-sm font-semibold uppercase">Email</dt>
<dd class="font-display text-h4 font-semibold leading-tight break-all">
<a href="mailto:{{ $email }}" class="underline-slide [--slide-h:1px] pb-0">{{ $email }}</a>
</dd>
</div>
@endif
</dl>
</address>
@endif
+14 -23
View File
@@ -26,29 +26,20 @@
</div>
</div>
{{-- Social media --}}
<nav aria-label="Social media">
<ul class="flex items-center gap-4">
<li>
<a href="#" aria-label="Facebook" class="hover:text-brand">
<x-ui.icon name="facebook" :size="22" color="text-neutral-300" />
{{-- <span class="leading-none text-[22px] font-extrabold italic group-hover:underline">FB.</span> --}}
</a>
</li>
<li>
<a href="#" aria-label="Instagram" class="hover:text-brand">
<x-ui.icon name="instagram" :size="22" />
{{-- <span class="leading-none text-[22px] font-extrabold italic group-hover:underline">IG.</span> --}}
</a>
</li>
<li>
<a href="#" aria-label="TikTok" class="hover:text-brand">
<x-ui.icon name="tiktok" :size="22" />
{{-- <span class="leading-none text-[22px] font-extrabold italic group-hover:underline">TT.</span> --}}
</a>
</li>
</ul>
</nav>
{{-- Social media — URLs from Stoic (settings.md); empty ones are hidden. --}}
@if ($stoicSettings->socialLinks())
<nav aria-label="Social media">
<ul class="flex items-center gap-4">
@foreach ($stoicSettings->socialLinks() as $social)
<li>
<a href="{{ $social['url'] }}" aria-label="{{ $social['label'] }}" class="hover:text-brand">
<x-ui.icon :name="$social['icon']" :size="22" />
</a>
</li>
@endforeach
</ul>
</nav>
@endif
{{-- Copyright --}}
<div class="flex items-center gap-2">
+5 -3
View File
@@ -18,14 +18,14 @@
<path d="m88.4 0 4 28.9 29.7-5.2-14.3 25.7L135 62l-27.2 12.6 14.3 25.7-29.7-5.2-4 28.9-20.9-21.1L46.6 124l-4-28.9-29.7 5.2 14.3-25.7L0 62l27.2-12.6-14.3-25.7 29.7 5.2 4-28.9 20.9 21.1L88.4 0z"/>
</svg>
<h1 class="font-display text-h2 font-semibold leading-tight lg:text-h2"
<h1 class="font-display text-h1 font-semibold leading-tight"
data-controller="appear"
data-appear-visible-class="is-visible">
<span class="text-dance">Επικοινώνησε</span><br>
μαζί μας <span class="text-dance [--dance-delay:200ms]">άμεσα</span>
</h1>
<p class="max-w-md ">
<p class="max-w-xl ">
Έχεις απορία, ιδέα ή θες να μας πεις κάτι; Γράψε μας το μήνυμά σου και θα σου απαντήσουμε το συντομότερο δυνατό.
</p>
@@ -75,7 +75,9 @@ class="h-captcha min-h-[78px]"
</div>
<div class="min-h-[320px] bg-neutral-400 lg:min-h-full" aria-hidden="true"></div>
<div class="flex flex-col justify-center border-t border-black px-8 py-16 lg:border-t-0 lg:px-16">
<x-contact-details :store="$store" :email="$contactEmail" />
</div>
</section>
+14
View File
@@ -42,6 +42,13 @@
#MessageViewBody, #MessageWebViewDiv { width: 100% !important; }
u + #email-body a { color: inherit; text-decoration: none; }
/* Admin-authored rich text (e.g. bank transfer instructions). */
.email-rich p, .email-rich ul, .email-rich ol, .email-rich table { margin: 0 0 12px; }
.email-rich > :last-child { margin-bottom: 0; }
.email-rich a { color: #000000; text-decoration: underline; }
.email-rich table { width: 100%; border-collapse: collapse; }
.email-rich th, .email-rich td { padding: 6px 8px; border: 1px solid #e5e5e5; text-align: left; vertical-align: top; }
@media only screen and (max-width: 480px) {
.email-container { width: 100% !important; max-width: 100% !important; }
.email-header { padding: 24px 20px 12px !important; }
@@ -83,6 +90,13 @@
<tr>
<td class="email-footer" align="center" style="padding:24px 24px 40px;font-family:'Manrope',Arial,Helvetica,sans-serif;font-size:13px;line-height:1.6;color:#7a7a7a;">
@yield('footer')
@if ($stoicSettings->socialLinks())
<p style="margin:12px 0 0;">
@foreach ($stoicSettings->socialLinks() as $social)
@unless ($loop->first)&nbsp;&middot;&nbsp;@endunless<a href="{{ $social['url'] }}" target="_blank" style="color:#7a7a7a;text-decoration:underline;">{{ $social['label'] }}</a>
@endforeach
</p>
@endif
<p style="margin:12px 0 0;">
<a href="{{ url('/') }}" style="color:#7a7a7a;text-decoration:underline;">3dealer.gr</a>
&nbsp;&middot;&nbsp;&copy; {{ date('Y') }} 3Dealer
+15
View File
@@ -3,6 +3,21 @@
@section('title', $page->meta_title)
@section('description', $page->meta_description)
{{-- Organization structured data, home page only. Name from core's StoreDetails,
social profiles (sameAs) from Stoic settings.md. --}}
@push('seo')
<script type="application/ld+json">
{!! json_encode(array_filter([
'@context' => 'https://schema.org',
'@type' => 'Organization',
'name' => app(\Modules\Core\Store\Services\StoreDetailsService::class)->current()->translate('name') ?: config('app.name'),
'url' => url('/'),
'logo' => asset('images/logo.png'),
'sameAs' => array_column($stoicSettings->socialLinks(), 'url'),
]), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG) !!}
</script>
@endpush
@section('content')
<div class="border-b border-black">
+3 -1
View File
@@ -14,7 +14,9 @@
<link rel="manifest" href="/site.webmanifest" />
<title>@yield('title', config('app.name'))</title>
<meta name="description" content="@yield('description', '')">
{{-- Falls back to Stoic's default when a page sets none, or sets it to an
empty meta_description (@yield's own default only covers "not set"). --}}
<meta name="description" content="{{ trim($__env->yieldContent('description')) ?: $stoicSettings->get('meta_description', '') }}">
{{-- Reciprocal hreflang: self-reference + every alternate locale + x-default --}}
@isset($currentLocale)
+1 -1
View File
@@ -20,7 +20,7 @@
</div>
<div class="legal-content" data-stoic="pages/{{ $page->slug }}#body">
{!! Str::markdown($page->content ?? '') !!}
{!! Str::markdown($content) !!}
</div>
</section>
+2
View File
@@ -281,6 +281,8 @@ class="mt-20"
'price' => $recommendation['price'],
'image' => $recommendation['image'],
'href' => route('product.show', ['id' => $recommendation['id']]),
'variantId' => $recommendation['variant_id'] ?? null,
'hasCustomFields' => $recommendation['has_custom_fields'] ?? false,
])->all()"
/>
@endif
@@ -27,6 +27,10 @@
$email = $order->billingAddress?->contact_email ?? $order->shippingAddress?->contact_email;
$comments = $order->shippingAddress?->delivery_instructions;
// Sanitized HTML from Store Details, only for bank transfer orders.
$bankTransferInstructions = app(\Modules\Core\Store\Services\StoreDetailsService::class)
->bankTransferInstructionsFor($order, 'el');
$muted = 'color:#5c5c5c;font-size:14px;';
$font = "font-family:'Manrope',Arial,Helvetica,sans-serif;";
@endphp
@@ -53,6 +57,12 @@
])
</div>
@if ($bankTransferInstructions)
<div class="email-rich" style="margin:0 0 40px;padding:20px;border:1px solid #000000;{{ $font }}font-size:15px;line-height:1.6;color:#000000;">
{!! $bankTransferInstructions !!}
</div>
@endif
{{-- Items --}}
@include('emails.partials.section-heading', ['text' => 'Προϊόντα'])