home page patch 4. libcasa irc page created.
This commit is contained in:
parent
79c18c92fe
commit
501aad4b92
19
pages/libcasa.html
Normal file
19
pages/libcasa.html
Normal 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>
|
15
server.js
15
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;
|
||||
|
@ -19,7 +19,7 @@ body {
|
||||
}
|
||||
|
||||
.irc-topics {
|
||||
margin-top: -30px;
|
||||
margin-top: -25px;
|
||||
color: white;
|
||||
margin-bottom: 5px;
|
||||
text-decoration: underline;
|
||||
|
Loading…
Reference in New Issue
Block a user