Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions public/js/ext/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,12 @@ var SEMICOLON = SEMICOLON || {};
videoModal.style.display = '';
const video = videoModal.querySelector('#video');
if (video) video.play();

// support for youtube url
const youtubeVideo = videoModal.querySelector('#youtube-video');
if (youtubeVideo) {
youtubeVideo.src = $(youtubeVideo).data("src");
}
}
});
$('#video-modal-trigger-hide').click(function() {
Expand All @@ -2228,6 +2234,13 @@ var SEMICOLON = SEMICOLON || {};
videoModal.style.display = 'none';
const video = videoModal.querySelector('#video');
if (video) video.pause();

// support for youtube url
const youtubeVideo = videoModal.querySelector('#youtube-video');
if (youtubeVideo) {
console.log($(youtubeVideo).data("src"));
youtubeVideo.src = "";
}
}
});

Expand Down
Binary file removed public/videos/demo-video.mp4
Binary file not shown.
13 changes: 10 additions & 3 deletions resources/views/layout/video-player.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ class="block bg-[#FFD700] hover:bg-[#F95C22] rounded-full p-4 duration-300">
</button>
</div>
<div class="flex-grow flex-shrink flex flex-col justify-center max-h-full w-full overflow-hidden">
<video id="video" class="max-h-full max-w-full" controls src="{{ $src }}">
<source src="{{ $src }}" type="video/mp4">
</video>
@if ($src && Str::contains($src, ['youtube.com', 'youtu.be']))
<iframe id="youtube-video" class="w-full h-full" src="" data-src="{{ $src }}"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
@else
<video id="video" class="max-h-full max-w-full" controls src="{{ $src }}">
<source src="{{ $src }}" type="video/mp4">
</video>
@endif
</div>
</div>
@endpush
Expand Down
13 changes: 8 additions & 5 deletions resources/views/static/girls-in-digital-week.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ class="mb-4 max-w-full"
</p>
</div>
<div class="order-0 md:order-2 flex flex-1 justify-center items-center z-10">
<button class="bg-yellow hover:bg-primary rounded-full w-20 h-20 duration-300 flex justify-center items-center">
<img class="duration-300 ml-2" src="/images/fi_play.svg" />
</button>
@include('layout.video-player', [
'id' => 'girls-digital-hero',
'src' => 'https://www.youtube.com/embed/z4IkeLRuF9E?si=hLAEtN4PDfbigb5M',
])
</div>
<img
class="absolute top-0 -left-1/4 w-[150vw] !max-w-none md:hidden"
Expand Down Expand Up @@ -136,7 +137,8 @@ class="w-full md:w-auto flex justify-center items-center bg-primary hover:bg-hov
</a>
<a
class="w-full md:w-auto flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2.5 px-6 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="/"
target="_blank"
href="/docs/girls-in-digital/girls-in-digital-activity-guidelines.pdf"
>
<span>Girls in DIgital Activity Guideline</span>
<div class="flex gap-2 w-4 overflow-hidden">
Expand All @@ -146,7 +148,8 @@ class="w-full md:w-auto flex justify-center items-center gap-2 text-[#1C4DA1] bo
</a>
<a
class="w-full md:w-auto flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2.5 px-6 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group"
href="/"
target="_blank"
href="/docs/girls-in-digital/girls-in-digital-media-kit.pdf"
>
<span>Social Media Kit</span>
<div class="flex gap-2 w-4 overflow-hidden">
Expand Down