-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
277 lines (273 loc) · 12.7 KB
/
Copy pathindex.html
File metadata and controls
277 lines (273 loc) · 12.7 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>World Times & Timers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"
/>
<link rel="icon" type="image/png" href="/assets/favicon.png" />
<link rel="stylesheet" href="src/styles.css" />
</head>
<body class="bg-gray-100 min-h-screen relative overflow-hidden">
<!-- Swiper container -->
<div class="swiper h-screen w-full">
<div class="swiper-wrapper">
<!-- First Slide - Timer -->
<div class="swiper-slide relative">
<!-- Background container -->
<div
class="absolute inset-0 bg-no-repeat bg-cover top-0 left-0 w-full"
id="background"
></div>
<!-- Main content container -->
<div
class="relative z-500 flex flex-col items-center justify-center min-h-screen p-4"
>
<!--Timer-->
<div class="timer-wrapper" id="timerWrapper">
<div class="timer" id="timer">
<div class="unit">
<div class="digit" id="hours">
<span id="hour-left">0</span><span id="hour-right">0</span>
</div>
<span class="button-title text-white">Hours</span>
</div>
<div class="colon">:</div>
<div class="unit">
<div class="digit" id="minutes">
<span id="min-left">0</span><span id="min-right">0</span>
</div>
<span class="button-title text-white">Minutes</span>
</div>
<div class="colon">:</div>
<div class="unit">
<div class="digit" id="seconds">
<span id="sec-left">0</span><span id="sec-right">0</span>
</div>
<span class="button-title text-white">Seconds</span>
</div>
</div>
</div>
<div class="buttons">
<button id="startBtn">Start</button>
<button id="stopBtn">Stop</button>
<button id="resetBtn">Reset</button>
<button id="lapBtn">Lap</button>
<button id="toggleModeBtn">Countdown mode</button>
</div>
<!--Countdown control panel-->
<!--prettier-ignore-->
<div class="flex items-start justify-center gap-4 mt-4">
<div id="countdownPanel" class="countdown-panel">
<input type="number" id="setHours" min="0" max="99" placeholder="HH"/>
<input type="number" id="setMinutes" min="0" max="59" placeholder="MM"/>
<input type="number" id="setSeconds" min="0" max="59" placeholder="SS"/>
<button id="setCountdownBtn">Set</button>
</div>
</div>
<!-- Laps recordings -->
<div
class="text-left max-h-35 overflow-y-auto 3xl:text-xl mt-4 pr-4"
>
<ul id="laps" class="text-600 text-white space-y-2"></ul>
</div>
<div class="flex justify-start gap-6 items-center mt-4">
<!-- Rain Toggle button -->
<div class="flex justify-end pb-4" id="rainToggleContainer">
<label
class="relative inline-block w-30 3xl:w-36 h-10 3xl:h-14 hover:cursor-pointer"
>
<input type="checkbox" id="rainToggle" class="peer hidden" />
<!-- Background -->
<span
class="block w-full h-full bg-[#0f172a] border-1 border-white rounded-full peer-checked:bg-blue-600 transition-colors duration-300"
></span>
<!-- Toggle circle -->
<span
class="absolute top-1 left-2 3xl:top-2 w-8 3xl:w-10 h-8 3xl:h-10 bg-white rounded-full shadow-md transition-transform duration-300 peer-checked:translate-x-18 3xl:peer-checked:translate-x-22"
></span>
<!-- RAIN text -->
<span
class="3xl:text-base absolute right-4 top-1/2 transform -translate-y-1/2 text-[12px] font-bold text-white opacity-100 peer-checked:opacity-0 transition-opacity duration-300 z-10 tracking-widest"
>
Rain!
</span>
<!-- NO RAIN text -->
<span
class="3xl:text-base absolute left-3 top-1/2 transform -translate-y-1/2 text-[12px] font-bold text-white opacity-0 peer-checked:opacity-100 transition-opacity duration-300 z-10 tracking-widest"
>
No Rain
</span>
</label>
</div>
<!-- Thumbnail gallery -->
<div class="flex space-x-2 mt-2" id="thumbnailsContainer">
<div
class="bg-[#0f172a] w-16 h-16 3xl:w-20 3xl:h-20 border border-gray-300 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
></div>
<img
src="/assets/amalfi-night.webp"
alt="Background 2"
data-bg="/assets/amalfi-night.webp"
class="w-16 3xl:w-20 h-16 3xl:h-20 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
/>
<img
src="/assets/bridge.webp"
alt="Background 3"
data-bg="/assets/bridge.webp"
class="w-16 3xl:w-20 h-16 3xl:h-20 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
/>
<img
src="/assets/desert.webp"
alt="Background 4"
data-bg="/assets/desert.webp"
class="w-16 3xl:w-20 h-16 3xl:h-20 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
/>
<img
src="/assets/cave.webp"
alt="Background 5"
data-bg="/assets/cave.webp"
class="w-16 3xl:w-20 h-16 3xl:h-20 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
/>
<img
src="/assets/waterfall.webp"
alt="Background 6"
data-bg="/assets/waterfall.webp"
class="w-16 3xl:w-20 h-16 3xl:h-20 rounded-lg cursor-pointer hover:scale-110 transition-transform pointer-events-auto"
/>
</div>
</div>
<div
id="remainingTimeBar"
class="absolute w-full h-10 bottom-0 right-0 bg-[#00ffff] hidden"
></div>
<audio
id="beep"
src="https://actions.google.com/sounds/v1/alarms/beep_short.ogg"
></audio>
</div>
</div>
<!-- Second Slide - Global Times -->
<div class="swiper-slide relative">
<!-- Background with particles -->
<div
id="particles-js"
class="absolute inset-0 w-full h-full z-1"
></div>
<div
class="absolute inset-0 bg-no-repeat bg-cover bg-center z-0 bg-[url(/assets/earth.webp)]"
></div>
<!-- Global Time slide content -->
<div
class="flex flex-col items-center justify-center min-h-screen p-6"
>
<div class="relative flex items-start gap-4">
<h1
class="text-3xl 3xl:text-5xl font-bold text-white mb-3 3xl:mb-6 z-2"
>
World Times
</h1>
<button
id="infoToggle"
class="w-6 h-6 rounded-full border border-white text-white text-sm font-bold flex items-center justify-center hover:bg-white hover:text-[#0f172a] transition hover:cursor-pointer z-2"
title="How it works"
>
i
</button>
<div
id="infoTooltip"
class="absolute right-[-300px] top-[20px] w-5/4 hidden mt-2 text-sm text-gray-300 bg-[#0f172a] bg-opacity-80 p-4 rounded-lg shadow-md max-w-xl z-10"
>
🌍 Welcome to World Times! Spin the Globe, hover over a country
or city ( in mutiple time zone countries ) to see its current
local time. Click a country to pin its live clock below.
</div>
</div>
<!-- 2D World Map -->
<!-- <div
id="worldMap"
class="w-full xl:max-w-5xl max-w-4xl xl:h-[475px] h-[375px] rounded-lg overflow-hidden bg-transparent z-5"
></div> -->
<!-- 3D Globus -->
<div
id="globeDiv"
class="w-2/3 3xl:w-1/2 h-[475px] 3xl:h-[575px] z-5"
></div>
<!-- Live Times Section -->
<div
id="recentTimesSection"
class="mt-2 3xl:mt-4 w-full flex justify-center min-w-4xl h-[125px] 3xl:h-[150px] px-2 3xl:px-4 z-5"
>
<div class="flex items-start">
<div class="flex flex-col items-end">
<span
class="text-white text-xl 3xl:text-2xl font-semibold hidden"
id="recentTimesTitle"
>Live Times:
</span>
<!-- Time Format toggle -->
<div class="pt-3 pb-3 hidden" id="timeFormat">
<label
class="relative inline-block w-24 3xl:w-30 h-10 3xl:h-12 hover:cursor-pointer"
>
<!--prettier-ignore-->
<input type="checkbox" id="timeFormatToggle" class="peer hidden" />
<!-- Background -->
<span
class="block w-full h-full bg-gray-300 rounded-full peer-checked:bg-[#60a5fa] transition-colors duration-300"
></span>
<!-- Toggle circle -->
<span
class="absolute top-1 left-2 w-8 3xl:w-10 h-8 3xl:h-10 bg-white rounded-full shadow-md transition-transform duration-300 peer-checked:translate-x-13 3xl:peer-checked:translate-x-16"
></span>
<!-- 24H text -->
<span
class="absolute right-4 top-1/2 transform -translate-y-1/2 text-xs 3xl:text-base font-bold text-[#0f172a] opacity-100 peer-checked:opacity-0 transition-opacity duration-300 z-10 tracking-widest"
>
24H
</span>
<!-- AM/PM text -->
<span
class="absolute left-2 top-1/2 transform -translate-y-1/2 text-[10px] 3xl:text-sm font-bold text-[#0f172a] opacity-0 peer-checked:opacity-100 transition-opacity duration-300 z-10 tracking-widest"
>
AM/PM
</span>
</label>
</div>
<button
class="bg-[#60a5fa] text-[#0f172a] px-1 py-2 hidden rounded-md w-full text-l 3xl:text-lg hover:cursor-pointer"
id="removeCardsBtn"
>
Remove
</button>
</div>
<div
id="recentTimes"
class="w-[860px] 3xl:min-w-4xl h-[125px] 3xl:h-[155px] flex justify-end xl:gap-4 gap-3 flex-wrap overflow-y-auto xl:pr-4 pr-2"
></div>
</div>
</div>
</div>
</div>
</div>
<!-- Pagination -->
<div class="swiper-pagination flex flex-col gap-4 pr-2"></div>
</div>
<!-- Library scripts -->
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/rainyday.js@0.1.7/dist/rainyday.min.js"></script>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/map.js"></script>
<script src="https://cdn.amcharts.com/lib/5/geodata/worldLow.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>
<script type="module" src="src/main.js"></script>
</body>
</html>