1
0
cms11/resources/views/components/image.blade.php

25 lines
1.1 KiB
PHP

<figure>
@if (!empty($originalData['prompt']) && empty($options['nolink']))
<figcaption class="markdown-body">
{!! (new \App\Services\Markdown\Formatter($originalData['prompt']))->render() !!}
</figcaption>
@endif
@if(!empty($options['nolink']))
<img src="{{ $variantUrl }}" @if (!empty($originalData['class'])) class="{{ $originalData['class'] }}" @endif />
@else
<a href="{{ $originalUrl }}" title="Voir l'image à taille réelle">
<img src="{{ $variantUrl }}" @if (!empty($originalData['class'])) class="{{ $originalData['class'] }}" @endif />
</a>
@endif
@if (empty($options['nolink']) && (!empty($originalData['title']) || !empty($originalData['attribution'])))
<figcaption class="markdown-body">
@if (!empty($originalData['title']))
{!! (new \App\Services\Markdown\Formatter($originalData['title']))->render() !!}
@endif
@if (!empty($originalData['attribution']))
{!! (new \App\Services\Markdown\Formatter($originalData['attribution']))->render() !!}
@endif
</figcaption>
@endif
</figure>