add part of site to docker and login works using sessions
This commit is contained in:
36
docker-compose/requirements/nginx/static/main.js
Normal file
36
docker-compose/requirements/nginx/static/main.js
Normal file
@ -0,0 +1,36 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.js :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: marvin <marvin@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/30 13:50:35 by edbernar #+# #+# */
|
||||
/* Updated: 2024/08/24 11:57:47 by marvin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
import { liveChat } from "./liveChat/main.js";
|
||||
import { login } from "./login/main.js";
|
||||
import { home3D } from "./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';
|
||||
// });
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
liveChat();
|
||||
login();
|
||||
home3D();
|
||||
});
|
Reference in New Issue
Block a user