v0.9.1
This commit is contained in:
commit
5b230c75aa
278 files changed
+18390
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user