@php /** @var array $sections */ $sections = $sections ?? []; $name = $name ?? 'Curriculum Vitae'; $contact = $sections['Contact'] ?? null; $summary = $sections['Summary'] ?? null; $skills = $sections['Skills'] ?? null; $experience = $sections['Experience'] ?? null; $education = $sections['Education'] ?? null; $projects = $sections['Projects'] ?? null; $body = $body ?? null; $hasStructuredSections = $hasStructuredSections ?? (bool) ($contact || $summary || $skills || $experience || $education || $projects); // Build initials for the avatar circle from the candidate's display name. $words = preg_split('/\s+/', trim((string) $name)) ?: []; $initials = ''; foreach (array_slice($words, 0, 2) as $w) { $initials .= mb_strtoupper(mb_substr((string) $w, 0, 1)); } $initials = $initials ?: 'CV'; @endphp {{ $name }}
@if ($hasStructuredSections) @if ($summary)

Profile

{!! $summary !!}
@endif @if ($experience)

Experience

{!! $experience !!}
@endif @if ($education)

Education

{!! $education !!}
@endif @if ($projects)

Projects

{!! $projects !!}
@endif @elseif ($body)
{!! $body !!}
@endif