Skip to content

Commit

Permalink
Merge pull request #63 from rtCamp/feature/spotify-scenario
Browse files Browse the repository at this point in the history
Adding Spotify demo
  • Loading branch information
gagan0123 committed Apr 17, 2024
2 parents 5ae1ac3 + 049aadc commit 73818c4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions app.js
Expand Up @@ -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`);
Expand Down
2 changes: 2 additions & 0 deletions src/common/index.ejs
Expand Up @@ -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') %>

</div>
</div>

Expand Down
6 changes: 6 additions & 0 deletions src/scenarios/spotify-embed/index.ejs
@@ -0,0 +1,6 @@
<%- include(commonPath + '/header.ejs') %>

<%- include(commonPath + '/internal-page/header.ejs', {containerType: 'sm'}) %>
<iframe style="border-radius:12px" src="https://open.spotify.com/embed/episode/7makk4oTQel546B0PZlDM5?utm_source=generator" width="100%" height="352" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
<%- include(commonPath + '/internal-page/footer.ejs') %>
<%- include(commonPath + '/footer.ejs') %>
13 changes: 13 additions & 0 deletions 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;

0 comments on commit 73818c4

Please sign in to comment.