home page patch 4. libcasa irc page created.

This commit is contained in:
sweatshirt0 2023-01-27 23:42:47 -05:00
parent 79c18c92fe
commit 501aad4b92
3 changed files with 35 additions and 1 deletions

19
pages/libcasa.html Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Liberta Casa's IRC Thread</title>
</head>
<body>
<div class="whole-wrapper">
<div class="nav-wrapper">
<a class="home" href="/">Home</a>
<a class="about" href="/about">About</a>
<a class="register" href="/register">Register</a>
</div>
<div class="libcasa-title-wrapper">
<h2 class="libcasa-title">/lib</h2>
</div>
</div>
</body>
</html>

View File

@ -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;

View File

@ -19,7 +19,7 @@ body {
}
.irc-topics {
margin-top: -30px;
margin-top: -25px;
color: white;
margin-bottom: 5px;
text-decoration: underline;