-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
81 lines (68 loc) · 1.8 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
gsap.registerPlugin(ScrollTrigger);
const bg_ = document.querySelector(".nav_container");
const span = document.querySelector(".content1 span");
const h1 = document.querySelector(".content1 h1");
const h4 = document.querySelector(".content1 h4");
const p = document.querySelector(".content1 p");
const blogopener_ = document.querySelector(".blog .blogopener")
const mainTL = gsap.timeline();
mainTL.from([bg_],{
duration: 1.2,
y: -200,
height: 0,
opacity: 0,
ease: "power3.inOut"
})
mainTL.from(["header", ".logo"],{
delay: 0.1,
y: -16,
opacity: 0,
duration: 0.5,
ease: "power3.inOut"
})
.from("#blog",{
// y: 200,
duration: 2,
opacity: 0,
ease: "power3.inOut"
})
// scrollTrigger.create({
// trigger: ".blog",
// start: "center center",
// end: "bottom top",
// scrub: true,
// pin: true
// }
// )
// .from(".blogopener",{y:innerHeight*1.5})
// const parlax = gsap.timeline({
// scrollTrigger: {
// trigger: ".blogopener",
// scrub: true,
// start: 'centre centre',
// end: "+=2000",
// pin: true
// }
// }).to("")
// ScrollTrigger.create({
// animation: mainTL,
// trigger: ".blogopener",
// start: "top center",
// end: "+=3000px",
// pin: true
// })
window.addEventListener("resize", windowResize);
function windowResize(){
let container_ = document.querySelector(".nav_container")
container_.style.height = "100vh"
}
// DARK MODE
// document.onkeypress = function(e){
// e = e || window.event;
// if(e.keyCode === 13){
// document.documentElement.classList.toggle("dark-mode");
// document.querySelectorAll('.inverted').forEach((result) =>{
// result.classList.toggle('invert');
// })
// }
// }