Fix popup embed
This commit is contained in:
parent
008c08e6cf
commit
672a440593
1 changed files with 16 additions and 8 deletions
|
@ -91,15 +91,23 @@
|
||||||
@php $popupContent = null; @endphp
|
@php $popupContent = null; @endphp
|
||||||
@if(preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath))
|
@if(preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath))
|
||||||
@if(preg_match("/\.webm/", $filepath[1]))
|
@if(preg_match("/\.webm/", $filepath[1]))
|
||||||
@php $popupContent = `<video controls>
|
@php
|
||||||
<source src="/{{ $filepath[1] }}" type="video/webm">
|
$popupContent = '<video controls><source src="/';
|
||||||
<p>Your browser doesn't support HTML video. Here is a <a href="/{{ $filepath[1] }}">link to the video</a> instead.</p>
|
$popupContent .= $filepath[1];
|
||||||
</video>`; @endphp
|
$popupContent .= '" type="video/webm">';
|
||||||
|
$popupContent .= '<p>Your browser doesn\'t support HTML video. Here is a <a href="/';
|
||||||
|
$popupContent .= $filepath[1];
|
||||||
|
$popupContent .= '">link to the video</a> instead.</p></video>';
|
||||||
|
@endphp
|
||||||
@elseif(preg_match("/\.ogg/", $filepath[1]))
|
@elseif(preg_match("/\.ogg/", $filepath[1]))
|
||||||
@php $popupContent = `<audio controls>
|
@php
|
||||||
<source src="/{{ $filepath[1] }}" type="audio/off">
|
$popupContent = '<audio controls><source src="/';
|
||||||
<p>Download <a href="/{{ $filepath[1] }}">OGG</a> audio.</p>
|
$popupContent .= $filepath[1];
|
||||||
</audio>`; @endphp
|
$popupContent .= '" type="audio/ogg">';
|
||||||
|
$popupContent .= '<p>Download <a href="/';
|
||||||
|
$popupContent .= $filepath[1];
|
||||||
|
$popupContent .= '">OGG</a> audio.</p></audio>';
|
||||||
|
@endphp
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
@php $popupContent ='<p class="popup__note">' . $checkin->note . '</p>'; @endphp
|
@php $popupContent ='<p class="popup__note">' . $checkin->note . '</p>'; @endphp
|
||||||
|
|
Loading…
Reference in a new issue