@extends('layouts.app')
@php
$pageUrl = route('trainers.show', $trainer['key']);
$name = $trainer['name'];
$shortName = trim(explode(',', $name)[0]);
$areas = $trainer['series'];
$desc = $trainer['bio'] !== ''
? \Illuminate\Support\Str::limit($trainer['bio'], 155)
: "Profil {$name}, trainer Value Consult".($areas ? ' di bidang '.implode(', ', array_slice($areas, 0, 3)) : '').'.';
$wa = preg_replace('/\D+/', '', (string) config('contact.wa_inhouse'));
$waUrl = $wa ? 'https://wa.me/'.$wa.'?text='.rawurlencode("Halo Value Consult, saya ingin berkonsultasi tentang in-house training bersama trainer {$name}.") : null;
$base = request()->getBaseUrl();
@endphp
@section('title', $shortName.' - Trainer | Value Consult Training')
@section('description', $desc)
@section('canonical', $pageUrl)
@section('og_type', 'profile')
@if ($trainer['avatar'])@section('og_image', $trainer['avatar'])@endif
{{-- Profil yang hanya berisi nama terlalu tipis untuk diindeks. --}}
@if (! $blocks)@section('robots', 'noindex, follow')@endif
@push('head')
@php
$graph = ['@context' => 'https://schema.org', '@graph' => [
['@type' => 'BreadcrumbList', 'itemListElement' => collect([['Beranda', url('/')], ['Our Trainers', route('trainers.index')], [$name, $pageUrl]])
->map(fn ($c, $i) => ['@type' => 'ListItem', 'position' => $i + 1, 'name' => $c[0], 'item' => $c[1]])->all()],
['@type' => 'ProfilePage', '@id' => $pageUrl, 'url' => $pageUrl, 'inLanguage' => 'id-ID', 'mainEntity' => array_filter([
'@type' => 'Person', 'name' => $name, 'description' => $trainer['bio'] ?: null, 'image' => $trainer['avatar'],
'jobTitle' => 'Trainer', 'knowsAbout' => array_values($areas) ?: null,
'affiliation' => ['@type' => 'Organization', '@id' => url('/').'#organization', 'name' => 'Value Consult Training'],
])],
]];
@endphp
@endpush
@section('content')
{{-- HERO --}}
@endif
{{ $name }}
@if ($areas)
@foreach ($areas as $slug => $area)
@endif
{{ $block['text'] }}
@endif @emptyProfil lengkap {{ $shortName }} sedang disiapkan. Hubungi tim kami untuk informasi lebih lanjut.
@endforelse