@php use App\Classes\Site; @endphp
@php /** @var \App\Models\Page $page */ @endphp
@php
if(is_array($page->element_images)) {
$element_image = $page->element_images[0] ?? null;
} else {
$element_image = $page->element_images->first();
}
$spotlight_class = $page->parent?->element_type == App\Classes\Prefs::$web_page_element_types['gallery']['id'] ? 'spotlight' : '';
$stand_alone = !in_array($page->parent?->element_type_key, ['gallery', 'wide_block']);
@endphp
{{-- komentar za lažje urejanje v Developer Tools - takoj za @endphp --}}
@if(!empty(App\Classes\Prefs::$web_edit_mode) or App::isLocal())
@endif
@if(($element_image['pivot']['caption'] ?? null) and ($context ?? null) != 'mail' and $stand_alone)
{!! $element_image['pivot']['caption'] !!}
@else
@if(($context ?? null) == 'mail' and $uri['address'])
@endif
{{-- $element_image je lahko tudi array, če delamo predogled urejanja, zato moramo uporabiti array sintakso --}}
@if(($context ?? null) == 'mail' and $uri['address'])
@endif
@endif