-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (89 loc) · 3.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fake PNG generator</title>
<meta content="Matheus Avellar" name="author">
<meta name="description" content="The fake PNG generator! Turn transparent PNGs into 'fake' PNGs!">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="alternate" hreflang="en" href="https://lab.avl.la/fakepng/index.html">
<link rel="alternate" hreflang="pt-br" href="https://lab.avl.la/fakepng/pt.html">
<link rel="alternate" hreflang="x-default" href="https://lab.avl.la/fakepng/index.html">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<header>
<nav><a href="./pt.html">Versão em português</a></nav>
<h1>Fake PNG generator!</h1>
<p>
Turn your regular, transparent PNGs into those wretched 'fake' PNGs with
that checkerboard pattern that everyone hates!
</p>
</header>
<main>
<section>
<label for="upload">Add file:</label>
<input id="upload" type="file">
</section>
<section id="results">
<h2>Before</h2>
<section id="before"></section>
<hr>
<h2>After</h2>
<section id="controls">
<label for="size-input">Square size:</label>
<input id="size-input" type="range" min="5" value="20" max="100">
<span id="size-label">20</span>px
<button id="export-btn">Download</button>
</section>
<section id="after">
<canvas id="canvas" width="300" height="200"></canvas>
</section>
</section>
<hr>
<section id="exported-wrapper">
<h2>Download</h2>
<p>
In case the download didn't initiate automatically, or it isn't working
for you, you can save the image below directly:
</p>
<ul>
<li>
If you're on a computer, right click and select "Save image as...".
</li>
<li>
If you're on a phone, tap, hold, and select "Download image".
</li>
</ul>
<section id="output-wrapper">
<img id="output">
</section>
</section>
</main>
<footer>
<p class="timestamp">
Images uploaded do not get sent anywhere;<br>
all modifications are made in your own device.<br><br>
Made with ♥︎<!--︎[Ref] stackoverflow.com/a/38452396/4824627-->
by Matheus Avellar – October 2021
</p>
</footer>
<script src="./script.js"></script>
<!-- ######### -->
<figure id="logo">
<a href="/"></a>
<link rel="stylesheet" href="/small-logo.css">
</figure>
<!--[Ref] csswizardry.com/2020/05/the-fastest-google-fonts-->
<link rel="preload" as="style"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap">
<link rel="stylesheet" media="print" onload="this.media='all'"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap">
<noscript>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap">
</noscript>
</body>
</html>