diff --git a/index.html b/index.html new file mode 100644 index 0000000..d661122 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + + + + + + + Games - lila.network + + + + + + + +

LiLa Games

+ +
+
+ + + + + + \ No newline at end of file diff --git a/servers.json b/servers.json new file mode 100644 index 0000000..8cebcd1 --- /dev/null +++ b/servers.json @@ -0,0 +1,23 @@ +[ + { + "id": 15, + "displayname": "Minecraft AllTheMods 8", + "serverurl": "allthemods.lila.network", + "whitelist": true, + "password": false + }, + { + "id": 4, + "displayname": "Minecraft Vanilla", + "serverurl": "minecraft.lauka.net", + "whitelist": true, + "password": false + }, + { + "id": 3, + "displayname": "Teamspeak 3", + "serverurl": "ts.lauka.net", + "whitelist": false, + "password": true + } +] \ No newline at end of file diff --git a/static/main.js b/static/main.js new file mode 100644 index 0000000..c4380a1 --- /dev/null +++ b/static/main.js @@ -0,0 +1,23 @@ +const badgeurl = "https://uptime-kuma.lauka.net/api/badge/##/status?style=for-the-badge" +const template = document.getElementById("game-template") +const serverdata = "/servers.json" +var gamecontainer = document.getElementById("gamelist") + + +async function populatePage() { + var request = await fetch(serverdata) + var data = await request.json() + console.log(data) + + data.forEach(server => { + let clone = template.cloneNode(true); + + let url = badgeurl.replace("##", server.id) + clone.querySelector("#game-name").innerHTML = server.displayname + clone.querySelector("#game-badge").src = url + clone.querySelector("#game-password").innerHTML = server.password ? "ja" : "nein" + clone.querySelector("#game-whitelist").innerHTML = server.whitelist ? "ja" : "nein" + + gamecontainer.appendChild(clone) + }); +} \ No newline at end of file diff --git a/static/open-sans-v35-latin-regular.woff2 b/static/open-sans-v35-latin-regular.woff2 new file mode 100644 index 0000000..510ca89 Binary files /dev/null and b/static/open-sans-v35-latin-regular.woff2 differ diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..4181aed --- /dev/null +++ b/static/style.css @@ -0,0 +1,55 @@ +html { + margin: 0; + padding: 0; + border: 0; + font: inherit; + vertical-align: baseline; +} + +body { + margin: 1em auto; + padding: 0; + border: 0; + font: inherit; + vertical-align: baseline; + font-size: 1.4em; + line-height: 1.4; + max-width: 40em; + background: #303030; + color: #c1c1c1; + font-family: 'Open Sans', sans-serif; +} + +@font-face { + font-display: swap; + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: url('/static/open-sans-v35-latin-regular.woff2') format('woff2'); +} + +h1,h2,h3 { + margin-left: 15px; +} + +.status-image { + position: relative; + bottom: -3px; +} + +body i { + text-decoration: none; + font-style: normal; +} + +.info { + color: aqua; +} + +.game-card p { + margin: 2px 0; +} + +.game-card { + margin: 0 20px; +} \ No newline at end of file