From 9dbea43066e37d9f256c6742ba51cb59e745cc90 Mon Sep 17 00:00:00 2001 From: Wingy Date: Thu, 5 Nov 2020 17:42:24 -0500 Subject: [PATCH] show supported sites --- routes/index.js | 1 + routes/supported-sites/index.js | 11 +++++++++++ views/supported-sites.pug | 9 +++++++++ views/wishlist.pug | 2 +- yarn.lock | 6 +++--- 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 routes/supported-sites/index.js create mode 100644 views/supported-sites.pug diff --git a/routes/index.js b/routes/index.js index 90e1d0b..126f4ef 100644 --- a/routes/index.js +++ b/routes/index.js @@ -32,6 +32,7 @@ module.exports = ({ db, config }) => { router.use('/confirm-account', require('./confirm-account')(db)); router.use('/wishlist', require('./wishlist')(db)); + router.use('/supported-sites', require('./supported-sites')()) router.use('/profile', require('./profile')(db)); diff --git a/routes/supported-sites/index.js b/routes/supported-sites/index.js new file mode 100644 index 0000000..fce1e49 --- /dev/null +++ b/routes/supported-sites/index.js @@ -0,0 +1,11 @@ +const express = require('express') + +module.exports = () => { + const router = express.Router() + + router.get('/', async (req, res) => { + res.render('supported-sites', { title: 'Supported Sites' }) + }) + + return router +} \ No newline at end of file diff --git a/views/supported-sites.pug b/views/supported-sites.pug new file mode 100644 index 0000000..afb252d --- /dev/null +++ b/views/supported-sites.pug @@ -0,0 +1,9 @@ +extends layout.pug + +block content + if req.headers.referer + span.is-size-3(style='margin-top: 0; padding-top: 0;') + a(href=req.headers.referer) < Back + ul + for site of _CC.require('get-product-name').sites + li= site.name \ No newline at end of file diff --git a/views/wishlist.pug b/views/wishlist.pug index 3d259be..b887c9a 100644 --- a/views/wishlist.pug +++ b/views/wishlist.pug @@ -178,7 +178,7 @@ block content input.inline.button(type='submit' value='Move item down') form(method='POST') .field - label.label Item URL or Name + label.label Item URL or Name (Supported Sites) .control.has-icons-left input.input( type='text', diff --git a/yarn.lock b/yarn.lock index 8e3f656..169383a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -868,9 +868,9 @@ "tiny-each-async" "2.0.3" "get-product-name@1": - "integrity" "sha512-EmxDzytXhHuWSZbOIKc7aDKaCpprvFw9DaTXLtaaiG+KXT7SCwZUQYdGY/0BWmQmu6xrmJWggih/13+syCjKzw==" - "resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.8.0.tgz" - "version" "1.8.0" + "integrity" "sha512-l0wcyIrVb2KnGMIKuueK+zuDaXW+0K1FYsJDs53WwToRjM6v7uypf0hrIynifAEjzTxmZw4k+7oEgjY3l9mpXg==" + "resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.10.0.tgz" + "version" "1.10.0" dependencies: "cheerio" "^1.0.0-rc.3" "child-process-promise" "^2.2.1"