new bot background video
This commit is contained in:
1 parent
6b52f9ea14
commit
b7f1f00f65
4 files changed
+9
-3
No files matched your search
@@ -23,6 +23,9 @@
|
|||||||
<video muted loop playsinline preload="none" id="bucketlist-background-video" style="display:none">
|
<video muted loop playsinline preload="none" id="bucketlist-background-video" style="display:none">
|
||||||
<source src="textures/cz_background.mp4" type="video/mp4">
|
<source src="textures/cz_background.mp4" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
|
<video muted loop playsinline preload="none" id="yuukabot-background-video" style="display:none">
|
||||||
|
<source src="textures/bot_background.mp4" type="video/mp4">
|
||||||
|
</video>
|
||||||
<div id="top-line">
|
<div id="top-line">
|
||||||
<button id="about-btn">About This Website</button>
|
<button id="about-btn">About This Website</button>
|
||||||
<button id="gallery-btn">Gallery</button>
|
<button id="gallery-btn">Gallery</button>
|
||||||
|
|||||||
+4
-2
@@ -4,6 +4,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const mainVideo = document.getElementById('background-video');
|
const mainVideo = document.getElementById('background-video');
|
||||||
const calVideo = document.getElementById('calendar-background-video');
|
const calVideo = document.getElementById('calendar-background-video');
|
||||||
const bucketlistVideo = document.getElementById('bucketlist-background-video');
|
const bucketlistVideo = document.getElementById('bucketlist-background-video');
|
||||||
|
const botVideo = document.getElementById('yuukabot-background-video');
|
||||||
|
|
||||||
// ── Map URL path → tab id ──────────────────────────────
|
// ── Map URL path → tab id ──────────────────────────────
|
||||||
function pathToTab(path) {
|
function pathToTab(path) {
|
||||||
@@ -24,12 +25,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
// map tab id → its dedicated video element (null = use main)
|
// map tab id → its dedicated video element (null = use main)
|
||||||
const tabVideos = {
|
const tabVideos = {
|
||||||
calendar: calVideo,
|
calendar: calVideo,
|
||||||
bucketlist: bucketlistVideo
|
bucketlist: bucketlistVideo,
|
||||||
|
yuukabot: botVideo
|
||||||
};
|
};
|
||||||
|
|
||||||
function setBgForTab(tabId) {
|
function setBgForTab(tabId) {
|
||||||
// Hide + pause ALL videos first
|
// Hide + pause ALL videos first
|
||||||
[mainVideo, calVideo, bucketlistVideo].forEach(v => {
|
[mainVideo, calVideo, bucketlistVideo, botVideo].forEach(v => {
|
||||||
if (v) { v.style.display = 'none'; v.pause(); }
|
if (v) { v.style.display = 'none'; v.pause(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -18,7 +18,8 @@ html, body {
|
|||||||
}
|
}
|
||||||
#background-video,
|
#background-video,
|
||||||
#calendar-background-video,
|
#calendar-background-video,
|
||||||
#bucketlist-background-video {
|
#bucketlist-background-video,
|
||||||
|
#yuukabot-background-video {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0%;
|
right: 0%;
|
||||||
left: 0%;
|
left: 0%;
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user