-
Notifications
You must be signed in to change notification settings - Fork 1
/
maria.html
200 lines (177 loc) · 4.75 KB
/
maria.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Some pretty things</title>
<style>
/* Style for dropdown menu */
/* Style for dropdown menu */
body {
margin: 0;
padding: 0;
overflow: hidden; /* Hide overflow to prevent scrolling */
background-color: #000000; /* Black background */
}
#space {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('stars.png'); /* Space background image */
z-index: -1; /* Place behind other content */
}
#container {
text-align: center;
padding: 20px;
color: white;
}
select {
padding: 10px;
font-size: 29px;
margin: 20px auto; /* Center the dropdown */
display: block;
background-color: #9BA1D6;
border-radius: 15px;
}
/* Style for image */
img {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
/* Style for Eid Mubarak message */
#eidMubarak {
color: white;
font-size: 24px;
margin-top: 20px;
display: none; /* Initially hide the message */
}
.star {
position: absolute;
width: 2px;
height: 2px;
background-color: #fff;
border-radius: 50%;
animation: twinkle 1s infinite alternate; /* Twinkle animation */
}
@keyframes twinkle {
from {
opacity: 1;
}
to {
opacity: 0.5;
}
}
footer {
position: fixed;
bottom: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
color: white;
text-align: center;
padding: 10px 0;
}
footer p {
margin: 0;
}
footer p span {
font-weight: bold;
}
</style>
</head>
<body>
<div id="space"></div>
<div id="container">
<h1>Welcome to Space</h1>
<!-- Your content here -->
</div>
<script>
// Create stars dynamically
// Function to create stars dynamically
function createStars() {
const space = document.getElementById("space");
const numStars = 200; // Number of stars
const fragment = document.createDocumentFragment();
for (let i = 0; i < numStars; i++) {
const star = document.createElement("div");
star.className = "star";
star.style.left = `${Math.random() * 100}%`; // Random horizontal position
star.style.top = `${Math.random() * 100}%`; // Random vertical position
fragment.appendChild(star);
}
space.appendChild(fragment);
}
createStars(); // Call the function to create stars
</script>
<div id="container">
<img id="mainImage" src="image1.png" alt="Image 1">
<!-- Dropdown menu -->
<select id="imageSelector" onchange="changeImage()">
<option value="image1">144p</option>
<option value="image2">240p</option>
<option value="image3">360p</option>
<option value="image4">720p</option>
<option value="image5">1080p</option>
</select>
<!-- Eid Mubarak message -->
<p id="eidMubarak">>>>> beauty of moon💙</p>
</div>
<footer id="copyright">
<p>© <span id="year"></span> Rifauzzaman Rifat & Urfa Hasan Fattah. All rights reserved.</p>
</footer>
<script>
// Get the current year
const currentYear = new Date().getFullYear();
// Set the current year in the copyright text
document.getElementById("year").textContent = currentYear;
</script>
<script>
// Function to change image based on dropdown selection
function changeImage() {
var selectedValue = document.getElementById("imageSelector").value;
var image = document.getElementById("mainImage");
var eidMubarakMessage = document.getElementById("eidMubarak");
var top=document.getElementById("container")
// Change image source based on selected value
switch(selectedValue) {
case "image1":
image.src = "image1.png";
eidMubarakMessage.style.display = "none"; // Hide Eid Mubarak message
top.style.display="block";
top.textContent="Welcome to space";
break;
case "image2":
image.src = "image2.png";
eidMubarakMessage.style.display = "none"; // Hide Eid Mubarak message
top.textContent="Beautiful";
top.style.display="block";
break;
case "image3":
image.src = "image3.png";
eidMubarakMessage.style.display = "none"; // Hide Eid Mubarak message
top.style.display="block";
top.textContent="Pretty";
break;
case "image4":
image.src = "image4.png";
eidMubarakMessage.style.display = "none"; // Hide Eid Mubarak message
top.style.display="block";
top.textContent="Prettier";
break;
case "image5":
image.src = "maria.png";
eidMubarakMessage.style.display = "block"; // Hide Eid Mubarak message
top.style.display="none";
break;
default:
image.src = "default.png";
eidMubarakMessage.style.display = "none"; // Hide Eid Mubarak message
break;
}
}
</script>
</body>
</html>