-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
59 lines (55 loc) · 2.3 KB
/
index.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
window.onresize = function() {
if (window.innerWidth <= 550) {
document.querySelector(".logo img").src = "../assets/Astroid Logo no bg.png";
} else {
document.querySelector(".logo img").src = "../assets/Astroid-banner.png";
}
}
window.onload = function() {
if (window.innerWidth <= 550) {
document.querySelector(".logo img").src = "../assets/Astroid Logo no bg.png";
} else {
document.querySelector(".logo img").src = "../assets/Astroid-banner.png";
}
document.querySelector(".logo img").onclick = function() {
window.location.href = "/";
}
document.querySelectorAll("#can-resize").forEach(img => {
img.onclick = function() {
const div = document.querySelector(".full_img_div");
var div_img = document.createElement("img");
div_img.src = img.src;
div_img.id = "full_img";
div.appendChild(div_img);
div.style.display = "flex";
document.querySelector(".norm").style.filter = "blur(5px) brightness(0.3)";
document.querySelector("body").id = "no-scroll";
}
});
document.querySelector(".close").onclick = function() {
document.querySelector(".full_img_div").style.display = "none";
document.querySelector(".full_img_div #full_img").remove();
document.querySelector(".norm").style.filter = "none";
document.querySelector("body").id = null;
}
document.querySelector("body").onclick = function(e) {
if (e.target.className == "full_img_div") {
document.querySelector(".full_img_div").style.display = "none";
document.querySelector(".full_img_div #full_img").remove();
document.querySelector(".norm").style.filter = "none";
document.querySelector("body").id = null;
}
}
document.querySelector("#github").onclick = function() {
window.open("https://github.com/astroid-app");
}
document.querySelector("#get-astroid").onclick = function() {
window.open("./invite");
}
document.querySelector("#discord").onclick = function() {
window.open("https://api.astroid.cc/discord");
}
document.querySelector("#supportus").onclick = function() {
window.open("https://ko-fi.com/astroidapp");
}
}