Add audio/video embeds to checkins
This commit is contained in:
parent
5d53cca01b
commit
5a529d4db9
1 changed files with 15 additions and 1 deletions
|
@ -6,8 +6,22 @@
|
||||||
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
<p class="checkin__meta">{!! render_date_difference($checkin->date) !!}</p>
|
||||||
</summary>
|
</summary>
|
||||||
@if($checkin->note)
|
@if($checkin->note)
|
||||||
|
@if(preg_match("/\[\[[^]]+\]\]/", $checkin->note, $filepath)
|
||||||
|
@if(preg_match("/\.webm/", $filepath)
|
||||||
|
<video controls>
|
||||||
|
<source src="/{{ $filepath }}" type="video/webm">
|
||||||
|
<p>Your browser doesn't support HTML video. Here is a <a href="/{{ $filepath }}">link to the video</a> instead.</p>
|
||||||
|
</video>
|
||||||
|
@elseif(preg_match("/\.ogg/", $filepath)
|
||||||
|
<audio controls>
|
||||||
|
<source src="/{{ $filepath }}" type="audio/off">
|
||||||
|
<p>Download <a href="/{{ $filepath }}">OGG</a> audio.</p>
|
||||||
|
</audio>
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
{!! $checkin->note !!}
|
{!! $checkin->note !!}
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
@if($checkin->image_url)
|
@if($checkin->image_url)
|
||||||
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
<img class="popup__image" loading="lazy" src="{{ $checkin->image_url }}">
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Reference in a new issue