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>
|
<p>{!! $status['content'] !!}</p>
|
||||||
@foreach ($status['media_attachments'] as $attachment)
|
@foreach ($status['media_attachments'] as $attachment)
|
||||||
@if ($attachment['type'] === 'image')
|
@if ($attachment['type'] === 'image')
|
||||||
<p>
|
<figure>
|
||||||
<img
|
<a href="{{
|
||||||
src="{{
|
|
||||||
$attachment['remote_url'] === null
|
$attachment['remote_url'] === null
|
||||||
? $attachment['url']
|
? $attachment['url']
|
||||||
: $attachment['remote_url']
|
: $attachment['remote_url']
|
||||||
}}"
|
}}"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="{{ $attachment['preview_url'] }}"
|
||||||
alt="{{ $attachment['description'] }}"
|
alt="{{ $attachment['description'] }}"
|
||||||
/>
|
/>
|
||||||
</p>
|
</a>
|
||||||
|
</figure>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
|
|
Loading…
Reference in New Issue