Implemented a block editor for changing the layout of the page
This commit is contained in:
27
resources/views/components/blocks/divider.blade.php
Normal file
27
resources/views/components/blocks/divider.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@props(['block'])
|
||||
|
||||
@php
|
||||
/** @var \App\Models\PageBlock $block */
|
||||
$c = $block->content ?? [];
|
||||
$style = (string) data_get($c, 'style', 'line');
|
||||
$spacing = (string) data_get($c, 'spacing', 'medium');
|
||||
$py = match ($spacing) {
|
||||
'small' => 'py-2',
|
||||
'large' => 'py-6',
|
||||
default => 'py-4',
|
||||
};
|
||||
@endphp
|
||||
|
||||
<div class="w-full {{ $py }}" x-show="phase !== 'thanks'" x-cloak>
|
||||
@if ($style === 'space_only')
|
||||
<div class="h-2" aria-hidden="true"></div>
|
||||
@elseif ($style === 'dots')
|
||||
<div class="flex justify-center gap-2" aria-hidden="true">
|
||||
@foreach (range(1, 5) as $_)
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-white/35"></span>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="h-px w-full bg-gradient-to-r from-transparent via-white/25 to-transparent" aria-hidden="true"></div>
|
||||
@endif
|
||||
</div>
|
||||
Reference in New Issue
Block a user