{{-- Legal document renderer (legal notice, privacy policy) — looped from resources/lang/{locale}/legal.php. Each section: ['title' => ..., 'blocks' => [...]], a block being one of ['p' => text] paragraph ['lines' => [text...]] unbulleted lines (identity, address) ['list' => [text...]] bulleted list ['h3' => text] sub-heading ['table' => ['head' => [...], 'rows' => [[...], ...]]] Texts are escaped, then these placeholders become links: :contact_email, :hiring_email, :privacy_policy, :cnil_complaint --}} @php $link = fn (string $href, string $label, bool $external = false) => '' . e($label) . ''; $links = [ ':contact_email' => $link('mailto:' . config('wasoria.contact_email'), config('wasoria.contact_email')), ':hiring_email' => $link('mailto:' . config('wasoria.hiring_email'), config('wasoria.hiring_email')), ':privacy_policy' => $link(localized_route('privacy-policy'), __('footer.privacy_policy')), ':cnil_complaint' => $link('https://www.cnil.fr/fr/plaintes', 'www.cnil.fr/fr/plaintes', true), ]; $render = fn (string $text) => strtr(e($text), $links); @endphp
@foreach($sections as $section)

{{ $section['title'] }}

@foreach($section['blocks'] as $block) @if(isset($block['p']))

{!! $render($block['p']) !!}

@elseif(isset($block['lines']))
    @foreach($block['lines'] as $line)
  • {!! $render($line) !!}
  • @endforeach
@elseif(isset($block['list']))
    @foreach($block['list'] as $item)
  • {!! $render($item) !!}
  • @endforeach
@elseif(isset($block['h3']))

{{ $block['h3'] }}

@elseif(isset($block['table']))
@foreach($block['table']['head'] as $heading) @endforeach @foreach($block['table']['rows'] as $row) @foreach($row as $cell) @endforeach @endforeach
{{ $heading }}
{!! $render($cell) !!}
@endif @endforeach
@endforeach