Skip to content

Commit

Permalink
Merge pull request #8 from rtCamp/feat/renaming-first-party-set-to-re…
Browse files Browse the repository at this point in the history
…lated-set

Renaming first party set to Related websites set and adding new scenarios buttons
  • Loading branch information
gagan0123 authored Dec 13, 2023
2 parents 77347b7 + cb38e43 commit 44310f3
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ app.use((req, res, next) => {
});

// Mount routes for different demo types
const demoTypes = ['chips', 'first-party-sets', 'private-state-tokens', 'fedcm'];
const demoTypes = ['chips', 'related-websites-sets', 'private-state-tokens', 'fedcm'];
demoTypes.forEach(demoType => {
const demoRoutes = require(`./demos/${demoType}/routes`);
app.use(`/${demoType}`, demoRoutes); // Mount the routes on a path specific to the demo type
});

// Mount routes for different scenarios
const scenarios = ['ecommerce', 'single-sign-on', 'analytics', 'embedded-video'];
const scenarios = ['ecommerce', 'single-sign-on', 'analytics', 'embedded-video', 'create-account', 'third-party-auth', 'payment-flow', 'content-delivery-networks', ' recommendations'];
scenarios.forEach(scenario => {
const scenarioRoutes = require(`./scenarios/${scenario}/routes`);
app.use(`/${scenario}`, scenarioRoutes); // Mount the routes on a path specific to the scenario
Expand Down
3 changes: 3 additions & 0 deletions common/common-scenarios.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="flex justify-center">
<p class="text-lg font-bold mb-4 text-center">To learn more about the CUJs, access<a href="https://github.com/GoogleChromeLabs/ps-analysis-tool/wiki/Example-analysis-scenarios" target="_blank" rel="noopener">Analysis Scenarios</a> page</p>
</div>
4 changes: 2 additions & 2 deletions common/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="mt-auto text-center p-2 text-xs bg-white rounded-lg shadow m-4">
This project is part of the Privacy Sandbox Analysis Tool, to learn more visit our <a href="https://github.com/GoogleChromeLabs/ps-analysis-tool/wiki" class="text-blue-600 hover:underline" target="_blank" rel="noopener">Wiki Page</a>.
<footer class="mt-auto text-center p-2 text-xs bg-white rounded-lg m-4 container-lg">
This project is part of the Privacy Sandbox Analysis Tool. To learn more, visit our <a href="https://github.com/GoogleChromeLabs/ps-analysis-tool/wiki" class="text-blue-600 hover:underline" target="_blank" rel="noopener">Wiki Page</a>.
</footer>
</body>
</html>
39 changes: 31 additions & 8 deletions common/index.ejs
Original file line number Diff line number Diff line change
@@ -1,37 +1,60 @@
<%- include(commonPath + '/header.ejs') %>

<div class="container-lg mx-auto py-8">
<h1 class="text-3xl font-bold mb-4 text-center">Privacy Sandbox</h1>
<div class="flex justify-center">
<img src="/assets/PS_Logo.svg" class="mx-auto w-24 h-24 mb-4" alt="Logo">
</div>
<h1 class="text-3xl font-bold mb-8 text-center">Privacy Sandbox</h1>
<section class="text-center mb-4">
<h2 class="text-3xl font-bold mb-4 text-center">Scenarios</h2>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<a href="/analytics"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
Analytics
🔎 Analytics Tracking
</a>
<a href="/embedded-video"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
Embedded Video
📽️ Embedded Content
</a>
<a href="/ecommerce"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
E-Commerce
🛒 E-Commerce
</a>
<a href="/single-sign-on"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
Single Sign-On
🔐 Single Sign-On
</a>
<a href="/content-delivery-networks"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 Content Delivery Networks
</a>
<a href="/create-account"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 Creating an Account
</a>
<a href="/payment-flow"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 Payment Flow
</a>
<a href="/third-party-auth"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 Third-party Authentication
</a>
<a href="/recommendations"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 Personalization/Recommendations
</a>
</div>
</section>
<h2 class="text-3xl font-bold mb-4 text-center mt-4">API Demos</h2>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<a href="/chips"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
CHIPS
🍪 CHIPS
</a>
<a href="/first-party-sets"
<a href="/related-websites-sets"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
🚧 First Party Sets
🚧 Related Website Sets
</a>
<a href="/privacy-state-tokens"
class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300">
Expand Down
8 changes: 4 additions & 4 deletions common/under-construction.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<%- include(commonPath + '/header.ejs') %>

<div class="container mx-auto py-8">
<h1 class="text-3xl font-bold mb-4 text-center"><%= title %>></h1>
<div class="flex justify-center">
<a href="/"><img src="/assets/PS_Logo.svg" class="mx-auto w-24 h-24 mb-4" alt="Logo"></a>
</div>
<h1 class="text-3xl font-bold mb-4 text-center"><%= title %></h1>
<p class="text-lg font-bold mb-4 text-center">Page still under construction.</p>
</div>

</body>
</html>

<%- include(commonPath + '/footer.ejs') %>
11 changes: 11 additions & 0 deletions demos/related-websites-sets/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const path = require('path');
const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 Related Website Sets Demo'
});
});

module.exports = router;
1 change: 1 addition & 0 deletions public/assets/PS_Logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions scenarios/content-delivery-networks/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const path = require('path');
const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 Content Delivery Network'
});
});

module.exports = router;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 First Party Sets Demo'
title: '🚧 Creating an Account'
});
});

Expand Down
11 changes: 11 additions & 0 deletions scenarios/payment-flow/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const path = require('path');
const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 Payment Flow'
});
});

module.exports = router;
11 changes: 11 additions & 0 deletions scenarios/recommendations/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const path = require('path');
const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 Personalization/Recommendations'
});
});

module.exports = router;
11 changes: 11 additions & 0 deletions scenarios/third-party-auth/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const path = require('path');
const router = express.Router();

router.get('/', (req, res) => {
res.render('common/under-construction', {
title: '🚧 Third-party Authentication'
});
});

module.exports = router;

0 comments on commit 44310f3

Please sign in to comment.