forked from brettdewoody/top-x-of-y
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
555 lines (483 loc) · 18 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
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111998862-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111998862-1', { 'anonymize_ip': true });
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Create a grid of your most-liked Instagram photos from 2019 - instantly, securely, and for free" />
<meta name="keywords" content="instagram 2019 photos collage creator instant secure online best top four 4 nine 9 sixteen 16 twentyfive 25" />
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'unsafe-inline' fonts.googleapis.com; font-src * 'self' data:; script-src 'self' www.google-analytics.com; img-src * 'self' www.google-analytics.com data:;" />
<title>Top X of Y | Create a grid of your most-liked Instagram photos - instantly, securely, and for free</title>
<meta property="og:type" content="website" />
<meta property="og:title" content="TopXofY.com | Create a grid of your most-liked Instagram photos - instantly, securely, and for free" />
<meta property="og:site_name" content="Top X of Y" />
<meta property="og:description" content="Create a grid of your most-liked Instagram photos - instantly, securely, and for free" />
<meta property="og:url" content="https://TopXofY.com" />
<link rel="icon" type="image/x-icon" href="/favicon/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link href="https://fonts.googleapis.com/css?family=Dosis:500,800&display=swap" rel="stylesheet">
<style media="screen">
body {
--primaryColor: #4ECDC4;
--primaryColorActive: #2faca3;
--primaryColorFaded: #d7ebe9;
--secondaryColor: #78828a;
--secondaryColorFaded: #bcc6ce;
--maxWidth: 800px;
--canvasWidth: 600px;
}
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, h1, h2, h5, p, a, img, ul, li, canvas, footer, header, main, section {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
padding: 0;
}
/*
/ Global
*/
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html {
font-size: 16px;
}
html, body {
padding: 0;
margin: 0;
height: 100%;
min-height: 100vh;
}
body {
font-family: -apple-system, system-ui, Arial;
font-size: 1rem;
text-align: center;
}
h1 {
font-size: calc(1rem + 1vw);
line-height: 1.2em;
margin-bottom: 1rem;
text-align: center;
padding: 0 1rem;
}
h2 {
font-size: 1.2rem;
line-height: 1.2em;
margin-bottom: 1rem;
text-align: center;
padding: 0 1rem;
}
h5 {
font-size: 1.2rem;
font-weight: 500;
margin-bottom: 0.3em;
font-family: 'Dosis', sans-serif;
text-transform: uppercase;
}
p {
font-size: calc(0.75rem + 0.5vw);
padding: 0 1rem 1.8rem 1rem;
line-height: 1.4rem;
}
a {
text-decoration: none;
color: var(--primaryColor);
}
a:hover {
text-decoration: underline;
}
.center {
text-align: center;
margin-bottom: 3rem;
margin-top: 2rem;
}
.p-close {
padding-bottom: 1rem;
}
.highlight {
color: var(--primaryColorActive);
}
code {
font-family: monospace;
padding-bottom: 1.8rem;
color: #2c2c2c;
}
/*
/ Layout
*/
header {
padding: calc(1rem + 1vw) 1rem;
font-family: 'Dosis', sans-serif;
font-weight: 800;
font-size: 26px;
display: flex;
justify-content: center;
}
.main {
width: 100%;
max-width: var(--maxWidth);
min-height: 100vh;
padding-top: calc(1rem + 1vw);
padding-bottom: 4.5rem;
margin: 0 auto;
}
footer {
width: 100%;
padding: 1rem 0;
display: flex;
flex-direction: column;
align-items: center;
font-size: 0.85rem;
background-color: var(--secondaryColor);
color: #e9e9e9;
z-index: 10;
}
footer p {
font-size: 1rem;
max-width: var(--maxWidth);
line-height: 1.2em;
padding-bottom: 1rem;
}
footer p:last-child {
padding-bottom: 0;
}
footer a:hover {
text-decoration: none;
}
.view {
display: -webkit-flex;
display: flex;
align-items: center;
-webkit-flex-direction: column;
flex-direction: column;
}
.view[hidden] {
display: none;
}
#home {
text-align: center;
}
#pics {
margin: 0 auto;
width: 100%;
max-width: var(--canvasWidth);
}
.rotateContainer {
position: relative;
height: 1em;
line-height: 1em;
overflow: hidden;
display: relative;
display: flex;
word-spacing: 0.3rem;
}
.rotateText {
padding: 0;
margin: 0 0.2em;
color: var(--primaryColorActive);
display: inline-block;
will-change: transform;
animation-name: cycle;
animation-duration: 12s;
animation-iteration-count: infinite;
}
.rotateContainer:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 0.125em;
background: linear-gradient(to bottom, rgba(255, 255, 255), rgba(255, 255, 255, 0));
z-index: 1;
}
.rotateContainer:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0.125em;
background: linear-gradient(to top, rgba(255, 255, 255), rgba(255, 255, 255, 0));
z-index: 1;
}
.rotateText > li {
line-height: 1em;
margin: 0;
}
.list {
display: flex;
flex-direction: column;
flex-wrap: wrap;
position: relative;
margin: 3rem 1rem;
padding: 3rem 0 0 0;
border-top: 1px solid var(--secondaryColorFaded);
border-bottom: 1px solid var(--secondaryColorFaded);
}
.list li {
flex: 1;
box-sizing: border-box;
text-align: center;
padding: 0 1rem;
line-height: 1.3em;
margin-bottom: 4rem;
}
/*
/ Canvas
*/
.canvas__container {
height: 0px;
margin: 2rem auto;
width: 100%;
max-width: var(--canvasWidth);
position: relative;
padding-bottom: calc(100% + 44px);
}
.canvas__tabs {
display: -webkit-flex;
padding: 0 3.5%;
display: flex;
border-bottom: 4px solid var(--primaryColor);
}
.canvas__tab {
-webkit-flex: 1;
flex: 1;
height: 40px;
line-height: 40px;
transition: all 0.1s ease-out;
background-color: var(--primaryColorFaded);
}
.canvas__tab:hover {
cursor: pointer;
background-color: var(--primaryColor);
color: #ffffff;
}
.canvas__tab.active {
background-color: var(--primaryColor);
color: #ffffff;
}
.canvas__wrapper {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding-bottom: 100%;
width: 100%;
max-width: var(--canvasWidth);
}
.canvas {
display: none;
image-rendering: auto;
}
.collage {
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 100%;
max-width: var(--canvasWidth);
pointer-events: none;
image-rendering: auto;
}
/*
/ Button
*/
.button {
display: inline-block;
padding: 10px 25px;
font-size: 1em;
color: #ffffff;
text-decoration: none;
margin: 0;
background-color: var(--primaryColor);
border-radius: 4px;
transition: background-color 0.1s ease-out;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background-color 0.1s ease-in-out;
}
.button.icon {
background-size: 22px;
background-repeat: no-repeat;
background-position: calc(100% - 25px) center;
padding-right: 55px;
}
.button.icon--instagram {
background-image: url("data:image/svg+xml,%3Csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='29pt' height='29pt' viewBox='0 0 504.000000 504.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(0.000000,504.000000) scale(0.100000,-0.100000)' fill='%23ffffff' stroke='none'%3E%3Cpath d='M1550 5034 c-540 -27 -861 -144 -1130 -414 -236 -235 -358 -522 -402 -940 -19 -179 -19 -2141 0 -2320 44 -418 166 -705 402 -940 235 -236 522 -358 940 -402 179 -19 2141 -19 2320 0 418 44 705 166 940 402 236 235 358 522 402 940 19 179 19 2141 0 2320 -44 418 -166 705 -402 940 -230 231 -513 354 -920 401 -74 8 -396 13 -1095 14 -544 1 -1019 0 -1055 -1z m2070 -473 c128 -13 245 -36 325 -63 317 -105 518 -339 589 -688 37 -183 41 -309 41 -1290 0 -981 -4 -1107 -41 -1290 -81 -396 -328 -643 -724 -724 -183 -37 -309 -41 -1290 -41 -981 0 -1107 4 -1290 41 -399 82 -646 330 -724 729 -33 166 -38 296 -43 1100 -5 796 3 1203 27 1380 68 491 346 768 840 835 47 7 162 15 255 20 250 12 1907 4 2035 -9z'/%3E%3Cpath d='M3750 4153 c-63 -23 -151 -113 -173 -177 -9 -27 -17 -77 -17 -111 0 -92 24 -151 89 -216 65 -65 124 -89 216 -89 92 0 151 24 216 89 66 66 89 124 89 220 0 169 -135 302 -305 300 -38 0 -90 -8 -115 -16z'/%3E%3Cpath d='M2355 3809 c-305 -41 -562 -173 -775 -395 -239 -249 -354 -540 -354 -894 0 -358 116 -648 362 -902 255 -264 560 -392 932 -392 372 0 677 128 932 392 246 254 362 544 362 902 0 358 -116 648 -362 902 -191 198 -419 322 -685 373 -101 20 -317 27 -412 14z m400 -489 c276 -88 479 -293 567 -570 20 -65 23 -95 23 -230 0 -135 -3 -165 -23 -230 -88 -279 -293 -484 -572 -572 -65 -20 -95 -23 -230 -23 -135 0 -165 3 -230 23 -279 88 -484 293 -572 572 -20 65 -23 95 -23 230 0 135 3 165 23 230 96 303 338 526 643 590 24 5 107 8 184 6 111 -3 155 -8 210 -26z'/%3E%3C/g%3E%3C/svg%3E");
}
.button:hover, .button:active {
background-color: var(--primaryColorActive);
text-decoration: none;
}
.loader-stage {
position: relative;
top: 100px;
perspective: 100px;
transform-style: preserve-3d;
display: flex;
justify-content: center;
}
.loader {
width: 50px;
height: 50px;
background-color: var(--primaryColor);
border: 1px solid var(--primaryColorActive);
position: relative;
backface-visibility: visible;
animation-name: loading;
animation-duration: 1.4s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes loading {
0% {transform: rotateY(0deg) rotateX(0deg);}
55% {transform: rotateY(180deg) rotateX(0deg);}
100% {transform: rotateY(180deg) rotateX(180deg);}
}
@keyframes cycle {
0%, 12.66%, 100% {transform:translate3d(0,0,0);}
16.66%, 29.32% {transform:translate3d(0,-100%,0);}
33.32%,45.98% {transform:translate3d(0,-200%,0);}
49.98%,62.64% {transform:translate3d(0,-300%,0);}
66.64%,79.3% {transform:translate3d(0,-200%,0);}
83.3%,95.96% {transform:translate3d(0,-100%,0);}
}
@media screen and (min-width: 600px) {
.list {
flex-direction: row;
flex-wrap: wrap;
}
.list > li {
width: 50%;
flex: none;
}
}
@media screen and (min-width: 600px) {
header {
font-size: 35px;
}
}
@media screen and (min-width: 800px) {
header {
font-size: 50px;
}
.button {
font-size: 1.8rem;
}
.button.icon {
background-size: 29px;
padding-right: 65px;
background-position: calc(100% - 25px) center;
}
#home {
text-align: left;
}
.list {
margin: 5rem 0;
flex-wrap: nowrap;
}
.list > li {
min-width: 0;
flex: 1;
margin-bottom: 3.5rem;
}
}
</style>
</head>
<body id="body">
<header>
<div class="rotateContainer"><span>YOUR TOP</span><ul class="rotateText"><li>4</li><li>9</li><li>16</li><li>25</li></ul><span>of <span class="highlight">2019</span></span></div>
</header>
<main class="main">
<section id="home" class="view" hidden>
<h1>The easy, fast, private, and secure way to create a grid of your most popular Instagram photos from 2019</h1>
<div class="center">
<p class="p-close">Create your grid in seconds by logging in</p class="no-margin">
<a class="button icon icon--instagram js-login" href="#">
Login with Instagram
</a>
</div>
<ul class="list">
<li><h5>Easy</h5>No app required, it only takes a few clicks</li>
<li><h5>Fast</h5>Your grid is available in seconds</li>
<li><h5>Private</h5>Personal info is never saved or shared</li>
<li><h5>Secure</h5>Uses HTTPS to encrypt data</li>
</ul>
<div class="center">
<a class="button icon icon--instagram js-login" href="#">
Login with Instagram
</a>
</div>
</section>
<section id="loading" class="view" hidden>
<div id="js-message">Retrieving your photos...</div>
<div class="loader-stage" role="progressbar" aria-busy="true">
<div class="loader"></div>
</div>
</section>
<section id="pics" class="view" hidden>
<h1>Your grid is ready!</h1>
<p>Click the tabs to select between your top 4, 9, 16, or 25 photos</p>
<p><strong>You are now logged in to Instagram.</strong> If this is a public computer you should definitely <a href="https://www.instagram.com/accounts/logout/" target="_blank">logout of Instagram</a>.</p>
<a class="button js-download" href="#">Download Your Grid</a>
<div class="canvas__container">
<ul class="canvas__tabs js-tabs">
<li class="canvas__tab js-tab" id="js-tab--4" data-pics="4">4</li>
<li class="canvas__tab js-tab" id="js-tab--9" data-pics="9">9</li>
<li class="canvas__tab js-tab" id="js-tab--16" data-pics="16">16</li>
<li class="canvas__tab js-tab" id="js-tab--25" data-pics="25">25</li>
</ul>
<a class="canvas__wrapper js-download" href="#">
<img id="js-collage" class="collage" src="">
</a>
</div>
<a class="button js-download" href="#">Download Your Grid</a>
</section>
<section id="error" class="view" hidden>
<p>This is embarrassing, we've encountered an error:</p>
<code id="js-error"></code>
<p>You can help us out by submitting an issue <a href="https://github.com/brettdewoody/top-x-of-y/issues">on our Github page </a> or creating a Pull Request to address it.</p>
<p><a href="/">Return to the homepage</a></p>
</section>
</main>
<footer>
<p>This site uses the Instagram API but is not affiliated with Instagram. All Instagram™ logos and trademarks displayed on this site are the property of Instagram.</p>
<h3>Privacy Policy</h3>
<p>We take privacy extremely seriously. This is our policy as of Dec 31, 2019.</p>
<p>To create your photo collage we request the most basic permissions allowed by Instagram - granting us permission to retrieve your Instagram profile info and media. With this basic permission we <strong>cannot</strong> post any photos, videos, stories, or other media, or perform any actions on your behalf (e.g. we cannot follow accounts, 'like' photos, or comment).</p>
<p>After creating your collage you may revoke this site's access immediately through your <a href="https://www.instagram.com/accounts/manage_access/?hl=en">Instagram Account page</a>. Revoking access ensures we cannot continue to access your profile info or media, which we do not do regardless.</p>
<p>We do not collect, store, or share any of your personal Instagram information, or your photo collage. We merely request and display your Instagram photos in a collage to you and only you.</p>
<p>Your collage can be created only by you, and shared only by you. Other users cannot create a collage of your most-liked photos on this site.</p>
<p>The full source code of this site is available on <a href="https://github.com/brettdewoody/top-x-of-y">Github</a> and licensed under the <a href="https://github.com/brettdewoody/top-x-of-y/blob/master/LICENSE.md">Mozilla Public License 2.0</a>.</p>
</footer>
<canvas id="js-canvas--4" class="canvas js-canvas" moz-opaque></canvas>
<canvas id="js-canvas--9" class="canvas js-canvas" moz-opaque></canvas>
<canvas id="js-canvas--16" class="canvas js-canvas" moz-opaque></canvas>
<canvas id="js-canvas--25" class="canvas js-canvas" moz-opaque></canvas>
<script type="text/javascript" src="app.js" async></script>
</body>
</html>