-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (98 loc) · 3.03 KB
/
index.html
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<title>Redirecting...</title>
<style>
/* Basic reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Full-screen container */
body, html {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: black;
overflow: hidden;
color: white;
font-family: Arial, sans-serif;
}
.container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.stars {
width: 100%;
height: 100%;
background: black;
overflow: hidden;
position: absolute;
}
.star {
position: absolute;
background: white;
width: 2px;
height: 2px;
border-radius: 50%;
animation: starMove 1.5s linear infinite; /* Animation duration */
}
@keyframes starMove {
from {
transform: translate3d(0, 0, 0);
opacity: 1;
}
to {
transform: translate3d(1000px, 0, 500px);
opacity: 0;
}
}
.message {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
font-size: 1.5em;
opacity: 1; /* Keep it visible */
animation: none; /* Remove fade in animation */
}
a {
color: #00ffcc; /* Change link color for better visibility */
text-decoration: underline; /* Add underline for emphasis */
}
</style>
</head>
<body>
<div class="container">
<div class="stars">
<!-- Generate stars dynamically using JavaScript -->
<script>
for (let i = 0; i < 150; i++) {
let star = document.createElement("div");
star.className = "star";
star.style.top = Math.random() * 100 + "%";
star.style.left = Math.random() * 100 + "%";
star.style.animationDuration = (Math.random() * 1 + 0.5) + "s"; // Random duration between 0.5s and 1.5s
document.querySelector(".stars").appendChild(star);
}
</script>
</div>
<div class="message">Redirecting to <a href="dhirendra_resume-openfont.pdf" id="resumeLink">dhirendra-pratap-singh-resume.pdf</a></div>
</div>
<script>
// Redirect after the animation
var redirectTimeout = setTimeout(function() {
window.location.href = "dhirendra-pratap-singh-resume.pdf";
}, 3000); // Set to 3 seconds for the redirect to match the animation
// Prevent redirect if the link is clicked
document.getElementById("resumeLink").onclick = function() {
clearTimeout(redirectTimeout); // Clear the redirect timeout
};
</script>
</body>
</html>