v0.9.0
This commit is contained in:
commit
860182098c
277 files changed
+18338
No files matched your search
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex">
|
||||
<title>{{ $status === 429 ? 'Too many attempts' : 'Blocked' }}</title>
|
||||
</head>
|
||||
<body style="font-family: system-ui, sans-serif; max-width: 32rem; margin: 4rem auto; padding: 0 1rem;">
|
||||
<h1>{{ $status === 429 ? 'Too many attempts' : 'Blocked' }}</h1>
|
||||
<p>{{ $message }}</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-before-after {{ $classes }}">
|
||||
<div class="mb-inner mb-split">
|
||||
<figure><img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($data['before'] ?? '') }}" alt="{{ __('Before') }}" loading="lazy"><figcaption>{{ __('Before') }}</figcaption></figure>
|
||||
<figure><img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($data['after'] ?? '') }}" alt="{{ __('After') }}" loading="lazy"><figcaption>{{ __('After') }}</figcaption></figure>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,23 @@
|
||||
@php
|
||||
// What a record shows is found under the usual names: title or name, summary / story / quote / role, photo, url.
|
||||
$pick = fn (array $item, array $keys) => collect($keys)->map(fn ($key) => $item[$key] ?? null)->first(fn ($value) => is_string($value) && $value !== '');
|
||||
@endphp
|
||||
<section class="mb-block mb-cards {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
@if (($data['eyebrow'] ?? '') !== '')<p class="mb-eyebrow">{{ $data['eyebrow'] }}</p>@endif
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
<div class="mb-grid">
|
||||
@foreach ($items as $item)
|
||||
@php($url = $pick($item, ['url', 'link']))
|
||||
<article class="mb-card">
|
||||
@if ($photo = $pick($item, ['photo', 'picture', 'image']))<img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($photo) }}" alt="" loading="lazy">@endif
|
||||
<h3>@if ($url)<a href="{{ \IriksIT\Manager\Support\Blocks::safeUrl($url) }}">{{ $pick($item, ['title', 'name', 'label']) }}</a>@else{{ $pick($item, ['title', 'name', 'label']) }}@endif</h3>
|
||||
@if ($text = $pick($item, ['summary', 'story', 'quote', 'intro', 'role']))<p>{{ $text }}</p>@endif
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
@if (($data['button_label'] ?? '') !== '')
|
||||
@include('manager::blocks.partials.buttons', ['buttons' => [['label' => $data['button_label'], 'url' => $data['button_url'] ?? '', 'style' => 'secondary']]])
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,3 @@
|
||||
<section class="mb-block mb-chips {{ $classes }}">
|
||||
<ul class="mb-inner">@foreach ($data['items'] ?? [] as $chip)<li>{{ $chip }}</li>@endforeach</ul>
|
||||
</section>
|
||||
@@ -0,0 +1,7 @@
|
||||
<section class="mb-block mb-cta {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
<h2>{{ $data['title'] }}</h2>
|
||||
@if (($data['text'] ?? '') !== '')<p>{{ $data['text'] }}</p>@endif
|
||||
@include('manager::blocks.partials.buttons', ['buttons' => $data['buttons'] ?? []])
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
<hr class="mb-block mb-divider {{ $classes }}">
|
||||
@@ -0,0 +1,11 @@
|
||||
<section class="mb-block mb-faq {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
@foreach ($data['items'] ?? [] as $item)
|
||||
<details><summary>{{ $item['question'] ?? '' }}</summary><p>{{ $item['answer'] ?? '' }}</p></details>
|
||||
@endforeach
|
||||
</div>
|
||||
@foreach (\IriksIT\Manager\Support\Blocks::structuredData([$block]) as $schema)
|
||||
<script type="application/ld+json">{!! json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP) !!}</script>
|
||||
@endforeach
|
||||
</section>
|
||||
@@ -0,0 +1,33 @@
|
||||
@php
|
||||
$name = (string) ($data['form'] ?? '');
|
||||
$definition = (array) (config('manager.leads.form.forms')[$name] ?? []);
|
||||
$require = (array) ($definition['require'] ?? ['name']);
|
||||
$path = '/'.trim((string) config('manager.leads.form.path', 'requests'), '/').'/'.$name;
|
||||
$honeypot = (string) config('manager.leads.form.honeypot', 'website');
|
||||
$labels = ['name' => __('Your name'), 'contact' => __('Phone number or mail address'), 'phone' => __('Phone number'), 'email' => __('Mail address'), 'subject' => __('Subject'), 'location' => __('Place'), 'message' => __('Your message')];
|
||||
@endphp
|
||||
@if ($definition !== [])
|
||||
<section class="mb-block mb-form {{ $classes }}">
|
||||
<form class="mb-inner" method="post" action="{{ $path }}">
|
||||
@csrf
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
@if (($data['text'] ?? '') !== '')<p>{{ $data['text'] }}</p>@endif
|
||||
@if (session('manager_lead_sent'))<p class="mb-sent" role="status">{{ __('Thank you, we will be in touch.') }}</p>@endif
|
||||
@foreach (array_unique(['name', ...$require]) as $field)
|
||||
@if (isset($labels[$field]))
|
||||
<label>{{ $labels[$field] }}
|
||||
@if ($field === 'message')<textarea name="{{ $field }}" rows="4" required></textarea>
|
||||
@else<input name="{{ $field }}" type="{{ $field === 'email' ? 'email' : 'text' }}" required>@endif
|
||||
</label>
|
||||
@endif
|
||||
@endforeach
|
||||
@if ($honeypot !== '')<input class="mb-hp" type="text" name="{{ $honeypot }}" tabindex="-1" autocomplete="off" aria-hidden="true">@endif
|
||||
<input type="hidden" name="form_token" value="{{ \IriksIT\Manager\Support\Leads\Intake::formToken() }}">
|
||||
@if (\IriksIT\Manager\Support\Login\Turnstile::configured())
|
||||
<div class="cf-turnstile" data-sitekey="{{ config('manager.login.turnstile.site_key') }}"></div>
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
@endif
|
||||
<button class="mb-btn mb-btn--primary" type="submit">{{ __('Send') }}</button>
|
||||
</form>
|
||||
</section>
|
||||
@endif
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-gallery {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
<div class="mb-grid">@foreach ($data['photos'] ?? [] as $photo)<img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($photo) }}" alt="" loading="lazy">@endforeach</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,9 @@
|
||||
<section class="mb-block mb-hero {{ $classes }}" @if (! empty($data['photo'])) style="--mb-hero-image: url('{{ \IriksIT\Manager\Support\Blocks::safeUrl($data['photo']) }}')" @endif>
|
||||
<div class="mb-inner">
|
||||
@if (($data['eyebrow'] ?? '') !== '')<p class="mb-eyebrow">{{ $data['eyebrow'] }}</p>@endif
|
||||
<h1>{{ $data['title'] }}</h1>
|
||||
@if (! empty($data['roles']))<p class="mb-roles">{{ implode(' · ', $data['roles']) }}</p>@endif
|
||||
@if (($data['intro'] ?? '') !== '')<p class="mb-lead">{{ $data['intro'] }}</p>@endif
|
||||
@include('manager::blocks.partials.buttons', ['buttons' => $data['buttons'] ?? []])
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-image {{ $classes }}">
|
||||
<figure class="mb-inner">
|
||||
<img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($data['photo']) }}" alt="{{ $data['caption'] ?? '' }}" loading="lazy">
|
||||
@if (($data['caption'] ?? '') !== '')<figcaption>{{ $data['caption'] }}</figcaption>@endif
|
||||
</figure>
|
||||
</section>
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-page-title {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
<h1>{{ $data['title'] }}</h1>
|
||||
@if (($data['intro'] ?? '') !== '')<div class="mb-prose">{!! $data['intro_html'] !!}</div>@endif
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,9 @@
|
||||
@if (! empty($buttons))
|
||||
<p class="mb-buttons">
|
||||
@foreach ($buttons as $button)
|
||||
@if (($button['label'] ?? '') !== '')
|
||||
<a class="mb-btn mb-btn--{{ ($button['style'] ?? '') === 'secondary' ? 'secondary' : 'primary' }}" href="{{ \IriksIT\Manager\Support\Blocks::safeUrl($button['url'] ?? '') }}">{{ $button['label'] }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</p>
|
||||
@endif
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-points-box {{ $classes }}">
|
||||
<div class="mb-inner">
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
<ul class="mb-points">@foreach ($data['points'] ?? [] as $point)<li>{{ $point }}</li>@endforeach</ul>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,6 @@
|
||||
<section class="mb-block mb-quote {{ $classes }}">
|
||||
<blockquote class="mb-inner">
|
||||
<p>{{ $data['quote'] }}</p>
|
||||
@if (($data['name'] ?? '') !== '')<footer>{{ $data['name'] }}@if (($data['role'] ?? '') !== '') <span>{{ $data['role'] }}</span>@endif</footer>@endif
|
||||
</blockquote>
|
||||
</section>
|
||||
@@ -0,0 +1,3 @@
|
||||
<section class="mb-block mb-rich-text {{ $classes }}">
|
||||
<div class="mb-inner mb-prose">{!! $data['body_html'] !!}</div>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
<div class="mb-block mb-spacer {{ $classes }}" aria-hidden="true"></div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<section class="mb-block mb-stats {{ $classes }}">
|
||||
<dl class="mb-inner mb-grid">
|
||||
@foreach ($data['items'] ?? [] as $item)
|
||||
<div><dt>{{ $item['label'] ?? '' }}</dt><dd>{{ $item['value'] ?? '' }}{{ $item['suffix'] ?? '' }}</dd></div>
|
||||
@endforeach
|
||||
</dl>
|
||||
</section>
|
||||
@@ -0,0 +1,12 @@
|
||||
<section class="mb-block mb-text-media {{ $classes }}">
|
||||
<div class="mb-inner mb-split">
|
||||
<div class="mb-text">
|
||||
@if (($data['title'] ?? '') !== '')<h2>{{ $data['title'] }}</h2>@endif
|
||||
<div class="mb-prose">{!! $data['body_html'] !!}</div>
|
||||
@if (! empty($data['points']))<ul class="mb-points">@foreach ($data['points'] as $point)<li>{{ $point }}</li>@endforeach</ul>@endif
|
||||
</div>
|
||||
@if (! empty($data['photo']))
|
||||
<figure class="mb-media"><img src="{{ \IriksIT\Manager\Support\Blocks::safeUrl($data['photo']) }}" alt="{{ $data['caption'] ?? $data['title'] ?? '' }}" loading="lazy">@if (($data['caption'] ?? '') !== '')<figcaption>{{ $data['caption'] }}</figcaption>@endif</figure>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,14 @@
|
||||
@props(['page' => null, 'blocks' => null])
|
||||
{{--
|
||||
The blocks of a page, drawn with the views of the types. `<x-manager::blocks page="home" />` reads the page; `:blocks="$blocks"` takes
|
||||
what `Blocks::for()` gave. A view of the site (resources/views/blocks/<type>.blade.php) wins over the package's, a type without a view draws nothing.
|
||||
--}}
|
||||
@php
|
||||
$list = $blocks ?? ($page !== null ? \IriksIT\Manager\Support\Blocks::for((string) $page) : []);
|
||||
@endphp
|
||||
@foreach ($list as $block)
|
||||
@php($view = \IriksIT\Manager\Support\Blocks::view((string) $block['type']))
|
||||
@if ($view !== null)
|
||||
@include($view, ['block' => $block, 'data' => $block['data'], 'style' => $block['style'], 'items' => $block['items'] ?? [], 'classes' => \IriksIT\Manager\Support\Blocks::classes($block['style'])])
|
||||
@endif
|
||||
@endforeach
|
||||
@@ -0,0 +1,5 @@
|
||||
{{-- Counts the page in the statistics of the manager (module `statistics`). Put it once in the layout of the public site. --}}
|
||||
@props(['spa' => false])
|
||||
@if (\Illuminate\Support\Facades\Route::has(\IriksIT\Manager\Support\Names::route('pulse.script')))
|
||||
<script src="{{ route(\IriksIT\Manager\Support\Names::route('pulse.script'), [], false) }}" defer @if ($spa) data-spa @endif></script>
|
||||
@endif
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Manager</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Manager</h1>
|
||||
<ul>
|
||||
@foreach ($navigation as $item)
|
||||
<li><a href="{{ $item['href'] }}">{{ $item['label'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<p>{{ __('Thank you, :name. We received your message and get back to you.', ['name' => $lead->name]) }}</p>
|
||||
@if ($lead->message)
|
||||
<blockquote style="white-space: pre-line">{{ $lead->message }}</blockquote>
|
||||
@endif
|
||||
@@ -0,0 +1,16 @@
|
||||
<p><strong>{{ $lead->kindLabel() }}</strong> — {{ $lead->name }}@if ($lead->subject): {{ $lead->subject }}@endif</p>
|
||||
@if ($lead->message)
|
||||
<p style="white-space: pre-line">{{ $lead->message }}</p>
|
||||
@endif
|
||||
@foreach (($lead->answers ?? []) as $question => $answer)
|
||||
<p>{{ $question }}: <strong>{{ $answer }}</strong></p>
|
||||
@endforeach
|
||||
@if ($lead->location)
|
||||
<p>{{ __('Where') }}: {{ $lead->location }}</p>
|
||||
@endif
|
||||
<p>
|
||||
@if ($callLink) <a href="{{ $callLink }}">{{ __('Call') }}</a> @endif
|
||||
@if ($whatsappLink) · <a href="{{ $whatsappLink }}">WhatsApp</a> @endif
|
||||
@if ($mailLink) · <a href="{{ $mailLink }}">{{ __('Mail') }}</a> @endif
|
||||
· <a href="{{ $managerLink }}">{{ __('Open in the manager') }}</a>
|
||||
</p>
|
||||
@@ -0,0 +1,22 @@
|
||||
{{--
|
||||
The plain page of a site that lets the package draw it (`manager.frontend.mode` = package). Put a file of the same name in
|
||||
resources/views/vendor/manager/public/layout.blade.php to make it yours, or point `manager.frontend.layout` at a view of your own;
|
||||
it gets $title, $description, $blocks, $css (the plain stylesheet of the blocks) and $slug (the faq block prints its own structured data).
|
||||
--}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title }}</title>
|
||||
@if ($description)
|
||||
<meta name="description" content="{{ $description }}">
|
||||
@endif
|
||||
<style>{!! $css !!}</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<x-manager::blocks :blocks="$blocks" />
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<title>{{ $title }}</title>
|
||||
{{-- The theme: values were checked by IriksIT\Manager\Support\Themes, nothing else goes in here. --}}
|
||||
<style>{!! $css !!}</style>
|
||||
<link rel="stylesheet" href="{{ route(\IriksIT\Manager\Support\Names::route('assets'), ['file' => 'manager.css'], false) }}?v={{ $version }}">
|
||||
</head>
|
||||
<body>
|
||||
@if ($extensions !== [])
|
||||
{{-- A bundle of the site imports `vue`: this makes it the Vue of the screens. Before any module script. --}}
|
||||
<script type="importmap">{!! json_encode(['imports' => ['vue' => route(\IriksIT\Manager\Support\Names::route('assets'), ['file' => 'vue.js'], false).'?v='.$version]], JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP) !!}</script>
|
||||
@endif
|
||||
<div id="manager"></div>
|
||||
<script type="application/json" id="manager-boot">{!! json_encode($boot, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP) !!}</script>
|
||||
<script type="module" src="{{ route(\IriksIT\Manager\Support\Names::route('assets'), ['file' => 'manager.js'], false) }}?v={{ $version }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user