Skip to content

Commit 0d0fbcc

Browse files
committed
Fix Issue #5
1 parent 0f82a7c commit 0d0fbcc

File tree

4 files changed

+143
-0
lines changed

4 files changed

+143
-0
lines changed
127 KB
Loading
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Sis-BirthDay</title>
8+
<link rel="stylesheet" href="./style.css">
9+
</head>
10+
<body>
11+
<div class="container">
12+
<h1>2023</h1>
13+
<h2 id="heading2">Yashi's Birthday CountDown</h2>
14+
<img src="./WhatsApp Image 2023-03-16 at 23.24.23.jpeg" alt="Siso" title="Younger-SIS">
15+
<div class="countdownBox">
16+
<div class="Box1">
17+
<p id="days">0</p>
18+
<h3>Days</h3>
19+
</div>
20+
<div class="Box1">
21+
<p id="hours">0</p>
22+
<h3>Hours</h3>
23+
</div>
24+
<div class="Box1">
25+
<p id="minutes">0</p>
26+
<h3>Minutes</h3>
27+
</div>
28+
<div class="Box1">
29+
<p id="seconds">0</p>
30+
<h3>Seconds</h3>
31+
</div>
32+
</div>
33+
</div>
34+
<script src="./server.js"></script>
35+
</body>
36+
</html>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
let days = document.getElementById("days");
2+
let hours = document.getElementById("hours");
3+
let minutes = document.getElementById("minutes");
4+
let seconds = document.getElementById("seconds");
5+
6+
function countdown(){
7+
let futureDate = new Date(" 12 November 2023 ");
8+
let currentDate= new Date();
9+
let remainingDate= futureDate-currentDate;
10+
11+
let showDays= Math.floor(remainingDate / 1000 / 60 / 60 / 24);
12+
let showHours= Math.floor(remainingDate / 1000 / 60 / 60) % 24;
13+
let showMinutes= Math.floor(remainingDate / 1000 / 60) % 60;
14+
let showSeconds= Math.floor(remainingDate / 1000) % 60;
15+
16+
if ((showDays==0)&&(showHours==0)&&(showMinutes==0)&&(showSeconds==0)){
17+
document.getElementById("heading2").innerHTML="!! HAPPIEST BIRTHDAY YASHI !!";
18+
document.getElementById("heading2").style.color= "#A1045A";
19+
clearInterval(clock);
20+
}
21+
else{
22+
days.innerHTML=showDays;
23+
hours.innerHTML=showHours;
24+
minutes.innerHTML=showMinutes;
25+
seconds.innerHTML=showSeconds;
26+
}
27+
}
28+
29+
let clock=setInterval(countdown,1000);
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
*{
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
body{
7+
background-image: linear-gradient(rgba(0, 0, 0, 0.504),rgba(0, 0, 0, 0.526) ), url(./bcgImage.jpeg);
8+
background-size: 100% 100%;
9+
background-repeat: no-repeat;
10+
height: 95.8vh;
11+
color: #ffffff;
12+
font-family: sans-serif;
13+
14+
}
15+
.container{
16+
17+
margin-top: 2%;
18+
}
19+
img[alt="Siso"]{
20+
21+
border-radius: 30%;
22+
height: 250px;
23+
width: 230px;
24+
margin-left: 44%;
25+
margin-top: 30px;
26+
border: 40px solid rgba(12, 12, 12, 0.911);
27+
28+
}
29+
h1{
30+
display: flex;
31+
justify-content: center;
32+
align-items: center;
33+
margin-top: 2%;
34+
font-size: 38px;
35+
font-weight: 800;
36+
word-spacing: 10px;
37+
38+
}
39+
h2{
40+
display: flex;
41+
justify-content: center;
42+
align-items: center;
43+
margin-top: 1.3%;
44+
margin-left: 60px;
45+
font-size: 38px;
46+
font-weight: 800;
47+
word-spacing: 10px;
48+
}
49+
h3{
50+
padding-left: 24px ;
51+
padding-top: 12px;
52+
53+
}
54+
p{
55+
font-size: 38px;
56+
padding-left: 40px;
57+
}
58+
.countdownBox{
59+
display: flex;
60+
justify-content: center;
61+
align-items: center;
62+
margin-top: 3%;
63+
margin-left: 5%;
64+
font-weight: 500;
65+
font-size: 16px;
66+
67+
}
68+
.Box1{
69+
background-color: rgba(0, 0, 0, 0.593);
70+
height: 100px;
71+
width: 140px ;
72+
margin-right:30px;
73+
border-radius: 16px;
74+
border: 2px solid rgba(247, 243, 243, 0.886);
75+
padding-top: 30px;
76+
padding-left: 10px;
77+
line-height: 30px;
78+
}

0 commit comments

Comments
 (0)