Skip to content

Commit

Permalink
Re m o be the mfing bgs!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostmander authored Apr 19, 2023
1 parent 700dd48 commit 3c39845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 88 deletions.
14 changes: 1 addition & 13 deletions assets/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,10 @@ $(document).ready(function () {

// sync side and outer navigations
function updateNavs(nextPos) {
const [nexVid, currVid] = [
$(".container-vid-bg").eq(nextPos)[0],
$(".container-vid-bg.is-active")[0],
];
currVid.pause();
nexVid.currentTime = currVid.currentTime;
setTimeout(() => {
if (!window.matchMedia("(prefers-reduced-motion)").matches)
setTimeout(() => nexVid.play(), 1100);
// $(".container-vid-bg").eq(nextPos)[0].play();
$(".side-nav, .outer-nav, .backgrounds")
.children()
.removeClass("is-active");
$(".side-nav, .outer-nav").children().removeClass("is-active");
$(".side-nav").children().eq(nextPos).addClass("is-active");
$(".outer-nav").children().eq(nextPos).addClass("is-active");
$(".container-vid-bg").eq(nextPos).addClass("is-active");
}, 200);
}

Expand Down
76 changes: 1 addition & 75 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,68 +68,6 @@

<div class="perspective effect-rotate-left">
<div class="container" style="overflow: hidden">
<div class="backgrounds" id="bgs" style="display: none">
<video
width="1440"
height="1440"
preload="auto"
disablepictureinpicture
disableremoteplayback
x-webkit-airplay="deny"
loop
muted
class="container-vid-bg is-active"
src="assets/img/Backgrounds/one.webm"
></video>
<video
width="1440"
height="1440"
preload="auto"
disablepictureinpicture
disableremoteplayback
x-webkit-airplay="deny"
loop
muted
class="container-vid-bg"
src="assets/img/Backgrounds/two.webm"
></video>
<video
width="1440"
height="1440"
preload="auto"
disablepictureinpicture
disableremoteplayback
x-webkit-airplay="deny"
loop
muted
class="container-vid-bg"
src="assets/img/Backgrounds/three.webm"
></video>
<video
width="1440"
height="1440"
preload="auto"
disablepictureinpicture
disableremoteplayback
x-webkit-airplay="deny"
loop
muted
class="container-vid-bg"
src="assets/img/Backgrounds/four.webm"
></video>
<video
width="1440"
height="1440"
preload="auto"
disablepictureinpicture
disableremoteplayback
x-webkit-airplay="deny"
loop
muted
class="container-vid-bg"
src="assets/img/Backgrounds/five.webm"
></video>
</div>
<div class="outer-nav--return"></div>
<div id="viewport" class="l-viewport">
<div class="l-wrapper">
Expand Down Expand Up @@ -1075,23 +1013,11 @@ <h2>The Team</h2>
document.write(
'<script src="assets/js/vendor/jquery-2.2.4.min.js"><\/script>'
);
/* if (window.matchMedia("(prefers-reduced-motion)").matches) {
Array.from($(".container-vid-bg")).forEach((vid) => {
vid.removeAttribute("autoplay");
vid.pause();
});
} */

// Wait for all elements to load
$(window).on("load", function () {
// Loading Animation
setTimeout(
() => $("#loadingDiv").fadeOut(500, () => $("#loadingDiv").remove()),
2000
);

if (window.matchMedia("(prefers-reduced-motion)").matches) return;
$(".container-vid-bg.is-active").eq(0).get(0).play();
setTimeout(() => $("#loadingDiv").remove(), 2000);
});
</script>
<script>
Expand Down

0 comments on commit 3c39845

Please sign in to comment.