From ebb432b5671526147a7b16c8bb1dcce121a8bec2 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Fri, 26 Nov 2021 23:14:29 -0700 Subject: [PATCH] Create about page --- app.js | 2 ++ public/stylesheets/index.css | 2 +- public/stylesheets/style.css | 9 +++++++++ routes/about.js | 8 ++++++++ views/about.pug | 13 +++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 routes/about.js create mode 100644 views/about.pug diff --git a/app.js b/app.js index 4065b14..9764a31 100644 --- a/app.js +++ b/app.js @@ -14,6 +14,7 @@ var indexRouter = require('./routes/index'); var dataRouter = require('./routes/data'); var manageRouter = require('./routes/manage'); var authRouter = require('./routes/auth'); +var aboutRouter = require('./routes/about'); var app = express(); @@ -51,6 +52,7 @@ app.use('/', indexRouter); app.use('/data', dataRouter); app.use('/manage', manageRouter); app.use('/auth', authRouter); +app.use('/about', aboutRouter); // catch 404 and forward to error handler diff --git a/public/stylesheets/index.css b/public/stylesheets/index.css index d08e1e8..eb71b13 100644 --- a/public/stylesheets/index.css +++ b/public/stylesheets/index.css @@ -31,4 +31,4 @@ tr { #login-button { margin-left: auto; -} \ No newline at end of file +} diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index a3f1d85..1255c30 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -59,4 +59,13 @@ input { #about-footer { margin-top: 3em; text-align: center; +} + + +p { + line-height: 2; +} + +a { + color: black; } \ No newline at end of file diff --git a/routes/about.js b/routes/about.js new file mode 100644 index 0000000..7162c62 --- /dev/null +++ b/routes/about.js @@ -0,0 +1,8 @@ +var express = require('express'); +var router = express.Router(); + +router.get('/', function(req, res, next) { + res.render('about', { title: 'About Score Tracker', hideHomeButton: false }); +}); + +module.exports = router; diff --git a/views/about.pug b/views/about.pug new file mode 100644 index 0000000..d22f563 --- /dev/null +++ b/views/about.pug @@ -0,0 +1,13 @@ +extends layout + +block stylesheets + link(rel='stylesheet', href='/stylesheets/index.css') + +block actions + + + +block content + p Created by #[a(href="https://ethanreece.com") Ethan Reece], a student at #[a(href="https://colevalleychristian.org") Cole Valley Christian Schools]. + p Need help? Found a bug? Email: #[a(href="mailto:scoretrackerhelp@ethanreece.com") scoretrackerhelp@ethanreece.com] + p #[a(href="https://gitlab.sudoer.ch/sudoer777/score-tracker") Git repo] \ No newline at end of file