-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
209 lines (181 loc) · 6.29 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>OneSignal Store Demo</title>
<script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script>
<script>
window.OneSignalDeferred = window.OneSignalDeferred || [];
OneSignalDeferred.push(async function(OneSignal) {
await OneSignal.init({
appId: "3beb3078-e0f1-4629-af17-fde833b9f716",
});
});
OneSignalDeferred.push(function() {
OneSignal.User.addEventListener('change', function (event) {
console.log('change', { event });
});
});
OneSignalDeferred.push(function() {
OneSignal.Slidedown.addEventListener('slidedownShown', function (event) {
console.log('slidedownShown', { event });
});
});
</script>
<!-- Migration Testing
Comment OneSignalMethods.js
Uncommnet Notix code, subscribe
Comment Notix code, uncomment OneSignal code
Return to site, you should be transferred to OneSignal
-->
<!-- OneSignal Init
<script src="OneSignalMethods.js"></script>-->
<!-- NOTIX Code (for migration testing)
<script id="script">
var s = document.createElement("script")
s.src = "https://notix.io/ent/current/enot.min.js"
s.onload = function (sdk) {
sdk.startInstall(
{
"appId": "1005e25bd64c3e45b77459a994ade15",
"loadSettings": true
}
)
}
document.head.append(s)
</script>
-->
<!-- font awesome-->
<script src="https://kit.fontawesome.com/b198ccf02e.js" crossorigin="anonymous"></script>
<link rel="manifest" href="manifest.json"/>
<!-- custom css -->
<link rel="stylesheet" href="styles.css" />
<!-- Google SignIn-->
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id"
content="388536902528-eh74tcn8rd9beutdv6gs775n2aq71gd1.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<div class="grid-container">
<header class="header">
<div class="left-menu">
<button onclick="openLeftMenu()">
<span class="nav-icon">
<i class="fas fa-bars"></i>
</span>
</button>
</div>
<div class="brand">
<a href="/">OneSignal Store Demo</a>
</div>
<div class="cart-btn">
<span class="nav-icon">
<i class="fas fa-cart-plus"></i>
</span>
<div class="cart-items">0</div>
</div>
</header>
<!--left overlay -->
<aside class="left-overlay">
<button class="left-overlay-close-button" onclick="closeLeftMenu()">
<i class="fas fa-window-close"></i>
</button>
<h3 style="margin-top: 30px; padding-left: 100px; padding-top: 30px; padding-bottom: 10px;">Quick Examples</h3>
<hr>
<div class="left-overlay-content">
<h4>SignIn & SetExternalUserId</h4>
<div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
<h4>SignOut & RemoveExternalUserId</h4>
<button id="logOutRemoveExternalUserId" style="background-color: red; color:white;"
onclick="onSignOut()">SignOut &
RemoveExternalUserId</button>
<h4>Show Category Slidedown Prompt</h4>
<button id="showCategorySlidePrompt">Show Category Slidedown Prompt</button>
<h4>Show SMS & Email Slidedown Prompt</h4>
<button id="showSmsAndEmailSlidedown">Show SMS & Email Slidedown Prompt</button>
<h4>Get Email Updates</h4>
<form style="padding: 10px;">
<label>Email Address: </label>
<input type="email" id="email_field" value="[email protected]" />
</form>
<button id="updateEmailWithFieldsButton">Subscribe to Email</button>
<h4>Tag Example</h4>
<form style="padding: 10px;">
<label>Tag key:</label>
<input type="text" id="tagKey" value="tag_key_here" />
<br>
<label>Tag value:</label>
<input type="text" id="tagValue" value="tag_value_here" />
</form>
<button id="tagUserWithFieldsButton">Tag User With Field Values</button>
<h4>Update Name In Mixpanel, Segment.com, Amplitude</h4>
<form style="padding: 10px;">
<label>$first_name: </label>
<input type="text" id="$first_name" value="Billy" />
<br>
<label>$last_name: </label>
<input type="text" id="$last_name" value="Bob" />
</form>
<button id="updateNameInAnalytics">Update Name In Analytics</button>
</div>
</aside>
<!-- end left overlay -->
<!-- hero -->
<main class="hero">
<div class="banner">
<h1 class="banner-title">Sunglasses Collection</h1>
<button class="banner-btn">
<a href="#our-products">Shop Now</a>
</button>
<button class="banner-btn-green">
<a href="blog">Blog Coming Soon</a>
</button>
</div>
</main>
<!-- end hero -->
<!-- products -->
<section class="products-section">
<div class="section-title">
<h2 id="our-products">our products</h2>
</div>
<div class="products-center"></div>
</section>
<!-- end products -->
<!-- cart -->
<div class="cart-overlay">
<div class="cart">
<span class="close-cart">
<i class="fas fa-window-close"></i>
</span>
<h2>your cart</h2>
<div class="cart-content">
<!-- cart item added dynamically in app.js-->
</div>
<div class="cart-footer">
<h3>your total : $ <span class="cart-total">0</span></h3>
<button class="clear-cart banner-btn">clear cart</button>
<a href="checkout" class="checkout-btn">Checkout</a>
</div>
</div>
</div>
<!-- end cart -->
<footer class="footer">
<div class="footer-links">
<a href="https://onesignal.com">Get started at OneSignal.com</a>
</div>
</footer>
</div>
<script>
function openLeftMenu() {
document.querySelector(".left-overlay").classList.add("open");
}
function closeLeftMenu() {
document.querySelector(".left-overlay").classList.remove("open");
}
</script>
<script src="app.js"></script>
</body>
</html>