-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (65 loc) · 2.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Nibble #81</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="title" content="Nibble #81" />
<meta
name="description"
content="Nibble is a Tech Newsletter with quick bits to stay updated on tech, life and memes"
/>
<link rel="icon" href="https://files.nibbles.dev/icons/favicon.ico" />
<link
rel="shortcut icon"
href="https://files.nibbles.dev/icons/favicon.ico"
/>
<link rel="canonical" href="https://latest.nibbles.dev/" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://latest.nibbles.dev" />
<meta property="og:title" content="Nibble #81" />
<meta
property="og:image"
content="https://files.nibbles.dev/covers/81.jpg"
/>
<!-- Twitter -->
<meta name="twitter:site" content="@AashutoshRathi" />
<meta name="twitter:creator" content="@AashutoshRathi" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://latest.nibbles.dev" />
<meta property="twitter:title" content="Nibble #81" />
<meta
name="twitter:image"
content="https://files.nibbles.dev/covers/81.jpg"
/>
<link rel="stylesheet" type="text/css" href="index.css" />
</head>
<body>
<div class="loading">
Hey! 👋🏻
<br />
<span>Taking you to <span id="nibble-edition">the latest nibble</span> in
<span id="countdown">3</span>...
</span>
</div>
</body>
<script>
let countdown = 3;
const countdownElement = document.getElementById('countdown');
const nibbleEditionElement = document.getElementById('nibble-edition');
const latestUrl = 'https://nibbles.dev/p/81';
const latestNumber = latestUrl.split('/').pop();
if (latestNumber) {
nibbleEditionElement.textContent = `Nibble #${latestNumber}`;
}
const intervalId = setInterval(() => {
countdown -= 1;
countdownElement.textContent = countdown;
if (countdown <= 0) {
clearInterval(intervalId);
window.location.href = latestUrl;
}
}, 500);
</script>
</html>