-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (65 loc) · 1.76 KB
/
Copy pathindex.html
File metadata and controls
75 lines (65 loc) · 1.76 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Outlook</title>
<style>
body {
margin: 0;
background: black;
color: white;
font-family: Arial, sans-serif;
text-align: center;
overflow-x: hidden;
}
#time {
font-size: 2.2em;
margin: 10px 0;
}
/* GRID LAYOUT — 3 columns that shrink but keep aspect ratio */
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: auto;
gap: 5px;
padding: 5px;
box-sizing: border-box;
}
.grid img {
width: 100%;
height: auto; /* Keep correct aspect ratio */
object-fit: contain; /* Make sure nothing stretches */
}
</style>
</head>
<body>
<div id="time"></div>
<div class="grid">
<img src="https://www.spc.noaa.gov/products/outlook/day1otlk.png">
<img src="https://www.spc.noaa.gov/products/outlook/day2otlk.png">
<img src="https://www.spc.noaa.gov/products/outlook/day3otlk.png">
<img src="https://www.spc.noaa.gov/products/outlook/day1probotlk_torn.png">
<img src="https://www.spc.noaa.gov/products/outlook/day2probotlk_torn.png">
<img src="https://www.wpc.ncep.noaa.gov/wwd/wssi/images/WSSI_Overall_EAX.png">
</div>
<script>
// Time in HH:MM:SS
function updateTime() {
const now = new Date();
document.getElementById('time').textContent =
now.toTimeString().split(" ")[0];
}
setInterval(updateTime, 1000);
updateTime();
// Refresh images every 10 minutes
function refreshImages() {
document.querySelectorAll('img').forEach(img => {
const cleanSrc = img.src.split("?")[0];
img.src = cleanSrc + "?t=" + Date.now();
});
}
setInterval(refreshImages, 600000);
</script>
</body>
</html>