From 501aad4b9212636bb6fe2a70d61220d78b54e661 Mon Sep 17 00:00:00 2001 From: sweatshirt0 Date: Fri, 27 Jan 2023 23:42:47 -0500 Subject: [PATCH] home page patch 4. libcasa irc page created. --- pages/libcasa.html | 19 +++++++++++++++++++ server.js | 15 +++++++++++++++ styles/styles.css | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pages/libcasa.html diff --git a/pages/libcasa.html b/pages/libcasa.html new file mode 100644 index 0000000..88b6440 --- /dev/null +++ b/pages/libcasa.html @@ -0,0 +1,19 @@ + + + + + Liberta Casa's IRC Thread + + +
+ +
+

/lib

+
+
+ + diff --git a/server.js b/server.js index 1f288e0..608f32d 100644 --- a/server.js +++ b/server.js @@ -54,6 +54,21 @@ const server = http.createServer((req, res) => { }); } + if (req.url === "/libcasa-irc") { + res.statusCode = 200; + res.setHeader("Content-Type", "text/html"); + fs.readFile("./pages/libcasa.html", function(error, data) { + if (error) { + res.writeHead(404); + res.write("Error: File not found."); + } else { + res.write(data); + } + + res.end(); + }); + } + }); const port = process.env.port || 8000; diff --git a/styles/styles.css b/styles/styles.css index d0e7899..da93c6c 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -19,7 +19,7 @@ body { } .irc-topics { - margin-top: -30px; + margin-top: -25px; color: white; margin-bottom: 5px; text-decoration: underline;