@use('App\Support\Img') @props(['person']) @php $words = preg_split('/\s+/', trim($person->name)); $last = count($words) > 1 ? array_pop($words) : null; $first = $last ? implode(' ', $words) : null; $last = $last ?? $words[0]; $links = array_values(array_filter([ ['github', $person->github, 'GitHub'], ['linkedin', $person->linkedin, 'LinkedIn'], ['facebook', $person->facebook, 'Facebook'], ['mail', $person->email ? 'mailto:'.$person->email : null, 'Email'], ], fn ($l) => $l[1])); $dots = 'background-image:radial-gradient(#4c1d95 1.3px,transparent 1.5px);background-size:9px 9px'; @endphp {{-- Fixed-size card: width and height never change, whatever image is uploaded. --}}
{{-- Photo box: fixed size, the whole photo always fits inside (nothing is cropped) --}}
@if($person->photo) {{ $person->name }} @else @endif
{{-- Info panel --}}

@if($first){{ $first }} @endif{{ $last }}

{{ $person->designation }}

@foreach($links as [$icon, $url, $label]) @unless($loop->first)@endunless @endforeach