From b6ab75b1aaacddd7202b777d21adfc6d51049427 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 9 Oct 2017 12:48:04 -0400 Subject: [PATCH] Add back a common css file, use lower contrast color/background-color --- html/editor.html | 1 + html/playfield.html | 1 + server.js | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/html/editor.html b/html/editor.html index 35f12bd..e75e5dc 100644 --- a/html/editor.html +++ b/html/editor.html @@ -2,6 +2,7 @@ + Editor diff --git a/html/playfield.html b/html/playfield.html index b5117f3..1431398 100644 --- a/html/playfield.html +++ b/html/playfield.html @@ -3,6 +3,7 @@ + Playfield diff --git a/server.js b/server.js index 832db7b..87d08d3 100644 --- a/server.js +++ b/server.js @@ -24,6 +24,7 @@ const server = http.createServer((req, res) => { switch (pathParts[2]) { case 'playfield.css': case 'editor.css': + case 'common.css': sendFile(res, 'css/' + pathParts[2], 'text/css'); break; default: @@ -70,10 +71,6 @@ const server = http.createServer((req, res) => { break; } let deckName = decodeURI(pathParts[2]); - if (!decks.includes(deckName)) { - send404(res, uri); - break; - } switch (pathParts[3] || '') { case '': sendDeckIndex(res, deckName); @@ -112,9 +109,11 @@ function sendIndex(res) { const html = ` + Index + @@ -128,6 +127,7 @@ function sendDeckIndex(res, deckName) { const html = ` + ${deckName} @@ -219,6 +219,7 @@ function send404(res, uri) { const html = ` 404 Not Found +

Error 404: Path ${uri.pathname} not found