Site
- Updated functions in class with function create/dispose
This commit is contained in:
@ -6,31 +6,19 @@
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/30 13:50:35 by edbernar #+# #+# */
|
||||
/* Updated: 2024/08/24 23:24:33 by edbernar ### ########.fr */
|
||||
/* Updated: 2024/08/25 02:21:47 by edbernar ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
import { liveChat } from "/static/javascript/liveChat/main.js";
|
||||
import { login } from "/static/javascript/login/main.js";
|
||||
import { home3D } from "/static/javascript/home3D/home3D.js"
|
||||
|
||||
window.addEventListener('scroll', () => {
|
||||
const scrollPosition = window.scrollY;
|
||||
const rotationAngle = scrollPosition * 0.1;
|
||||
const parallaxElement = document.querySelector('#firstBall');
|
||||
const parallaxElement2 = document.querySelector('#secondBall');
|
||||
const parallaxSpeed = scrollPosition * -0.17;
|
||||
|
||||
parallaxElement.style.transform = `translateX(-50%) translateY(${-parallaxSpeed}px) rotate(${rotationAngle}deg)`;
|
||||
parallaxElement2.style.transform = `translateX(50%) translateY(${-parallaxSpeed}px) rotate(${rotationAngle}deg)`;
|
||||
});
|
||||
|
||||
// document.getElementById('closePopupBtn').addEventListener('click', function() {
|
||||
// document.getElementById('loginPopup').style.display = 'none';
|
||||
// });
|
||||
import { HomePage } from "/static/javascript/homePage/main.js"
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
liveChat();
|
||||
login();
|
||||
home3D();
|
||||
HomePage.create();
|
||||
setTimeout(() => {
|
||||
HomePage.dispose();
|
||||
}, 3000);
|
||||
});
|
||||
|
Reference in New Issue
Block a user