From cc2c3863b0a3ec26e6610163c00b5f8f6aedc716 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 2 Aug 2019 15:35:14 -0400 Subject: About page, updated 404 and changed style --- app.js | 1 + package-lock.json | 24 ++++++++++++++++++++++++ package.json | 1 + public/css/style.css | 2 +- routes/about.js | 8 ++++++++ views/404.ejs | 9 +++++++-- views/about.ejs | 25 +++++++++++++++++++++++++ views/includes/footer.ejs | 9 ++++++++- views/includes/header.ejs | 10 +++++++--- views/includes/navbar.ejs | 31 +++++++++++++++++++++---------- views/index.ejs | 13 +++++++++++-- 11 files changed, 114 insertions(+), 19 deletions(-) create mode 100644 routes/about.js create mode 100644 views/about.ejs diff --git a/app.js b/app.js index b7a6820..0b1149d 100644 --- a/app.js +++ b/app.js @@ -71,6 +71,7 @@ app.use(express.static(path.join(__dirname, "public"))); app.use(logger) app.use("/", require("./routes/index")); +app.use("/about", require("./routes/about")); app.use((req, res) => { res.status(404).render("404", {title: "404 | Alee Productions"}); diff --git a/package-lock.json b/package-lock.json index a1b883a..d0ed9d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2321,6 +2321,30 @@ } } }, + "serve-favicon": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", + "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=", + "requires": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.1.1", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", diff --git a/package.json b/package.json index b358b1e..fe963ce 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "express": "^4.17.1", "moment": "^2.24.0", "readline": "^1.3.0", + "serve-favicon": "^2.5.0", "webhook-discord": "^3.2.0" }, "devDependencies": { diff --git a/public/css/style.css b/public/css/style.css index c67b395..410907a 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -2,4 +2,4 @@ body { font-family: Play, sans-serif; background-color: #212121; color: #ffffff; -} \ No newline at end of file +} diff --git a/routes/about.js b/routes/about.js new file mode 100644 index 0000000..a46108c --- /dev/null +++ b/routes/about.js @@ -0,0 +1,8 @@ +const express = require("express"); +const router = express.Router(); + +router.get('/', (req, res) => { + res.render('about', {title: 'About | Alee Productions'}); + }); + +module.exports = router; \ No newline at end of file diff --git a/views/404.ejs b/views/404.ejs index 2bcc58e..4bdc4a1 100644 --- a/views/404.ejs +++ b/views/404.ejs @@ -1,10 +1,15 @@ - + <% include ./includes/header %> <%= title %> -

404 - Not Found

+
+

404 - Not Found

+

Oops, seems like that page isn't found!

+

Return to homepage?

+
+ <% include ./includes/footer %> \ No newline at end of file diff --git a/views/about.ejs b/views/about.ejs new file mode 100644 index 0000000..87485be --- /dev/null +++ b/views/about.ejs @@ -0,0 +1,25 @@ + + + + + <% include ./includes/header %> + <%= title %> + + + + <% include ./includes/navbar %> +
+

About Alee Productions

+

Alee Productions is a productions company by Andrew Lee that focuses on making videos and games. +

+
+
+

History

+

Alee Productions started in 2016. It used to be called "AleeCorp" and used to make just software but over time it started branching to other things like making games and videos. + In late 2018, AleeCorp merged with Universe and some project merged but due to a community conflict during October in that year, Universe and AleeCorp splited. In 2019 however, AleeCorp renamed to Alee Productions just to make the company more professional.

+ +
+ <% include ./includes/footer %> + + + \ No newline at end of file diff --git a/views/includes/footer.ejs b/views/includes/footer.ejs index 8a666f5..56a654c 100644 --- a/views/includes/footer.ejs +++ b/views/includes/footer.ejs @@ -1 +1,8 @@ - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/views/includes/header.ejs b/views/includes/header.ejs index 268e2d4..9f47fb4 100644 --- a/views/includes/header.ejs +++ b/views/includes/header.ejs @@ -1,3 +1,7 @@ - - - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/views/includes/navbar.ejs b/views/includes/navbar.ejs index 634ee5a..ed2e826 100644 --- a/views/includes/navbar.ejs +++ b/views/includes/navbar.ejs @@ -1,12 +1,23 @@ -