news and about page creation; minor css changes.
This commit is contained in:
parent
ec03f7a713
commit
5f0477ca8d
23
pages/about.html
Normal file
23
pages/about.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>About</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="whole-wrapper">
|
||||
<div class="nav-wrapper">
|
||||
<a class="home-link" href="/">Home</a>
|
||||
<a class="about-link" href="/about">About</a>
|
||||
<a class="news-link" href="/news">News</a>
|
||||
</div>
|
||||
<div class="atitle-wrapper">
|
||||
<h1 class="title">About Us.</h1>
|
||||
</div>
|
||||
<div class="about-content-wrapper">
|
||||
<p class="about-content">We are a streaming service that emphasises the freedom of all it's users -- viewers and streamers alike.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -7,9 +7,13 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="whole-wrapper">
|
||||
<h1 class="tes">Logged in.</h1>
|
||||
<a class="back-home" href="/">Back home</a>
|
||||
<div class="nav-wrapper">
|
||||
<a class="logged-home-link" href="/home">Home</a>
|
||||
<a class="logout-link" href="/log-out">Log Out</a>
|
||||
</div>
|
||||
<div class="logged-title-wrapper">
|
||||
<h1 class="logged-title">You are now logged in.</h1>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
23
pages/news.html
Normal file
23
pages/news.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Anarchy News</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="whole-wrapper">
|
||||
<div class="nav-wrapper">
|
||||
<a class="home-link" href="/">Home</a>
|
||||
<a class="about-link" href="/about">About</a>
|
||||
<a class="news-link" href="/news">News</a>
|
||||
</div>
|
||||
<div class="news-title-wrapper">
|
||||
<h1 class="news-title">News</h1>
|
||||
</div>
|
||||
<div class="news-content-wrapper">
|
||||
<p class="news-content">No news so far...</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
30
server.js
30
server.js
@ -88,6 +88,36 @@ const server = http.createServer((req, res) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (req.url === "/about") {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
fs.readFile("pages/about.html", (error, data) => {
|
||||
if (error) {
|
||||
res.writeHead(404);
|
||||
res.write("Error: File not found.");
|
||||
} else {
|
||||
res.write(data);
|
||||
}
|
||||
|
||||
res.end();
|
||||
});
|
||||
}
|
||||
|
||||
if (req.url === "/news") {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
fs.readFile("pages/news.html", (error, data) => {
|
||||
if (error) {
|
||||
res.writeHead(404);
|
||||
res.write("Error: File not found.");
|
||||
} else {
|
||||
res.write(data);
|
||||
}
|
||||
|
||||
res.end();
|
||||
});
|
||||
}
|
||||
|
||||
if (req.url === "/members" && req.method === "POST") {
|
||||
res.statusCode = 200;
|
||||
//res.setHeader("Content-Type", "text/json");
|
||||
|
Loading…
Reference in New Issue
Block a user