-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
42 lines (36 loc) · 1.11 KB
/
main.js
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
import './style.css'
import rpi5 from '/rpi-model.png'
document.querySelector('#app').innerHTML = `
<div>
<h1>Hi, Traveller 👋</h1>
<a href="https://www.raspberrypi.com" target="_blank">
<img src="${rpi5}" class="logo" alt="Vite logo" />
</a>
<h1>[email protected]</h1>
<p class="read-the-docs">
<a href="https://www.raspberrypi.com/documentation/" target="_blank" rel="noopener">
Raspberry Pi Docs
</a>
<span> - </span>
<a href="https://github.com/bravo-on-rpi" target="_blank" rel="noopener">
GitHub (BRAVO68WEB)
</a>
<span> - </span>
<a href="https://www.raspberrypi.com/software/" target="_blank" rel="noopener">
Raspberry Pi Software Hub
</a>
</p>
<p class="read-the-docs">
Running on : Raspberry Pi 5 Model B rev 1.0 (8GB)
<br />
IP Address : <span id="ip-address"></span>
</p>
</div>
`
;(() => {
fetch('https://ip.zxq.co').then((res) => res.json()).then((data) => {
document.getElementById('ip-address').textContent = data.ip
}).catch((err) => {
console.error(err)
})
})();