🔮👼 Checkpoint
./style.css:7435365/1742 ./script.js:7435365/4877 ./index.html:7435365/1832
This commit is contained in:
parent
29947d4783
commit
dc59e79169
15
index.html
15
index.html
@ -2,13 +2,16 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Is it Jason's Birthday?</title>
|
<title>Is it Jason's Birthday?</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
<!-- import the webpage's stylesheet -->
|
<!-- import the webpage's stylesheet -->
|
||||||
<link href="https://fonts.googleapis.com/css?family=Kanit:700i&display=swap" rel="stylesheet">
|
<link
|
||||||
<link rel="stylesheet" href="/style.css">
|
href="https://fonts.googleapis.com/css?family=Kanit:700i&display=swap"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="/style.css" />
|
||||||
|
|
||||||
<!-- import the webpage's javascript file -->
|
<!-- import the webpage's javascript file -->
|
||||||
<script src="/confetti.js" defer></script>
|
<script src="/confetti.js" defer></script>
|
||||||
@ -23,7 +26,7 @@
|
|||||||
|
|
||||||
<div class="glitchButton" style="position:fixed; top:1vw; right:1vw;"></div>
|
<div class="glitchButton" style="position:fixed; top:1vw; right:1vw;"></div>
|
||||||
<script src="https://button.glitch.me/button.js"></script>
|
<script src="https://button.glitch.me/button.js"></script>
|
||||||
|
|
||||||
<a id="pilink" href="#">π</a>
|
<a id="pilink" href="#">π</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
21
script.js
21
script.js
@ -6,7 +6,8 @@ var birthday = {
|
|||||||
check: function() {
|
check: function() {
|
||||||
if (this.faking) return;
|
if (this.faking) return;
|
||||||
this.now = new Date();
|
this.now = new Date();
|
||||||
if (this.now.getDate() == this.day && this.now.getMonth() + 1 == this.month) this.activate();
|
if (this.now.getDate() == this.day && this.now.getMonth() + 1 == this.month)
|
||||||
|
this.activate();
|
||||||
else this.deactivate();
|
else this.deactivate();
|
||||||
},
|
},
|
||||||
activate: function() {
|
activate: function() {
|
||||||
@ -28,7 +29,7 @@ var birthday = {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
birthday.faking = false;
|
birthday.faking = false;
|
||||||
birthday.deactivate();
|
birthday.deactivate();
|
||||||
}, 5000)
|
}, 5000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,11 +81,15 @@ var elementClass = {
|
|||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
birthday.check();
|
birthday.check();
|
||||||
|
|
||||||
document.getElementById('pilink').addEventListener('click', function(e) {
|
document.getElementById("pilink").addEventListener(
|
||||||
e.preventDefault();
|
"click",
|
||||||
birthday.fakeit();
|
function(e) {
|
||||||
}, false)
|
e.preventDefault();
|
||||||
|
birthday.fakeit();
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
@ -97,4 +102,4 @@ window.addEventListener(
|
|||||||
|
|
||||||
window.setInterval(function() {
|
window.setInterval(function() {
|
||||||
birthday.check();
|
birthday.check();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
19
style.css
19
style.css
@ -8,7 +8,7 @@ body {
|
|||||||
|
|
||||||
#confetti {
|
#confetti {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top:0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ body {
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1vw;
|
padding: 1vw;
|
||||||
font-family: 'Kanit', sans-serif;
|
font-family: "Kanit", sans-serif;
|
||||||
font-size: 16vw;
|
font-size: 16vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ body {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 1vw;
|
bottom: 1vw;
|
||||||
right: 1vw;
|
right: 1vw;
|
||||||
font-family: 'Times New Roman', serif;
|
font-family: "Times New Roman", serif;
|
||||||
font-size: 1.2vw;
|
font-size: 1.2vw;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -51,8 +51,17 @@ p.nope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.yep {
|
p.yep {
|
||||||
background-image: linear-gradient(to right, violet, indigo, blue, green, yellow, orange, red);
|
background-image: linear-gradient(
|
||||||
|
to right,
|
||||||
|
violet,
|
||||||
|
indigo,
|
||||||
|
blue,
|
||||||
|
green,
|
||||||
|
yellow,
|
||||||
|
orange,
|
||||||
|
red
|
||||||
|
);
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user