Add Blocks Usage Documentation: Created a comprehensive guide for the block-based page creation system, detailing the available blocks, their usage, and customization options. Included example data and instructions for integrating blocks into the admin panel.

This commit is contained in:
Ümit Tunç
2025-10-30 15:28:54 -03:00
parent 3b238d23cc
commit 1791108b1e
4 changed files with 525 additions and 52 deletions
+9 -3
View File
@@ -2,13 +2,19 @@
@section('content')
@php $blocks = $sections ?? []; @endphp
@if(is_array($blocks))
@if(is_array($blocks) && !empty($blocks))
@foreach($blocks as $block)
@php $type = $block['type'] ?? null; @endphp
@if($type && view()->exists("components.templates.$type"))
@include("components.templates.$type", ['data' => $block['props'] ?? $block])
@if($type && view()->exists("components.blocks.$type"))
<x-dynamic-component :component="'blocks.'.$type" :data="$block['data'] ?? $block" />
@endif
@endforeach
@else
{{-- Hiç blok yoksa placeholder göster --}}
<div class="container py-24 text-center">
<h2 class="!text-[2rem] !mb-4">Bu sayfa henüz içerik eklenmemiş</h2>
<p>Admin panelinden bu sayfaya bloklar ekleyebilirsiniz.</p>
</div>
@endif
@endsection