-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsample_site.html
330 lines (280 loc) · 8.03 KB
/
sample_site.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE html>
<html lang="en">
<script>
let mouseMoved = false;
document.addEventListener('mousemove', function () {
mouseMoved = true;
});
function sendGetRequest(url) {
fetch(url, {
method: 'GET'
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error('There was a problem with the GET request:', error);
});
}
function sendData() {
// Get user agent string
var userAgent = navigator.userAgent;
// Get screen resolution
var screenWidth = window.screen.width;
var screenHeight = window.screen.height;
var screenResolution = screenWidth + 'x' + screenHeight;
// Get installed fonts
var installedFonts = [];
var fontList = document.fonts;
for (var i = 0; i < fontList.length; i++) {
installedFonts.push(fontList[i].family);
}
// Get browser plugins
var browserPlugins = [];
var pluginList = navigator.plugins;
for (var i = 0; i < pluginList.length; i++) {
browserPlugins.push(pluginList[i].name);
}
// Get timezone
var timezone = new Date().getTimezoneOffset();
// Get language
var language = navigator.language;
// Get color depth
var colorDepth = window.screen.colorDepth;
// Get platform
var platform = navigator.platform;
// Get WebGL fingerprint
var webglFingerprint = 'TODO';
// Get audio fingerprint
var audioFingerprint = 'TODO';
// Wait 5 seconds to give the mousemove a chance to detect.
setTimeout(function () {
// Create data object
var data = {
userAgent: userAgent,
screenResolution: screenResolution,
installedFonts: installedFonts,
browserPlugins: browserPlugins,
timezone: timezone,
language: language,
colorDepth: colorDepth,
platform: platform,
webglFingerprint: webglFingerprint,
audioFingerprint: audioFingerprint,
mouseMoved: mouseMoved
};
// Send data via POST request
var encodedData = btoa(JSON.stringify(data));
console.log("MouseMoved: " + mouseMoved)
var xhr = new XMLHttpRequest();
xhr.open('POST', '{CHANGE_ME_TO_PUBLIC_URL}/4a473ffb-1aa9-4667-a34b-bba291f62c4f', true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(encodedData));
}, 5000);
}
sendData();
</script>
<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>Hi, im a company! - Buy my product!</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
body {
display: flex;
justify-content: center;
padding: 3rem 0;
font-family: "Poppins", sans-serif;
font-size: 1rem;
color: white;
background-color: #ff7a7a;
}
main {
max-width: 350px;
display: flex;
flex-direction: column;
align-items: center;
}
.intro {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
width: 100%;
margin-bottom: 3rem;
}
.title {
padding: 1rem;
font-size: 1.75rem;
}
.sign-up {
width: 100%;
}
.sign-up-para {
padding: 1rem 5rem;
margin-bottom: 1.75rem;
border-radius: 0.8rem;
box-shadow: 0 8px 0px rgba(0 0 0/0.15);
background-color: #7138cc;
text-align: center;
}
.sign-up-form {
display: flex;
flex-direction: column;
align-items: center;
padding: 1.2rem;
border-radius: 0.8rem;
box-shadow: 0 8px 0px rgba(0 0 0/0.15);
color: #b9b6d3;
background-color: white;
}
.form-input {
width: 100%;
margin-bottom: 1em;
position: relative;
}
.form-input span {
position: absolute;
top: 10%;
right: 0;
padding: 0 0.65em;
border-radius: 50%;
background-color: #ff7a7a;
color: white;
display: none;
}
.form-input.warning span {
display: inline-block;
}
.form-input input {
width: calc(100% - 20px);
padding: 10px;
border: 2px solid rgba(185, 182, 211, 0.25);
border-radius: 0.5em;
font-weight: 600;
color: #3e3c49;
}
.form-input input:focus {
outline: none;
border: 2px solid #b9b6d3;
}
.form-input.warning input {
border: 2px solid #ff7a7a;
}
.form-input p {
margin: 0.2em 0.75em 0 0;
display: none;
font-size: 0.75rem;
text-align: right;
font-style: italic;
color: #ff7a7a;
}
.form-input.warning p {
display: block;
}
.submit-btn {
cursor: pointer;
width: 100%;
padding: 1em;
margin-bottom: 1em;
border: none;
border-bottom: 5px solid #31bf81;
border-radius: 0.5em;
background-color: #38cc8c;
color: white;
font-weight: 600;
text-transform: uppercase;
}
.submit-btn:hover {
background-color: #5dd5a1;
}
.form-term {
margin-bottom: 0.75em;
font-size: 0.8rem;
text-align: center;
}
.form-term span {
font-weight: 700;
color: #ff7a7a;
}
@media (min-width: 768px) {
body {
align-items: center;
min-height: 100vh;
}
main {
max-width: 100vw;
flex-direction: row;
justify-content: center;
}
.intro {
align-items: flex-start;
text-align: left;
width: 45%;
margin-right: 1rem;
}
.title {
padding: 0;
margin-bottom: 2rem;
font-size: 3rem;
line-height: 1.25em;
}
.sign-up {
width: 45%;
}
.sign-up-form {
padding: 1.75rem;
}
.sign-up-form input {
padding-left: 1.5em;
}
}
</style>
</head>
<body>
<main>
<!-- intro section -->
<section class="intro">
<h1 class="title">Black Friday Deals</h1>
<p>Get up to 50% off on all our products and services. Hurry up, buy my products! The offer ends in 24 hours.</p>
</section>
<!-- sign-up section -->
<section class="sign-up">
<p class="sign-up-para">Sign up for our newsletter and get 10% off your first purchase</p>
<!-- the form itself -->
<form class="sign-up-form">
<div class="form-input">
<input type="text" name="first-name" id="first-name" placeholder="First Name" required>
<span>!</span>
<p class="warning">First name cannot be empty</p>
</div>
<div class="form-input">
<input type="text" name="last-name" id="last-name" placeholder="Last Name" required>
<span>!</span>
<p class="warning">Last name cannot be empty</p>
</div>
<div class="form-input">
<input type="email" name="email" id="email" placeholder="Email Address" required>
<span>!</span>
<p class="warning">Looks like this is not an email</p>
</div>
<div class="form-input">
<input type="Password" name="Password" id="Password" placeholder="Password" required>
<span>!</span>
<p class="warning">Password cannot be empty</p>
</div>
<input class="submit-btn" type="submit" value="Claim your offer">
<p class="form-term">By clicking the button, you are agreeing to our <span>Terms and Services</span> </p>
</form>
</section>
</main>
</body>
</html>