diff --git a/app.js b/app.js index 19181e4..e8314a4 100644 --- a/app.js +++ b/app.js @@ -74,6 +74,7 @@ const scenarios = [ 'social-media', 'social-media-comments', 'disqus-comments', + 'spotify-embed', ]; scenarios.forEach(scenario => { const scenarioRoutes = require(`./src/scenarios/${scenario}/routes`); diff --git a/src/common/index.ejs b/src/common/index.ejs index 188eb3a..a2ca42f 100644 --- a/src/common/index.ejs +++ b/src/common/index.ejs @@ -21,8 +21,10 @@ <%= renderCard('Facebook Like', '👍', '/social-media') %> <%= renderCard('Facebook Comments', '💬', '/social-media-comments') %> <%= renderCard('Disqus Comments', '✉️', '/disqus-comments') %> + <%= renderCard('Spotify embed', '🔊', '/spotify-embed') %> <%= renderCard('CHIPS', '🍪', '/chips') %> <%= renderCard('Storage Access API', '🗃️', '/storage-access-api') %> + diff --git a/src/scenarios/spotify-embed/index.ejs b/src/scenarios/spotify-embed/index.ejs new file mode 100644 index 0000000..a376ccb --- /dev/null +++ b/src/scenarios/spotify-embed/index.ejs @@ -0,0 +1,6 @@ +<%- 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/spotify-embed/routes.js b/src/scenarios/spotify-embed/routes.js new file mode 100644 index 0000000..5f65388 --- /dev/null +++ b/src/scenarios/spotify-embed/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: 'Spotify Player' + }); +}); + +module.exports = router;