-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (116 loc) · 3.85 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<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>LATEST EARTH</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg" sizes="any">
<link rel="stylesheet" href="https://ungoldman.com/style.css/site.css">
<link rel="stylesheet" href="https://ungoldman.com/index.css">
<style>
html, body {
background: #000;
color: #fff;
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.top-bar {
position: relative;
z-index: 1;
}
.colophon {
color: #999;
font-size: 14px;
text-align: center;
margin: 3em auto;
}
.colophon date {
color: #ddd;
}
.sats {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
flex-grow: 1;
padding: 1em 0 3em;
}
.sat {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
justify-content: center;
}
.sat .desc {
font-size: 16px;
margin: 1em auto 0;
}
.sat .img {
margin: 1em auto 10em;
}
.sat img {
max-height: 90vh;
}
@media screen and (max-width: 1100px) {
.sat .img {
width: 90%;
}
}
</style>
</head>
<body>
<nav class="top-bar">
<div class="top-bar-title">
<a href="/">ungoldman</a>
<span>/</span>
<a href="/latest-earth">latest earth</a>
</div>
</nav>
<div class="sats">
<div class="sat">
<a class="desc" href="https://himawari8.nict.go.jp/">Himawari 8</a>
<a class="img" href="./images/himawari-8-latest.jpg"><img title="Himawari 8" src="./images/himawari-8-latest.jpg"></a>
</div>
<div class="sat">
<a class="desc" href="https://www.star.nesdis.noaa.gov/GOES/fulldisk.php?sat=G17">GOES-17</a>
<a class="img" href="./images/goes-17-latest.jpg"><img title="GOES-17" src="./images/goes-17-latest.jpg"></a>
</div>
<div class="sat">
<a class="desc" href="https://www.star.nesdis.noaa.gov/GOES/fulldisk.php?sat=G16">GOES-16</a>
<a class="img" href="./images/goes-16-latest.jpg"><img title="GOES-16" src="./images/goes-16-latest.jpg"></a>
</div>
<div class="sat">
<a class="desc" href="https://eumetview.eumetsat.int/static-images/latestImages.html">Meteosat 10</a>
<a class="img" href="./images/meteosat-10-latest.jpg"><img title="Meteosat 10" src="./images/meteosat-10-latest.jpg"></a>
</div>
<div class="sat">
<a class="desc" href="https://eumetview.eumetsat.int/static-images/latestImages.html">Meteosat 8</a>
<a class="img" href="./images/meteosat-8-latest.jpg"><img title="Meteosat 8" src="./images/meteosat-8-latest.jpg"></a>
</div>
</div>
<div class="colophon">
<p>Last updated <date datetime="2022-08-03T22:01:55.540Z">2022-08-03T22:01:55.540Z</date>.</p>
<p>This was an experiment in automating hourly satellite imagery retrieval from multiple sources. The experiment is currently inactive.</p>
<p>View source on <a href="https://github.com/ungoldman/latest-earth">github</a>.</p>
</div>
<script src="https://unpkg.com/[email protected]/dayjs.min.js"></script>
<script src="https://unpkg.com/[email protected]/plugin/relativeTime.js"></script>
<script src="https://unpkg.com/[email protected]/plugin/localizedFormat.js"></script>
<script>
dayjs.extend(dayjs_plugin_relativeTime)
dayjs.extend(dayjs_plugin_localizedFormat)
const $d = document.querySelector('date')
const datetime = $d.getAttribute('datetime')
const ago = dayjs(datetime).fromNow()
const title = dayjs(datetime).format('dddd, MMMM D, YYYY h:mm A')
$d.setAttribute('title', title)
$d.textContent = ago
</script>
</body>
</html>