-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
262 lines (236 loc) · 8.47 KB
/
index.html
File metadata and controls
262 lines (236 loc) · 8.47 KB
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>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign - Timezone Converter</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(180deg, #ff8c00, #ffa500);
background-image:
url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3Cline x1='50' y1='50' x2='50' y2='20' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3Cline x1='50' y1='50' x2='80' y2='50' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3C/svg%3E"),
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
linear-gradient(180deg, #ff8c00, #ffa500);
background-size: 100px 100px, 100% 100%, 100% 100%, 100% 100%;
background-position: center center, 0 0, 0 0, 0 0;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem;
position: relative;
overflow-x: hidden;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
repeating-linear-gradient(45deg,
rgba(255, 255, 255, 0.05) 0px,
rgba(255, 255, 255, 0.05) 1px,
transparent 1px,
transparent 10px);
pointer-events: none;
z-index: 0;
opacity: 0.5;
}
.container {
background-color: rgba(255, 255, 255, 0.95);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
width: 90%;
max-width: 600px;
margin-top: 2rem;
position: relative;
z-index: 1;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
h1 {
color: #ff6b00;
text-align: center;
font-size: 3rem;
margin-bottom: 0.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
background: linear-gradient(45deg, #ff6b00, #ff8c00);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
}
h1::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background: linear-gradient(90deg, #ff6b00, #ff8c00);
border-radius: 2px;
}
h2 {
color: #ff8c00;
text-align: center;
font-size: 1.5rem;
margin-bottom: 2rem;
font-weight: 500;
opacity: 0.9;
}
.converter-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
label {
color: #ff6b00;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
select, input {
padding: 0.8rem;
border: 2px solid #ffd700;
border-radius: 8px;
font-size: 1rem;
outline: none;
transition: all 0.3s ease;
background-color: rgba(255, 255, 255, 0.9);
}
select:focus, input:focus {
border-color: #ff6b00;
box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}
button {
background: linear-gradient(135deg, #ff6b00, #ff8c00);
color: white;
padding: 1rem;
border: none;
border-radius: 8px;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.2),
transparent
);
transition: 0.5s;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}
button:hover::before {
left: 100%;
}
.result {
margin-top: 1.5rem;
padding: 1rem;
background-color: rgba(255, 248, 231, 0.9);
border-radius: 8px;
text-align: center;
font-size: 1.2rem;
color: #ff6b00;
border: 1px solid rgba(255, 215, 0, 0.3);
backdrop-filter: blur(5px);
}
@media (max-width: 480px) {
.container {
padding: 1.5rem;
}
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 1.2rem;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Sign</h1>
<h2>timezone</h2>
<form class="converter-form" id="timezoneForm">
<div class="input-group">
<label for="fromTime">From Time:</label>
<input type="datetime-local" id="fromTime" required>
</div>
<div class="input-group">
<label for="fromZone">From Timezone:</label>
<select id="fromZone" required></select>
</div>
<div class="input-group">
<label for="toZone">To Timezone:</label>
<select id="toZone" required></select>
</div>
<button type="submit">Convert</button>
</form>
<div class="result" id="result"></div>
</div>
<script>
// Populate timezone selectors
const timeZones = Intl.supportedValuesOf('timeZone');
const fromZone = document.getElementById('fromZone');
const toZone = document.getElementById('toZone');
timeZones.forEach(zone => {
const option1 = document.createElement('option');
const option2 = document.createElement('option');
option1.value = zone;
option2.value = zone;
option1.textContent = zone;
option2.textContent = zone;
fromZone.appendChild(option1);
toZone.appendChild(option2);
});
// Set default values
fromZone.value = Intl.DateTimeFormat().resolvedOptions().timeZone;
toZone.value = 'UTC';
// Handle form submission
document.getElementById('timezoneForm').addEventListener('submit', function(e) {
e.preventDefault();
const fromTime = new Date(document.getElementById('fromTime').value);
const fromZoneValue = document.getElementById('fromZone').value;
const toZoneValue = document.getElementById('toZone').value;
try {
const convertedTime = new Date(fromTime.toLocaleString('en-US', { timeZone: fromZoneValue }));
const result = convertedTime.toLocaleString('en-US', {
timeZone: toZoneValue,
dateStyle: 'full',
timeStyle: 'long'
});
document.getElementById('result').textContent = result;
} catch (error) {
document.getElementById('result').textContent = 'Error converting timezone. Please try again.';
}
});
</script>
</body>
</html>