-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home Page.html
262 lines (245 loc) · 9.92 KB
/
Home Page.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
background-image: url('60689de549191.jpg');
background-size: cover;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
backdrop-filter: blur(5px);
overflow: hidden;
user-select: none;
}
.window{
background-color: rgba(255, 255, 255, 0.8);
width: 500px;
height: 600px;
border-radius: 15%;
backdrop-filter: blur(5px);
transition: 0.5s ease-out;
box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}
.window:hover{
box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9);
}
.text{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
button{
width: 350px;
border-radius: 50px;
border: 2px solid black;
transition: 0.5s ease-out;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.9);
}
button:hover {
background-color: #494949;
color: rgb(255, 255, 255);
box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}
button:active {
background-color: #000000;
color: rgb(231, 231, 231);
}
.modep {
width: 50px;
position: absolute;
bottom: 20px;
right: 20px;
transition: 0.5s ease-out;
}
.modep:hover {
filter: invert(0.8);
}
#prayerTimes{
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
}
form {
width: 100%;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
}
input{
display: none;
width: 240px;
height: 50px;
font-size: large;
border-radius: 50px 0px 0px 50px;
border: 2px 2px 0px 2px solid black;
transition: 0.5s ease-out;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.9);
}
input:hover {
background-color: #dedede;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
}
#sub{
display: none;
width: 60px;
height: 55.2px;
border-radius: 0px 50px 50px 0px;
font-size: large;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: 700;
background-color: rgb(255, 255, 255);
}
#sub:hover {
background-color: #494949;
color: rgb(255, 255, 255);
box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}
#sub:active {
background-color: #000000;
color: rgb(231, 231, 231);
}
.sub{
display: none;
width: 50px;
height: 55.2px;
border-radius: 0px;
font-size: large;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: 700;
background-color: rgb(255, 255, 255);
}
</style>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ramadan</title>
<meta thhp-rquiv="x-UA-compatile" content="IE=edge,cheome=1">
<meta name="viewport" content="width=device-width, initial-scsle=1.0">
</head>
<body>
<center>
<div id="prayerTimes"></div>
<div class="window" id="window">
<img src="pngtree-modern-arabic-sign-of-ramadan-kareem-png-image_6090427.png"
width="200" >
<br>
<button onclick="changeAzkar(1)"><h1 class="text" id="azkar">الأذكار</h1></button><br><br>
<button onclick="changeAzkar(2)"><h1 class="text" id="date">التقويم</h1></button><br><br>
<button onclick="showmoqet(1, event)"><h1 class="text" id="date">أوقات الصلاة</h1></button><br><br>
<form name="form">
<input name="cityname" placeholder=" Enter your city name :" id="cityname" class="text">
<button id="sub1" onclick="showmoqet(3, event)" class="sub">📌</button>
<button id="sub" onclick="showmoqet(2, event)">ارسال</button>
</form>
<img onclick="Dark()" class="modep" id="modep" src="https://cdn1.iconfinder.com/data/icons/user-interface-16x16-vol-1/16/contrast-circle-512.png"></div>
</center>
<script>
document.getElementById("cityname").style.display = "none";
document.getElementById("sub").style.display = "none";
document.getElementById("sub1").style.display = "none";
function changeAzkar(i) {
if (document.getElementById("azkar").innerHTML === "أذكار الصباح"){
if (i === 1) {
window.open("source/morning azkar.html");
}
else if (i === 2) {
window.open("source/evening azkar.html");
}
}
else if (i === 1 && document.getElementById("azkar").innerHTML === "الأذكار"){
document.getElementById("azkar").innerHTML = "أذكار الصباح";
document.getElementById("date").innerHTML = "أذكار المساء";
}
else if (i === 2 && document.getElementById("azkar").innerHTML === "الأذكار"){
window.open("source/calnder.html");
}
}
function showmoqet(i, event) {
event.preventDefault(); // منع تحديث الصفحة
if (i === 1){
if (document.getElementById("cityname").style.display != "none"){
document.getElementById("cityname").style.display = "none";
document.getElementById("sub").style.display = "none";
document.getElementById("sub1").style.display = "none";
} else {
document.getElementById("cityname").style.display = "inline";
document.getElementById("sub").style.display = "inline";
document.getElementById("sub1").style.display = "inline";
document.getElementById("prayerTimes").style.display = "none";
}
} else if (i === 2) {
var cityName = document.getElementById("cityname").value;
var prayerTimes = '<iframe name="prayertimes" src="https://www.prayertimes.org/embedprayertimes.php?city=' + cityName + '&logo=true&showtitle=true&showlink=false&textcolor=%23ffffff&bgcolor=%23506a1b&bordercolor=%236e9226" height="240" width="250" style="border:none;border-radius:15px;" scrolling="no"></iframe>';
if (document.getElementById("prayerTimes").style.display != "none"){
document.getElementById("prayerTimes").style.display = "none";
} else {
document.getElementById("prayerTimes").style.display = "block";
document.getElementById("prayerTimes").innerHTML = prayerTimes;
document.getElementById("cityname").style.display = "none";
document.getElementById("sub").style.display = "none";
document.getElementById("sub1").style.display = "none";
}
} else {
// Get the current position
navigator.geolocation.getCurrentPosition(function(position) {
// Get the latitude and longitude
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
// Use a reverse geocoding service to get the city name from the latitude and longitude
var url = "https://nominatim.openstreetmap.org/reverse?format=json&lat=" + latitude + "&lon=" + longitude + "&zoom=18&addressdetails=1";
fetch(url)
.then(response => response.json())
.then(data => {
// Get the city name from the address details
var cityName = data.address.city;
// Update the location paragraph with the city name
console.log(cityName);// Get the city name from the address details
var city = data.address.city || data.address.town || data.address.village;
if (city) {
document.form.cityname.value = city;
} else {
console.error("Could not determine city name.");
}
})
.catch(error => console.error(error));
});
}
}
function Dark() {
var currentScheme = document.documentElement.getAttribute('color-scheme');
if (currentScheme === 'dark') {
document.documentElement.setAttribute('color-scheme', 'light');
document.documentElement.style.colorScheme = 'light';
document.getElementById('window').style.backgroundColor = 'rgba(255, 255, 255, 0.8)';
document.getElementById('modep').style.filter = 'invert(0)';
localStorage.setItem('mode', 'light'); // حفظ الوضع الحالي في Local Storage
} else {
document.documentElement.setAttribute('color-scheme', 'dark');
document.documentElement.style.colorScheme = 'dark';
document.getElementById('window').style.backgroundColor = 'rgba(200, 200, 200, 0.8)';
document.getElementById('modep').style.filter = 'invert(0.8)';
localStorage.setItem('mode', 'dark'); // حفظ الوضع الحالي في Local Storage
}
var mode = localStorage.getItem('mode');
if (mode === 'dark') {
document.documentElement.setAttribute('color-scheme', 'dark');
document.documentElement.style.colorScheme = 'dark';
document.getElementById('window').style.backgroundColor = 'rgba(200, 200, 200, 0.8)';
} else {
document.documentElement.setAttribute('color-scheme', 'light');
document.documentElement.style.colorScheme = 'light';
document.getElementById('window').style.backgroundColor = 'rgba(255, 255, 255, 0.8)';
}
}
document.addEventListener('contextmenu', function(event) {
event.preventDefault();
});
</script>
</body>
</html>