-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
49 lines (41 loc) · 1.01 KB
/
index.js
File metadata and controls
49 lines (41 loc) · 1.01 KB
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
function home_transition() {
let idiv = $("#index_div");
let mainContent = $("#content")
idiv.css("transition",
"width 1.25s ease, height 1.25s ease, filter 1s");
idiv.addClass('fullscreen');
idiv.css("border", "none");
$("#index_text").css("opacity", "0");
setTimeout(function() {
$("#index_text").css("display", "none");
idiv.css("filter", "grayscale(100%) brightness(55%) contrast(200%) blur(20px)");
}, 500);
setTimeout(function() {
mainContent.removeClass("invisible");
// mainContent.animate({scrollTop: 0}, 1000);
$("#input").focus();
}, 1000);
}
let home = $("#home");
let homeColorState = 1;
setInterval(function () {
if (homeColorState === 0) {
home.css("color", "white");
homeColorState = 1;
}
else {
home.css("color", "#B8E9FF");
homeColorState = 0;
}
}, 750);
$("#home").click(home_transition);
$(window).on('hashchange', function () {
let hash = window.location.hash;
console.log(hash);
if (!hash) {
window.location.href = "";
}
else if (hash === "#home") {
home_transition();
}
});