From 82096c62ebab54260f28730a4addb30e4eb14e99 Mon Sep 17 00:00:00 2001 From: lauralani Date: Wed, 23 Aug 2023 16:17:31 +0200 Subject: [PATCH] add ci and update site --- .woodpecker/netlify.yaml | 12 ++++++++++++ servers.json | 7 +++++++ static/main.js | 3 ++- static/style.css | 16 ++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/netlify.yaml diff --git a/.woodpecker/netlify.yaml b/.woodpecker/netlify.yaml new file mode 100644 index 0000000..1a628ef --- /dev/null +++ b/.woodpecker/netlify.yaml @@ -0,0 +1,12 @@ +steps: + deploy: + image: lauralani/netlify-cli:latest + pull: true + when: + - event: push + branch: main + secrets: + - NETLIFY_AUTH_TOKEN + - NETLIFY_SITE_ID + commands: + - netlify deploy --prod --dir ./ \ No newline at end of file diff --git a/servers.json b/servers.json index 8cebcd1..df7b9e5 100644 --- a/servers.json +++ b/servers.json @@ -13,6 +13,13 @@ "whitelist": true, "password": false }, + { + "id": 16, + "displayname": "Ark Survival Evolved", + "serverurl": "\"Kuschelzone\" im Serverbrowser", + "whitelist": false, + "password": true + }, { "id": 3, "displayname": "Teamspeak 3", diff --git a/static/main.js b/static/main.js index c4380a1..5af4fa4 100644 --- a/static/main.js +++ b/static/main.js @@ -1,5 +1,5 @@ const badgeurl = "https://uptime-kuma.lauka.net/api/badge/##/status?style=for-the-badge" -const template = document.getElementById("game-template") +const template = document.getElementById("game-template").content const serverdata = "/servers.json" var gamecontainer = document.getElementById("gamelist") @@ -15,6 +15,7 @@ async function populatePage() { let url = badgeurl.replace("##", server.id) clone.querySelector("#game-name").innerHTML = server.displayname clone.querySelector("#game-badge").src = url + clone.querySelector("#game-url").innerHTML = server.serverurl clone.querySelector("#game-password").innerHTML = server.password ? "ja" : "nein" clone.querySelector("#game-whitelist").innerHTML = server.whitelist ? "ja" : "nein" diff --git a/static/style.css b/static/style.css index 4181aed..ecc4b31 100644 --- a/static/style.css +++ b/static/style.css @@ -52,4 +52,20 @@ body i { .game-card { margin: 0 20px; +} + +@media (max-width: 650px) { + body { + font-size: 1em; + } + + .status-image { + display: block; + margin-left: 6px; + margin-top: 5px; + } + + h2 { + margin-bottom: 7px; + } } \ No newline at end of file