@extends('layouts.app') @section('seo_title', $page->seo_title) @section('seo_description', $page->seo_description) @section('seo_keywords', $page->seo_keywords) @section('content') @php $locale = app()->getLocale(); $title = $page->getTranslation('titre', $locale, false) ?: $page->getTranslation('titre', 'fr', false) ?: $page->getTranslation('titre', 'en', false); $parentTitle = $page->parent ? ( $page->parent->getTranslation('titre', $locale, false) ?: $page->parent->getTranslation('titre', 'fr', false) ?: $page->parent->getTranslation('titre', 'en', false) ) : null; $parentSlug = $page->parent ? ( $page->parent->getTranslation('slug', $locale, false) ?: $page->parent->getTranslation('slug', 'fr', false) ?: $page->parent->getTranslation('slug', 'en', false) ) : null; $content = $page->getTranslation('content', $locale, false) ?: $page->getTranslation('content', 'fr', false) ?: $page->getTranslation('content', 'en', false); @endphp
@if($page && $page->cover) {{ $page->title ?? '' }} @endif

{{ $title }}

@php $locale = app()->getLocale(); @endphp @if($page->sections && $page->sections->count()) @foreach($page->sections as $section) @php $sectionTitle = $section->getTranslation('titre', $locale, false) ?: $section->getTranslation('titre', 'fr', false) ?: $section->getTranslation('titre', 'en', false); $sectionContent = $section->getTranslation('paragraphe', $locale, false) ?: $section->getTranslation('paragraphe', 'fr', false) ?: $section->getTranslation('paragraphe', 'en', false); $imagePosition = $section->image_position ?? 'right'; $images = is_array($section->image) ? $section->image : []; $mainImage = $images[0] ?? null; $smallImage = $images[1] ?? null; @endphp
@if($imagePosition === 'left') {{-- Images à gauche --}}
{{-- anneau décoratif --}}
{{-- étoile rose --}}
{{-- zigzag --}}
@if($mainImage) {{ $sectionTitle }} @endif @if($smallImage) {{ $sectionTitle }} @endif
{{-- Texte à droite --}}
{{-- bulle décorative --}}
{{-- petit plus --}}
@if($sectionTitle)
{{-- mini étoile --}}

{{ $sectionTitle }}

@endif @if($sectionContent)
{!! $sectionContent !!}
@endif
@else {{-- Texte à gauche --}}
{{-- bulle décorative --}}
{{-- petit plus --}}
@if($sectionTitle)
{{-- mini étoile --}}

{{ $sectionTitle }}

@endif @if($sectionContent)
{!! $sectionContent !!}
@endif
{{-- Images à droite --}}
{{-- anneau décoratif à l’extrémité gauche haute --}}
{{-- étoile rose à gauche hors image --}}
{{-- zigzag en bas à gauche hors image --}}
@if($mainImage) {{ $sectionTitle }} @endif @if($smallImage) {{ $sectionTitle }} @endif
@endif
@endforeach @endif @endsection