diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server.js | 11 | ||||
-rw-r--r-- | src/templates.js | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/server.js b/src/server.js index a419c74..8114172 100644 --- a/src/server.js +++ b/src/server.js @@ -134,6 +134,17 @@ function setUpRoutes(models, jwtFunctions, database) { res.status(200).send(html.join("")) // res.sendFile(__dirname + "/html/index.html") }) + server.get('/bread', async (req, res) => { + var html = [] + html.push(templates["bread"]["pre"]) + // html.push(templates["titlebar"]) + html.push(await constructFeed(models, "bread")) + html.push(templates["footer"]) + html.push(templates["bread"]["post"]) + + res.status(200).send(html.join("")) + // res.sendFile(__dirname + "/html/index.html") + }) server.get('/admin', (req, res) => res.sendFile(__dirname + "/html/admin.html")); server.get('/login', (req, res) => res.sendFile(__dirname + "/html/login.html")) server.get('/email', (req, res) => res.sendFile(__dirname + "/html/email.html")) diff --git a/src/templates.js b/src/templates.js index b1cde30..07a774c 100644 --- a/src/templates.js +++ b/src/templates.js @@ -36,5 +36,26 @@ module.exports = { <h1>Welcome to Mark's Kitchen</h1>`, post: `</body> </html>` + }, + bread: { + pre: `<!doctype html> + <html lang="en"> + + <head> + <title>Mark's Kitchen - Bread</title> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link rel="stylesheet" type="text/css" href="/css/styles.css"> + <link rel="shortcut icon" href="/favicon.ico"> + </head> + + <body> + <h1> + <a class="navigation" href="/" title="marks.kitchen"><</a> + Bread + </h1> + Some highlights (and lowlights) of breadmaking`, + post: `</body> + </html>` } }
\ No newline at end of file |