1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:59:30 +00:00

Added logout template and route

This commit is contained in:
2022-01-31 21:47:18 +00:00
parent 68beca8e14
commit 5946aeffb0
3 changed files with 20 additions and 0 deletions

View File

@@ -25,6 +25,13 @@ router.get('/password-reset', (req, res) => {
});
});
router.get('/logout', (req, res) => {
return res.render('logout', {
title: 'Stratos - Logout',
username: req.session.fullName
});
});
module.exports = {
root: '/',
router: router

View File

@@ -11,3 +11,8 @@ a {
text-decoration: underline;
}
}
span.hl {
color: $primary-colour;
font-weight: bold;
}

8
views/logout.hbs Normal file
View File

@@ -0,0 +1,8 @@
{{> mainPageHeader name='Log Out' }}
<div class='mainForm'>
<p style='text-align: center;'>You are logged in as <span class='hl'>{{ username }}</span></p>
<form action='/logout' method='post'>
<input type='submit' class='btn btn--primary' value='Log Out'/>
</form>
</div>