From 3b0f1f609d3e11f3695100f6d66ff724927bb10a Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Mon, 26 Feb 2024 17:53:46 +0000 Subject: [PATCH] adding disqus demo --- app.js | 3 ++- src/common/index.ejs | 1 + src/scenarios/disqus-comments/index.ejs | 24 ++++++++++++++++++++++++ src/scenarios/disqus-comments/routes.js | 13 +++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/scenarios/disqus-comments/index.ejs create mode 100644 src/scenarios/disqus-comments/routes.js diff --git a/app.js b/app.js index 47f3893..19181e4 100644 --- a/app.js +++ b/app.js @@ -72,7 +72,8 @@ const scenarios = [ 'personalization-localstorage', 'gsi', 'social-media', - 'social-media-comments' + 'social-media-comments', + 'disqus-comments', ]; scenarios.forEach(scenario => { const scenarioRoutes = require(`./src/scenarios/${scenario}/routes`); diff --git a/src/common/index.ejs b/src/common/index.ejs index c12e5d1..188eb3a 100644 --- a/src/common/index.ejs +++ b/src/common/index.ejs @@ -20,6 +20,7 @@ <%= renderCard('Legacy GSI', '🔐', '/gsi') %> <%= renderCard('Facebook Like', '👍', '/social-media') %> <%= renderCard('Facebook Comments', '💬', '/social-media-comments') %> + <%= renderCard('Disqus Comments', '✉️', '/disqus-comments') %> <%= renderCard('CHIPS', '🍪', '/chips') %> <%= renderCard('Storage Access API', '🗃️', '/storage-access-api') %> diff --git a/src/scenarios/disqus-comments/index.ejs b/src/scenarios/disqus-comments/index.ejs new file mode 100644 index 0000000..70b48b6 --- /dev/null +++ b/src/scenarios/disqus-comments/index.ejs @@ -0,0 +1,24 @@ +<%- include(commonPath + '/header.ejs') %> + + <%- include(commonPath + '/internal-page/header.ejs', {containerType: 'sm'}) %> +
+ + + <%- include(commonPath + '/internal-page/footer.ejs') %> +<%- include(commonPath + '/footer.ejs') %> diff --git a/src/scenarios/disqus-comments/routes.js b/src/scenarios/disqus-comments/routes.js new file mode 100644 index 0000000..88edaa9 --- /dev/null +++ b/src/scenarios/disqus-comments/routes.js @@ -0,0 +1,13 @@ +const express = require('express'); +const path = require('path'); +const router = express.Router(); + +router.get('/', (req, res) => { + // Send the default page + const currentDomain = req.get('host'); + res.render(path.join(__dirname,'index'), { + title: 'Disqus Comments' + }); +}); + +module.exports = router;