From 7a02701c6963cddeceb894aec373e4866cfdaa2d Mon Sep 17 00:00:00 2001 From: JoelHMikael Date: Tue, 7 Dec 2021 20:28:14 +0200 Subject: Minor changes to the server and UI --- index.html | 2 +- server.js | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 4c3a491..08d35b6 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@
-
+

\(foodshift-header\)

\(result\)

diff --git a/server.js b/server.js index 86e107d..d15d04d 100644 --- a/server.js +++ b/server.js @@ -8,15 +8,6 @@ async function init() { const weekdays = [undefined, "MAANANTAI", "TIISTAI", "KESKIVIIKKO", "TORSTAI", "PERJANTAI", undefined]; - const shifts = [ - //1: - "Ruokailuvuoro 1", - //2: - "Ruokailuvuoro 2", - //3: - "Ruokailuvuoro 3" - ]; - const build = { "./index.html": buildMain, "./index.css": buildDefault, @@ -39,7 +30,6 @@ async function init() const args = { "path": path, "query": q.query, - "shifts": shifts, "db": DB }; if (typeof build[path] === "function") @@ -78,7 +68,6 @@ async function buildMain(args) let index; if (typeof query.index === "string") index = query.index.toUpperCase().replaceAll(".", "").replaceAll(" ", ""); - const shifts = args["shifts"]; const DB = args["db"]; const data = await openFile(path); @@ -101,6 +90,12 @@ async function buildMain(args) res = "Kyseiselle kurssille/opettajalle ei löydy ruokailua päivältä!"; // it's the frickin \r in the database! data_string = data_string.replace("\\(result\\)", res); data_string = data_string.replace(`