diff --git a/style.css b/css/playfield.css similarity index 100% rename from style.css rename to css/playfield.css diff --git a/html/editor.html b/html/editor.html index ec20553..e66cb0e 100644 --- a/html/editor.html +++ b/html/editor.html @@ -1,7 +1,7 @@ - + Editor diff --git a/html/playfield.html b/html/playfield.html index d4055fc..b5117f3 100644 --- a/html/playfield.html +++ b/html/playfield.html @@ -2,7 +2,7 @@ - + Playfield diff --git a/server.js b/server.js index fd80d15..832db7b 100644 --- a/server.js +++ b/server.js @@ -20,8 +20,15 @@ const server = http.createServer((req, res) => { case 'index.html': sendIndex(res); break; - case 'style.css': - sendFile(res, 'style.css', 'text/css'); + case 'css': + switch (pathParts[2]) { + case 'playfield.css': + case 'editor.css': + sendFile(res, 'css/' + pathParts[2], 'text/css'); + break; + default: + send404(res, uri); + } break; case 'js': switch (pathParts[2]) { @@ -105,7 +112,6 @@ function sendIndex(res) { const html = ` - Index @@ -122,7 +128,6 @@ function sendDeckIndex(res, deckName) { const html = ` - ${deckName} @@ -214,7 +219,6 @@ function send404(res, uri) { const html = ` 404 Not Found -

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