Skip to content

Commit

Permalink
chore: move dev to playground
Browse files Browse the repository at this point in the history
  • Loading branch information
pattan committed Apr 25, 2024
1 parent f116f27 commit f0dbba8
Show file tree
Hide file tree
Showing 15 changed files with 738 additions and 758 deletions.
8 changes: 4 additions & 4 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
}
}
65 changes: 35 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Advantage</title>
<style>
html, body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
}
.container {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="container">

<div>
<h1>
Advantage
</h1>
<a href="/src/dev/index.html">Development demo</a>
</div>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Advantage</title>
<style>
html,
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
}

.container {
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>

<body>
<div class="container">

<div>
<h1>
Advantage
</h1>
<a href="/playground/index.html">Development demo</a>
</div>

</body>
</html>

</div>

</body>

</html>
2 changes: 1 addition & 1 deletion src/dev/config.ts → playground/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AdvantageFormatName, IAdvantageWrapper } from "../types";
import { AdvantageFormatName, IAdvantageWrapper } from "../src/types";

export default {
formats: [
Expand Down
2 changes: 1 addition & 1 deletion src/dev/custom.html → playground/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Take advantage
</button>
</div>
<script type="module" src="/src/dev/custom.ts"></script>
<script type="module" src="./custom.ts"></script>
</body>

</html>
6 changes: 3 additions & 3 deletions src/dev/custom.ts → playground/custom.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdvantageCreativeMessenger } from "../advantage";
import { AdvantageMessageAction, AdvantageFormatName } from "../types";
import { logger } from "../utils/logging";
import { AdvantageCreativeMessenger } from "../src/advantage";
import { AdvantageMessageAction, AdvantageFormatName } from "../src/types";
import { logger } from "../src/utils/logging";

async function main() {
const advantageMessenger = new AdvantageCreativeMessenger();
Expand Down
665 changes: 665 additions & 0 deletions playground/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/dev/index.ts → playground/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Advantage } from "../advantage";
import { AdvantageAdSlotResponder } from "../advantage/messaging/publisher-side";
import { Advantage } from "../src/advantage";
import { AdvantageAdSlotResponder } from "../src/advantage/messaging/publisher-side";
//import { IAdvantageWrapper } from "../types";
import localConfig from "./config";

Expand Down
2 changes: 1 addition & 1 deletion src/dev/midscroll.html → playground/midscroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Take advantage
</button>
</div>
<script type="module" src="/src/dev/midscroll.ts"></script>
<script type="module" src="./midscroll.ts"></script>
</body>

</html>
6 changes: 3 additions & 3 deletions src/dev/midscroll.ts → playground/midscroll.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdvantageCreativeMessenger } from "../advantage";
import { AdvantageMessageAction, AdvantageFormatName } from "../types";
import { logger } from "../utils/logging";
import { AdvantageCreativeMessenger } from "../src/advantage";
import { AdvantageMessageAction, AdvantageFormatName } from "../src/types";
import { logger } from "../src/utils/logging";

/*
This is an example of a midscroll creative ad implementation.
Expand Down
2 changes: 1 addition & 1 deletion src/dev/sim.html → playground/sim.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ <h2 class="sans-serif text-xl font-bold mb-4">Advantage Horizon: Peering Into th
</article>
</section>
</div>
<script type="module" src="/src/dev/sim.ts"></script>
<script type="module" src="./sim.ts"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion src/dev/sim.ts → playground/sim.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//import { IAdvantageWrapper } from "../types";
import { Advantage } from "../advantage";
import { Advantage } from "../src/advantage";
import localConfig from "./config";

const advantage = Advantage.getInstance();
Expand Down
25 changes: 8 additions & 17 deletions src/dev/topscroll.html → playground/topscroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<body style="opacity: 0; transition: opacity 1s ease-in;">
<div id="ad">
<!--
<!--
Campaign: Demo 2
Creative: Advantage Topscroll Demo 2
Format: Topscroll
Expand All @@ -35,23 +35,14 @@
-->


<ins
class="mdtn-tag"
style="display:inline-block;width:100vw;height:100vh;"
data-pid="clujk1u21002k13ko8sxai6gh"
data-did="trdsk"
data-click-tag="%%TTD_CLK_ESC%%"
data-correlator=""
data-gdpr-applies="${GDPR}"
data-gdpr-consent="${GDPR_CONSENT_486}"
>
<script
type="module"
src="https://d36sok35gyahmq.cloudfront.net/adsbymadington.js?pid=clujk1u21002k13ko8sxai6gh"
></script>
</ins>
<ins class="mdtn-tag" style="display:inline-block;width:100vw;height:100vh;" data-pid="clujk1u21002k13ko8sxai6gh"
data-did="trdsk" data-click-tag="%%TTD_CLK_ESC%%" data-correlator="" data-gdpr-applies="${GDPR}"
data-gdpr-consent="${GDPR_CONSENT_486}">
<script type="module"
src="https://d36sok35gyahmq.cloudfront.net/adsbymadington.js?pid=clujk1u21002k13ko8sxai6gh"></script>
</ins>
</div>
<script type="module" src="/src/dev/topscroll.ts"></script>
<script type="module" src="./topscroll.ts"></script>
</body>

</html>
6 changes: 3 additions & 3 deletions src/dev/topscroll.ts → playground/topscroll.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdvantageCreativeMessenger } from "../advantage/messaging/creative-side";
import { AdvantageMessageAction, AdvantageFormatName } from "../types";
import { logger } from "../utils/logging";
import { AdvantageCreativeMessenger } from "../src/advantage/messaging/creative-side";
import { AdvantageMessageAction, AdvantageFormatName } from "../src/types";
import { logger } from "../src/utils/logging";
/*
This is an example of a topscroll creative ad implementation.
*/
Expand Down
Loading

0 comments on commit f0dbba8

Please sign in to comment.