-
Notifications
You must be signed in to change notification settings - Fork 1
/
widgets.html
62 lines (51 loc) · 1.3 KB
/
widgets.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
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<script type="text/javascript" src="scripts/time.js" defer></script>
<style>
* {
margin: 0;
padding: 0;
text-align: center;
font-family: Inter;
overflow-x: hidden;
user-select: none;
}
.clock {
background: #1d1d1d55;
border-radius: 5px;
color: white;
padding: 10px;
margin-bottom: 15px;
}
.clock2 {
border-radius: 5px;
color: white;
height: 300px;
}
body {
padding: 15px;
}
</style>
</head>
<body id="body">
<div class="clock">
<h1 id="span"></h1>
<br>
<p id="demo"></p>
</div>
<div class="clock">
<p id="wttr"></p>
</div>
</body>
<script type="text/javascript">
let date = new Date();
document.getElementById("demo").innerHTML = date;
async function wttr() {
let fetching = await fetch('https://wttr.in/?format=3')
let res = await fetching.text()
document.getElementById('wttr').innerText = res
}
setInterval(wttr, 2500)
</script>
</html>