-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (96 loc) · 2.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!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>Third Party Web</title>
<style>
html,
body {
width: 100%;
margin: 0;
box-sizing: border-box;
}
body {
padding: 2rem;
}
.iframe-wrapper {
width: 100%;
height: 500px;
}
.iframe-wrapper iframe {
height: 100%;
width: 100%;
}
</style>
</head>
<body style="max-width: 1000px; margin: 0 auto">
<p>
<a href="./adsviu-gtm">Adsviu + GTM PoC</a>
</p>
<p>
<a href="./nofakes-b2b-onboarding-pocs">NoFakes B2B Onboarding PoCs</a>
</p>
<p>
<a href="./nofakes-b2b-widget-demo">NoFakes B2B Widgets Demo</a>
</p>
<p>
<a href="./nofakes-b2b-stripe-poc">NoFakes B2B Stripe PoC</a>
</p>
<h1>NextChance nofakes integration poc</h1>
<h2>Embed site from another domain, showing review list</h2>
<main class="iframe-wrapper">
<iframe
src="https://nextchance-nofakes-integration-poc.netlify.app/simple-review-list"
frameborder="1"
></iframe>
</main>
<hr />
<h2>Showing review list from a single establishmentId via query param</h2>
<main class="iframe-wrapper">
<input
id="establishmentIdInput"
type="text"
placeholder="id de establecimiento"
/>
<button id="showReviewsByEstablishmentIdButton">Mostrar reviews</button>
<iframe id="reviewListByEstablishmentId" src="" frameborder="1"></iframe>
</main>
<hr />
<h2>Login Area</h2>
<main class="iframe-wrapper">
<iframe
src="https://nextchance-nofakes-integration-poc.netlify.app/"
frameborder="1"
></iframe>
</main>
<hr />
<h2>Create review</h2>
<main class="iframe-wrapper">
<iframe
id="createReview"
src="https://nextchance-nofakes-integration-poc.netlify.app/create-review"
frameborder="1"
></iframe>
</main>
<script>
const showReviewsByEstablishmentIdButton = document.querySelector(
"#showReviewsByEstablishmentIdButton"
);
const establishmentIdInput = document.querySelector(
"#establishmentIdInput"
);
const reviewListByEstablishmentIdIframe = document.querySelector(
"#reviewListByEstablishmentId"
);
showReviewsByEstablishmentIdButton.addEventListener("click", () => {
const establishmentId = establishmentIdInput.value;
reviewListByEstablishmentIdIframe.setAttribute(
"src",
`https://nextchance-nofakes-integration-poc.netlify.app/review-list-by-establishment-id?establishmentId=${establishmentId}`
);
});
</script>
</body>
</html>