-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (108 loc) · 3.35 KB
/
index.html
File metadata and controls
108 lines (108 loc) · 3.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Natural Clock</title>
<link rel="icon" type="image/png" sizes="16x16" href="icons/icon16.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/icon32.png">
<link rel="icon" type="image/png" sizes="48x48" href="icons/icon48.png">
<link rel="icon" type="image/png" sizes="128x128" href="icons/icon128.png">
<style>
html, body {
margin: 20px;
padding: 0;
width: 100%;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: start;
justify-content: start;
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.time-display {
display: flex;
justify-content: space-between;
width: 280px;
margin-top: 10px;
padding: 10px;
background-color: #f0f0ff;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.time-box {
text-align: center;
padding: 8px;
border-radius: 4px;
background-color: #f8f9fa;
flex: 1;
margin: 0 5px;
}
.time-label {
font-size: 12px;
color: #666;
margin-bottom: 4px;
}
.time-value {
font-size: 16px;
font-weight: bold;
color: #333;
}
.button-container {
margin-top: 10px;
display: flex;
gap: 10px;
}
button {
padding: 8px 16px;
cursor: pointer;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
}
button:hover {
background-color: #45a049;
}
input {
padding: 8px;
margin: 5px;
border: 1px solid #ddd;
border-radius: 4px;
}
#locationStatus {
margin-bottom: 10px;
color: #666;
font-size: 12px;
}
.hidden {
display: none;
}
</style>
<script src="lib/pixi-legacy.min.js"></script>
<script src="lib/suncalc.js"></script>
</head>
<body>
<div id="locationStatus"></div>
<div class="time-display">
<div class="time-box">
<div class="time-label">Real Time</div>
<div class="time-value" id="realTimeDisplay">--:--:--</div>
</div>
<div class="time-box">
<div class="time-label">Natural Time</div>
<div class="time-value" id="naturalTimeDisplay">--:--:--</div>
</div>
</div>
<div class="button-container hidden" id="locationButtons">
<button id="browserLocationButton">Correct Time to your current Location</button>
<button id="toggleSolarButton" class="hidden">Hide Solar Hands</button>
</div>
<div class="hidden custom-location" id="customLocation">
<input type="number" id="latitude" step="0.0001" placeholder="Latitude">
<input type="number" id="longitude" step="0.0001" placeholder="Longitude">
<button id="customLocationButton" onclick="updateCustomLocation()">Update Location</button>
</div>
<script src="clock.js"></script>
</body>
</html>