diff --git a/server.js b/server.js
index 4ec9f6b..8756175 100644
--- a/server.js
+++ b/server.js
@@ -49,8 +49,10 @@ app.set('view engine', 'spy');
app.get('/', requireLoggedIn, (req, res) => {
let data = {
+ title: 'Home',
disabled: '',
- message: getSavedFile(req.session.user.username)}
+ message: getSavedFile(req.session.user.username)
+ }
let today = getNow().toISOString().slice(0,10)
let latestPost = req.session.user.latest_post
if (today === latestPost) {
@@ -64,22 +66,26 @@ app.get('/login', (req, res) => {
if (req.session.user) {
res.redirect('/')
} else {
- res.render('login.spy')
+ res.render('login.spy', {title: 'Log In'})
}
})
app.get('/edit', requireLoggedIn, (req, res) => {
getLatestPost( req.session.user.directory, (data, path) => {
- res.render('edit.spy', {data: data, path: path})
+ res.render('edit.spy', {data: data, path: path, title: 'Edit'})
})
})
app.get('/settings', requireLoggedIn, (req, res) => {
- res.render('settings.spy')
+ res.render('settings.spy', {title: 'Settings'})
})
app.get('/try-again', requireLoggedIn, (req, res, next) => {
- res.render('try-again.spy')
+ res.render('try-again.spy', {title: 'Log In'})
+})
+
+app.get('/help', requireLoggedIn, (req, res, next) => {
+ res.render('help.spy', {title: 'Help'})
})
// POST
diff --git a/templates/help.spy b/templates/help.spy
new file mode 100644
index 0000000..319ffee
--- /dev/null
+++ b/templates/help.spy
@@ -0,0 +1,24 @@
+<< partials/head >>
+
+ << partials/header >>
+
+ Help
+ Soyuz is a web app for writing Gemini posts.
+
+
+ Takes you to the home page where you can start writing today's post. The title of your post should be indicated by a level 1 heading at the top of the page.
+
+ Edit the most recent post - this could have been published with soyuz, or another way. If you change the title, this will be changed in the year archive and capsule homepage.
+
+ Change your password, or log out.
+
+ Display this help page.
+
+ Save a draft of your post. Any drafts will be deleted on the next publish.
+
+ Publish the current draft to your Gemini capsule, and delete any saved drafts. You can only publish one post per day, but if you like you can update your day's post by using the 'edit' function.
+
+
+
+
+