Skip to content

Commit

Permalink
Adds pages for newsletter demo (#3599)
Browse files Browse the repository at this point in the history
Co-authored-by: justinchou-google <[email protected]>
  • Loading branch information
justinchou-google and justinchou-google authored Dec 17, 2024
1 parent 8383e70 commit 2584e46
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 1 deletion.
1 change: 1 addition & 0 deletions demos/public/demos.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function createNavigation() {
<li><a href="autoprompt-large-free.html">Large Auto Prompt (Free Article)</a></li>
<li><a href="free-article.html">Free Article</a></li>
<li><a href="link-subscription.html">Link Subscription</a></li>
<li><a href="newsletter.html">Newsletter CTA</a></li>
</ul>
`;

Expand Down
2 changes: 1 addition & 1 deletion demos/public/newsletter.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
type: "NewsArticle",
isPartOfType: ["Product"],
isPartOfProductId: "CAowvrHZCw:openaccess",
clientOptions: { theme: "dark", lang: "en" },
clientOptions: { theme: "light", lang: "en" },
});
});
</script>
Expand Down
50 changes: 50 additions & 0 deletions demos/public/prod/inactive/newsletter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mini Autoprompt (Free Article) - Swgjs Demos</title>
<link
rel="shortcut icon"
href="../../images/favicon.png"
type="image/x-icon"
/>

<link rel="stylesheet" href="../../demos.css" />

<script
async
type="application/javascript"
src="/examples/sample-pub/redirect-to/swg-basic.js"
></script>

<script>
(self.SWG_BASIC = self.SWG_BASIC || []).push((basicSubscriptions) => {
basicSubscriptions.init({
type: 'NewsArticle',
isAccessibleForFree: true,
isPartOfType: ['Product'],
isPartOfProductId: 'CAowmLOrCw:openaccess',
autoPromptType: 'subscription',
clientOptions: {theme: 'light', lang: 'en'},
});
});
</script>
</head>

<body>
<div class="content">
<article>
<h2>Newsletter Signup CTA</h2>

<p>
Macaroon chocolate wafer cake chocolate cake gummies soufflé lollipop
pie. Cheesecake cotton candy macaroon caramels pie.
</p>
</article>
</div>

<script src="../../demos.js"></script>
</body>
</html>
50 changes: 50 additions & 0 deletions demos/public/prod/subscriptions/newsletter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Large Autoprompt (Free Article) - Swgjs Demos</title>
<link
rel="shortcut icon"
href="../../images/favicon.png"
type="image/x-icon"
/>

<link rel="stylesheet" href="../../demos.css" />

<script
async
type="application/javascript"
src="/examples/sample-pub/redirect-to/swg-basic.js"
></script>

<script>
(self.SWG_BASIC = self.SWG_BASIC || []).push((basicSubscriptions) => {
basicSubscriptions.init({
type: 'NewsArticle',
isAccessibleForFree: true,
isPartOfType: ['Product'],
isPartOfProductId: 'CAowvrHZCw:cool',
autoPromptType: 'subscription_large',
clientOptions: {theme: 'dark', lang: 'en'},
});
});
</script>
</head>

<body>
<div class="content">
<article>
<h2>Large Autoprompt (Free Article)</h2>

<p>
Macaroon chocolate wafer cake chocolate cake gummies soufflé lollipop
pie. Cheesecake cotton candy macaroon caramels pie.
</p>
</article>
</div>

<script src="../../demos.js"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions demos/public/qual/contributions/newsletter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>Newsletter CTA - Swgjs Demos</title>
<link rel="shortcut icon"
href="../../images/favicon.png"
type="image/x-icon">

<link rel="stylesheet"
href="../../demos.css">

<script async
type="application/javascript"
src="/examples/sample-pub/redirect-to/swg-basic.js"></script>

<script>
(self.SWG_BASIC = self.SWG_BASIC || []).push(basicSubscriptions => {
basicSubscriptions.init({
type: "NewsArticle",
isPartOfType: ["Product"],
isPartOfProductId: "CAowuq6IAQ:openaccess",
clientOptions: { theme: "light", lang: "en" },
});
});
</script>
</head>

<body>
<div class="content">
<article>
<h2>Newsletter CTA</h2>

<p>
Macaroon chocolate wafer cake chocolate cake gummies soufflé lollipop pie. Cheesecake cotton
candy macaroon caramels pie.
</p>
</article>
</div>

<script src="../../demos.js"></script>
</body>

</html>
49 changes: 49 additions & 0 deletions demos/public/qual/subscriptions/newsletter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>Newsletter CTA - Swgjs Demos</title>
<link rel="shortcut icon"
href="../../images/favicon.png"
type="image/x-icon">

<link rel="stylesheet"
href="../../demos.css">

<script async
type="application/javascript"
src="/examples/sample-pub/redirect-to/swg-basic.js"></script>

<script>
(self.SWG_BASIC = self.SWG_BASIC || []).push(basicSubscriptions => {
basicSubscriptions.init({
type: "NewsArticle",
isPartOfType: ["Product"],
isPartOfProductId: "CAowuq6IAQ:openaccess",
clientOptions: { theme: "light", lang: "en" },
});
});
</script>
</head>

<body>
<div class="content">
<article>
<h2>Newsletter CTA</h2>

<p>
Macaroon chocolate wafer cake chocolate cake gummies soufflé lollipop pie. Cheesecake cotton
candy macaroon caramels pie.
</p>
</article>
</div>

<script src="../../demos.js"></script>
</body>

</html>

0 comments on commit 2584e46

Please sign in to comment.