Files
aibuddytool/resources/views/vendor/laravel_editorjs/blocks/image.blade.php
Charles T ded1643e5f Add (post manage)
Add (post country viewing)
2023-07-28 02:29:11 +08:00

22 lines
536 B
PHP

@php
$classes = '';
if ($data['stretched']) {
$classes .= ' image--stretched';
}
if ($data['withBorder']) {
$classes .= ' image--bordered';
}
if ($data['withBackground']) {
$classes .= ' image--backgrounded';
}
@endphp
<figure class="image {{ $classes }}">
<img src="{{ $data['file']['url'] }}" alt="{{ $data['caption'] ?: '' }}">
@if (!empty($data['caption']))
<footer class="image-caption">
{{ $data['caption'] }}
</footer>
@endif
</figure>