Repository navigation
Expand file tree
/
Copy pathweather.html
More file actions
99 lines (87 loc) · 3.38 KB
/
Copy pathweather.html
File metadata and controls
99 lines (87 loc) · 3.38 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wetter - Trainboard</title>
<link rel="shortcut icon" type="image/x-icon" href="./branding/favicon.ico">
<link rel="stylesheet" href="./css/styles.css">
<link rel="stylesheet" href="./css/dark-styles.css">
<meta name="robots" content="noindex">
<meta name="theme-color" content="#e3e3e3" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)">
<script src="./script/weather.js" defer></script>
<script src="./script/i18n.js"></script>
</head>
<body>
<div class="glowbar"></div>
<center>
<main>
<a href="#" onclick="history.go(-1)"><div class="backbutton"></div></a>
<span class="toptitle" id="toptitle">Wetter </span>
<br><br><br>
<center><p><canvas id="billing-loader"></canvas></p></center>
<div class="headercontainer">
<div class="leftpane">
<div id="weatherwidget"><span id="temp"></span><br><span id="description"></span><br><small id="feelsLike"></small></div>
</div>
<div class="rightpane">
<div class="listelement-container">
<div class="trip-message-item">
<table>
<tbody><tr class="wide">
<td><div class="listelementicon coloricon green" style="background-image: url('./icons/pressure.svg'); border-radius: 100px !important;"></div></td>
<td class="wide"><strong id="airpressure"></strong><br><small class="secondary">Luftdruck</small></td>
</tr>
</tbody></table>
</div>
<div class="trip-message-item">
<table>
<tbody><tr class="wide">
<td><div class="listelementicon coloricon blue" style="background-image: url('./icons/humidity.svg'); border-radius: 100px !important;"></div></td>
<td class="wide"><strong id="humidity"></strong><br><small class="secondary">Luftfeuchte</small></td>
</tr>
</tbody></table>
</div>
<div class="trip-message-item">
<table>
<tbody><tr class="wide">
<td><div class="listelementicon coloricon orange" style=" border-radius: 100px !important; display: flex; justify-content: center; align-items: center;"><img src="./icons/wind.svg" id="windicon"></div></td>
<td class="wide"><strong id="wind"></strong><br><small class="secondary">Wind</small></td>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
<br><br><br><br><center>
<small class="secondary">Daten:<br>Open Weather Map</small>
</main>
<script type="module">
import {
M3Animator,
getMorphedShape,
drawIndicator,
setupCanvas,
} from "https://cdn.jsdelivr.net/npm/@alerix/m3-loading-indicator/dist/core/index.js";
const canvas = document.querySelector("#billing-loader");
const size = 56;
// Set up a HiDPI-aware 2D canvas context.
const ctx = setupCanvas(canvas, size);
// Create the animation controller.
const animator = new M3Animator();
function renderBillingLoader(timestamp) {
animator.update(timestamp);
// Convert the current morph value into a drawable shape.
const shape = getMorphedShape(animator.morph);
drawIndicator(ctx, size, shape, animator.rotation, {
color: "#5a5a5a",
sizeRatio: 0.8,
contained: false
});
requestAnimationFrame(renderBillingLoader);
}
requestAnimationFrame(renderBillingLoader);
</script>
</body>
</html>