contact page creation and minor css change.
This commit is contained in:
parent
c9bc4d6eb5
commit
dd3044bf45
@ -10,6 +10,7 @@
|
|||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<a class="home-link" href="/">Home</a>
|
<a class="home-link" href="/">Home</a>
|
||||||
<a class="about-link" href="/about">About</a>
|
<a class="about-link" href="/about">About</a>
|
||||||
|
<a class="contact-link" href="/contact">Contact</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="about-title-wrapper">
|
<div class="about-title-wrapper">
|
||||||
<h1 class="about-title">About /376chan</h1>
|
<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">
|
<div class="nav-wrapper">
|
||||||
<a class="home-link" href="/">Home</a>
|
<a class="home-link" href="/">Home</a>
|
||||||
<a class="about-link" href="/about">About</a>
|
<a class="about-link" href="/about">About</a>
|
||||||
|
<a class="contact-link" href="/contact">Contact</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="home-title-wrapper">
|
<div class="home-title-wrapper">
|
||||||
<h1 class="home-title">/376chan</h1>
|
<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.statusCode = 200;
|
||||||
res.setHeader("Content-Type", "text/json");
|
res.setHeader("Content-Type", "text/json");
|
||||||
var body = "";
|
var body = "";
|
||||||
|
var i = 1;
|
||||||
|
|
||||||
req.on("data", function(data) {
|
req.on("data", function(data) {
|
||||||
body = body + data;
|
body = body + data;
|
||||||
@ -61,7 +62,7 @@ const server = http.createServer((req, res) => {
|
|||||||
req.on("end", function() {
|
req.on("end", function() {
|
||||||
var post = qs.parse(body);
|
var post = qs.parse(body);
|
||||||
if (post.username === json[0].username && post.password === json[0].password) {
|
if (post.username === json[0].username && post.password === json[0].password) {
|
||||||
res.writeHead(301, { Location: "/sweatshirt" });
|
res.writeHead(301, { Location: "/" + post.username });
|
||||||
} else {
|
} else {
|
||||||
res.writeHead(301, { Location: "/wrongInfo" });
|
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;
|
const port = process.env.port || 8080;
|
||||||
|
@ -88,7 +88,7 @@ body {
|
|||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
top: -215px;
|
top: -215px;
|
||||||
left: 450px;
|
left: 435px;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user