Skip to content

Commit

Permalink
Merge pull request #1 from onlyOddity/main
Browse files Browse the repository at this point in the history
Amélioration image et Lang
  • Loading branch information
ms-studio authored Dec 16, 2024
2 parents 678b795 + 9899274 commit 45c32dc
Show file tree
Hide file tree
Showing 36 changed files with 312 additions and 350 deletions.
12 changes: 4 additions & 8 deletions CSS/Responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
color: var(--Second-color);
}

.TitreExplicatif{
.TitreExplicatif {
text-align: center;
}

Expand Down Expand Up @@ -93,25 +93,21 @@
z-index: -10;
}


.Bouton {
color: var(--Black-color);
transition: color 0.3s ease-in-out;
color: var(--Second-color);
}
.BoxBic{

.BoxBic {
grid-column: 1/8;
}
.img{
.img {
height: 100%;
width: auto;
}

}



@media only screen and (min-width: 900px) {
.Mobile {
display: none;
Expand Down
62 changes: 29 additions & 33 deletions JS/IndexTiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,39 @@ const info = document.querySelector(".TextInformatif");

let Timing = 0;

boutons.forEach(element => {
element.style.opacity = "0%";
boutons.forEach((element) => {
element.style.opacity = "0%";
});

Update = setInterval(function(){
Timing++;
if(Timing == 4)
{
txtExplicatif.style.opacity = "0%";
pellicule.style.backgroundColor = "var(--Second-color)"
}
if(Timing == 5)
{
pellicule.style.opacity = "0%";
backgroundvideo.play();
}
if(Timing == 26)
{
boutons.forEach(element => {
element.style.opacity = "100%";
});
info.style.opacity = "0%";
clearInterval(Update);
}
}, 1000);

pellicule.addEventListener("click", Skip);
backgroundvideo.addEventListener("click", Skip);

function Skip()
{
Update = setInterval(function () {
Timing++;
if (Timing == 4) {
txtExplicatif.style.opacity = "0%";
pellicule.style.backgroundColor = "var(--Second-color)";
}
if (Timing == 5) {
pellicule.style.opacity = "0%";
boutons.forEach(element => {
element.style.opacity = "100%";
backgroundvideo.play();
}
if (Timing == 26) {
boutons.forEach((element) => {
element.style.opacity = "100%";
});
info.style.opacity = "0%";
clearInterval(Update);
backgroundvideo.currentTime = backgroundvideo.duration - 0.1;
}
}
}, 1000);

pellicule.addEventListener("click", Skip);
backgroundvideo.addEventListener("click", Skip);

function Skip() {
txtExplicatif.style.opacity = "0%";
pellicule.style.opacity = "0%";
boutons.forEach((element) => {
element.style.opacity = "100%";
});
info.style.opacity = "0%";
clearInterval(Update);
backgroundvideo.currentTime = backgroundvideo.duration - 0.1;
}
154 changes: 65 additions & 89 deletions JS/ScrollBicPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,100 +12,76 @@ let AntiScrollSave = 0;
let PosA = window.innerHeight - 720;
let PosB = window.innerHeight - 1850;

main.style.transform = "translateY(" + PosA + "px)";
BigBox.style.marginTop = window.innerHeight * 0.15 + "px";


main.style.transform = "translateY("+PosA+"px)";
BigBox.style.marginTop = window.innerHeight * 0.15 + "px";


body.addEventListener("wheel", function(event){
if(AntiScroll == 0)
{
if (event.deltaY > 0)
{
if(w >= 900)
{
ScrollPage();
}
}
else
{
if(w >= 900)
{
ScrollPage();
}
}
body.addEventListener(
"wheel",
function (event) {
if (AntiScroll == 0) {
if (event.deltaY > 0) {
if (w >= 900) {
ScrollPage();
}
AntiScroll++;
AntiScrollSave = AntiScroll;
console.log(AntiScroll);
}, false);


setInterval(function(){
if(AntiScrollSave != AntiScroll)
{
AntiScroll = 0;
AntiScrollSave = 0;
} else {
if (w >= 900) {
ScrollPage();
}
AntiScrollSave++;
}, 250);


function ScrollPage()
{
console.log("Passé");
if(scrollBool)
{
main.style.transform = "translateY("+PosA+"px)";
scrollBool = false;

}
else if(scrollBool == false)
{
main.style.transform = "translateY("+PosB+"px)";
scrollBool = true;
}
}
}
AntiScroll++;
AntiScrollSave = AntiScroll;
console.log(AntiScroll);
},
false
);

window.onresize = function(event) {
w = document.body.clientWidth;
PosA = window.innerHeight - 720;
console.log(PosA);
PosB = window.innerHeight - 1850;
if(scrollBool)
{
main.style.transform = "translateY("+PosB+"px)";
setInterval(function () {
if (AntiScrollSave != AntiScroll) {
AntiScroll = 0;
AntiScrollSave = 0;
}
AntiScrollSave++;
}, 250);

}
else if(scrollBool == false)
{
main.style.transform = "translateY("+PosA+"px)";
}
if(w >= 900)
{
Mobile = false;
body.classList.add("NoScroll");
}
else
{
Mobile = true;
body.classList.remove("NoScroll");
}
};
function ScrollPage() {
console.log("Passé");
if (scrollBool) {
main.style.transform = "translateY(" + PosA + "px)";
scrollBool = false;
} else if (scrollBool == false) {
main.style.transform = "translateY(" + PosB + "px)";
scrollBool = true;
}
}

function checkMobile()
{
if(w >= 900)
{
Mobile = false;
}
else
{
Mobile = true;
body.classList.remove("NoScroll");
}
console.log(Mobile);
}
window.onresize = function (event) {
w = document.body.clientWidth;
PosA = window.innerHeight - 720;
console.log(PosA);
PosB = window.innerHeight - 1850;
if (scrollBool) {
main.style.transform = "translateY(" + PosB + "px)";
} else if (scrollBool == false) {
main.style.transform = "translateY(" + PosA + "px)";
}
if (w >= 900) {
Mobile = false;
body.classList.add("NoScroll");
} else {
Mobile = true;
body.classList.remove("NoScroll");
}
};

function checkMobile() {
if (w >= 900) {
Mobile = false;
} else {
Mobile = true;
body.classList.remove("NoScroll");
}
console.log(Mobile);
}

checkMobile();
checkMobile();
Loading

0 comments on commit 45c32dc

Please sign in to comment.