contact page creation and minor css change.
This commit is contained in:
parent
c9bc4d6eb5
commit
dd3044bf45
@ -10,6 +10,7 @@
|
||||
<div class="nav-wrapper">
|
||||
<a class="home-link" href="/">Home</a>
|
||||
<a class="about-link" href="/about">About</a>
|
||||
<a class="contact-link" href="/contact">Contact</a>
|
||||
</div>
|
||||
<div class="about-title-wrapper">
|
||||
<h1 class="about-title">About /376chan</h1>
|
||||
|
22
pages/contact.html
Normal file
22
pages/contact.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Contact Me.</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="contact-link" href="/contact">Contact</a>
|
||||
</div>
|
||||
<div class="contact-content-wrapper">
|
||||
<h2 class="contact-title">IRC</h2>
|
||||
<p class="contact-content">Libcasa: sweatshirt, samsepi0l<br/><br/>
|
||||
Libera: sweatshirt</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -11,6 +11,7 @@
|
||||
<div class="nav-wrapper">
|
||||
<a class="home-link" href="/">Home</a>
|
||||
<a class="about-link" href="/about">About</a>
|
||||
<a class="contact-link" href="/contact">Contact</a>
|
||||
</div>
|
||||
<div class="home-title-wrapper">
|
||||
<h1 class="home-title">/376chan</h1>
|
||||
|
18
server.js
18
server.js
@ -53,6 +53,7 @@ const server = http.createServer((req, res) => {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "text/json");
|
||||
var body = "";
|
||||
var i = 1;
|
||||
|
||||
req.on("data", function(data) {
|
||||
body = body + data;
|
||||
@ -61,7 +62,7 @@ const server = http.createServer((req, res) => {
|
||||
req.on("end", function() {
|
||||
var post = qs.parse(body);
|
||||
if (post.username === json[0].username && post.password === json[0].password) {
|
||||
res.writeHead(301, { Location: "/sweatshirt" });
|
||||
res.writeHead(301, { Location: "/" + post.username });
|
||||
} else {
|
||||
res.writeHead(301, { Location: "/wrongInfo" });
|
||||
}
|
||||
@ -100,6 +101,21 @@ const server = http.createServer((req, res) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (req.url === "/contact") {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
fs.readFile("./pages/contact.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 || 8080;
|
||||
|
@ -88,7 +88,7 @@ body {
|
||||
position: relative;
|
||||
float: left;
|
||||
top: -215px;
|
||||
left: 450px;
|
||||
left: 435px;
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
|
Loading…
Reference in New Issue
Block a user