-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
80 lines (72 loc) · 2.44 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
var width = $(window).width();
window.onscroll = function(){
if ((width >= 1000)){
if(document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) {
$("#header").css("background","#121212");
$("#header").css("color","#fff");
$("#header").css("box-shadow","0px 0px 20px rgba(0,0,0,0.09)");
$("#header").css("padding","0vh 4vw");
$("#navigation a").hover(function(){
$(this).css("border-bottom","2px solid rgb(255, 44, 90)");
},function(){
$(this).css("border-bottom","2px solid transparent");
});
}else{
$("#header").css("background","transparent");
$("#header").css("color","#fff");
$("#header").css("box-shadow","0px 0px 0px rgba(0,0,0,0)");
$("#header").css("padding","6vh 4vw");
$("#navigation a").hover(function(){
$(this).css("border-bottom","2px solid #fff");
},function(){
$(this).css("border-bottom","2px solid transparent");
});
}
}
}
var image = new Image ();
image.src = 'https://lewd.cat/1ioz84tvvnb0.png'
image.id = "patimage"
var button = document.getElementById("patbutton"),
count = 0;
button.onclick = function() {
count += 1;
button.innerHTML = count;
button.appendChild(image);
};
function magnify(imglink){
$("#img_here").css("background",`url('${imglink}') center center`);
$("#magnify").css("display","flex");
$("#magnify").addClass("animated fadeIn");
setTimeout(function(){
$("#magnify").removeClass("animated fadeIn");
},800);
}
function closemagnify(){
$("#magnify").addClass("animated fadeOut");
setTimeout(function(){
$("#magnify").css("display","none");
$("#magnify").removeClass("animated fadeOut");
$("#img_here").css("background",`url('') center center`);
},800);
}
setTimeout(function(){
$("#loading").addClass("animated fadeOut");
setTimeout(function(){
$("#loading").removeClass("animated fadeOut");
$("#loading").css("display","none");
},800);
},1650);
$(document).ready(function(){
$("a").on('click', function(event) {
if (this.hash !== "") {
event.preventDefault();
var hash = this.hash;
$('body,html').animate({
scrollTop: $(hash).offset().top
}, 1800, function(){
window.location.hash = hash;
});
}
});
});