File: D:/HostingSpaces/stafa/stafa.nl/resources/views/site/organisms/componentables/testimonial.blade.php
@section('componentable-area-' . $loop->iteration)
@php
$testimonial = $component->testimonials->first()->translation;
$moodImage = $component->testimonials->first()->documents->where('key','=','Documents-moodimage')->first()->medium_image_url ?? '/img/stafa_luchtfoto.png';
$moodImageAltTag = $component->testimonials->first()->documents->where('key','=','Documents-moodimage')->first()->name ?? '';
$personImage = $component->testimonials->first()->documents->where('key','=','Documents-contactimage')->first()->thumb_image_url ?? '/img/person-placeholder.gif';
$personImageAltTag = $component->testimonials->first()->documents->where('key','=','Documents-contactimage')->first()->name ?? '';
@endphp
<div class="o-ci o-ci--is-indented">
<div class="o-ci__content">
<div class="o-ci__body">
<div class="c-testimonial">
@if(!empty($testimonial->title))
<p class="c-testimonial__comment">{{$testimonial->title}}</p>
@endif
@if(!empty($testimonial->header))
<h3 class="c-testimonial__company">{{$testimonial->header}}</h3>
@endif
@if(!empty($testimonial->description))
<p class="c-testimonial__body">{{$testimonial->description}}</p>
@endif
@if(!empty($testimonial->person) || !empty($testimonial->function))
<div class="c-testimonial__person">
<div class="c-person c-person--small">
<img class="c-person__image" src="{{$personImage}}" alt="{{$personImageAltTag}}">
@if(!empty($testimonial->person))
<p class="c-person__name">{{$testimonial->person}}</p>
@endif
@if(!empty($testimonial->function))
<p class="c-person__subtitle">{{$testimonial->function}}</p>
@endif
</div>
</div>
@endif
</div>
</div>
</div>
<div class="o-ci__image">
<div class="c-hex-shape c-hex-shape--ornament" data-pos="right">
<img class="c-hex-shape__image" src="{{$moodImage}}" alt="{{$moodImageAltTag}}">
</div>
</div>
</div>
@endsection
@include('site.organisms.componentables.componentableRow')