mirror of https://git.stjo.hn/planiverse
Display image attachments as previews
Display image attachments as previews with a link to the original.
This commit is contained in:
parent
a134a6e383
commit
cfaf2009ab
|
@ -2,16 +2,20 @@
|
|||
<p>{!! $status['content'] !!}</p>
|
||||
@foreach ($status['media_attachments'] as $attachment)
|
||||
@if ($attachment['type'] === 'image')
|
||||
<p>
|
||||
<img
|
||||
src="{{
|
||||
$attachment['remote_url'] === null
|
||||
? $attachment['url']
|
||||
: $attachment['remote_url']
|
||||
}}"
|
||||
alt="{{ $attachment['description'] }}"
|
||||
/>
|
||||
</p>
|
||||
<figure>
|
||||
<a href="{{
|
||||
$attachment['remote_url'] === null
|
||||
? $attachment['url']
|
||||
: $attachment['remote_url']
|
||||
}}"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
src="{{ $attachment['preview_url'] }}"
|
||||
alt="{{ $attachment['description'] }}"
|
||||
/>
|
||||
</a>
|
||||
</figure>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
|
|
Loading…
Reference in New Issue