add about route
This commit is contained in:
parent
4bf345b541
commit
901e2d27cd
|
@ -19,6 +19,7 @@
|
|||
"crc-32": "^1.2.2",
|
||||
"dotenv": "^16.0.3",
|
||||
"express": "^4.18.2",
|
||||
"express-async-handler": "^1.2.0",
|
||||
"express-session": "^1.17.3",
|
||||
"glob": "^8.1.0",
|
||||
"gulp": "^4.0.2",
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
const Helpers = require('../helpers');
|
||||
const handler = require('express-async-handler');
|
||||
|
||||
async function about(req, res) {
|
||||
res.send(await Helpers.ViewLoader.load('about.pug', {
|
||||
current_route: req.originalUrl
|
||||
}));
|
||||
}
|
||||
|
||||
module.exports = (router) => {
|
||||
router.get('/about', handler(about));
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
extends layout/main.pug
|
||||
block root
|
||||
- var title = 'About me'
|
||||
include ui/label.pug
|
||||
block content
|
||||
h2 About me page
|
||||
hr
|
||||
p
|
||||
+label('TODO:', '#a3f4bf')
|
||||
| Write about me
|
Loading…
Reference in New Issue