forked from alexleybourne/chrome-extension-icon-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
216 lines (211 loc) · 8.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
<script src="jszip.min.js"></script>
<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 rel="manifest" href="favicon/site.webmanifest" />
<!-- Basic SEO meta tags -->
<meta
name="description"
content="A Chrome Extension Icon Generator for generating all the required icon sizes easily."
/>
<meta
name="keywords"
content="Chrome Extension Icon Generator, Chrome extension, icon generator, icon"
/>
<meta name="author" content="Alex Leybourne" />
<!-- Open Graph meta tags -->
<meta property="og:title" content="Chrome Extension Icon Generator" />
<meta
property="og:description"
content="A Chrome Extension Icon Generator for generating all the required icon sizes easily."
/>
<meta
property="og:image"
content="https://raw.githubusercontent.com/alexleybourne/chrome-extension-icon-creator/main/images/meta-image.jpg"
/>
<meta
property="og:url"
content="https://alexleybourne.github.io/chrome-extension-icon-creator/"
/>
<meta property="og:type" content="website" />
<!-- Twitter Card meta tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Chrome Extension Icon Generator" />
<meta
name="twitter:description"
content="A Chrome Extension Icon Generator for generating all the required icon sizes easily."
/>
<meta
name="twitter:image"
content="https://raw.githubusercontent.com/alexleybourne/chrome-extension-icon-creator/main/images/meta-image.jpg"
/>
<title>Chrome Extension Icon Generator</title>
</head>
<body>
<div class="container">
<h1>
<img src="favicon/android-chrome-192x192.png" alt="logo" />
Chrome Extension Icon Generator
</h1>
<div id="dragArea" class="drag-area">
<input type="file" id="inputImage" onchange="resizeImage()" hidden />
<label for="inputImage" class="blue-button hidden"> </label>
<h2>
<span id="uploadTitle">Upload file</span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-6 h-6"
>
<path
fill-rule="evenodd"
d="M5.625 1.5H9a3.75 3.75 0 013.75 3.75v1.875c0 1.036.84 1.875 1.875 1.875H16.5a3.75 3.75 0 013.75 3.75v7.875c0 1.035-.84 1.875-1.875 1.875H5.625a1.875 1.875 0 01-1.875-1.875V3.375c0-1.036.84-1.875 1.875-1.875zM12.75 12a.75.75 0 00-1.5 0v2.25H9a.75.75 0 000 1.5h2.25V18a.75.75 0 001.5 0v-2.25H15a.75.75 0 000-1.5h-2.25V12z"
clip-rule="evenodd"
/>
<path
d="M14.25 5.25a5.23 5.23 0 00-1.279-3.434 9.768 9.768 0 016.963 6.963A5.23 5.23 0 0016.5 7.5h-1.875a.375.375 0 01-.375-.375V5.25z"
/>
</svg>
</h2>
<p id="uploadSubtitle">click or drag and drop your file here</p>
</div>
<div id="fileInfo" class="file-info hidden">
<span id="fileName"></span>
<button id="removeFile" class="remove-file" onclick="removeFile()">
X
</button>
</div>
<div id="outputImages"></div>
<button
id="downloadAll"
class="blue-button hidden"
onclick="downloadAll()"
disabled
>
Download All
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-6 h-6"
>
<path
fill-rule="evenodd"
d="M19.5 21a3 3 0 003-3V9a3 3 0 00-3-3h-5.379a.75.75 0 01-.53-.22L11.47 3.66A2.25 2.25 0 009.879 3H4.5a3 3 0 00-3 3v12a3 3 0 003 3h15zm-6.75-10.5a.75.75 0 00-1.5 0v4.19l-1.72-1.72a.75.75 0 00-1.06 1.06l3 3a.75.75 0 001.06 0l3-3a.75.75 0 10-1.06-1.06l-1.72 1.72V10.5z"
clip-rule="evenodd"
/>
</svg>
</button>
<span id="code-snippet" class="hidden">
<p>
Copy this code into your manifest.json file. <br />
After putting the icons folder into your project.
</p>
<div class="code-snippet-container">
<pre id="codeSnippet">
"icons": {
"16": "icons/icon16.png",
"32": "icons/icon32.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
},
</pre
>
<button class="copy-btn" id="copy-button" onclick="copyToClipboard()">
Copy
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
className="w-6 h-6"
>
<path
fillRule="evenodd"
d="M7.502 6h7.128A3.375 3.375 0 0118 9.375v9.375a3 3 0 003-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 00-.673-.05A3 3 0 0015 1.5h-1.5a3 3 0 00-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6zM13.5 3A1.5 1.5 0 0012 4.5h4.5A1.5 1.5 0 0015 3h-1.5z"
clipRule="evenodd"
/>
<path
fillRule="evenodd"
d="M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 013 20.625V9.375zM6 12a.75.75 0 01.75-.75h.008a.75.75 0 01.75.75v.008a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75V12zm2.25 0a.75.75 0 01.75-.75h3.75a.75.75 0 010 1.5H9a.75.75 0 01-.75-.75zM6 15a.75.75 0 01.75-.75h.008a.75.75 0 01.75.75v.008a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75V15zm2.25 0a.75.75 0 01.75-.75h3.75a.75.75 0 010 1.5H9a.75.75 0 01-.75-.75zM6 18a.75.75 0 01.75-.75h.008a.75.75 0 01.75.75v.008a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75V18zm2.25 0a.75.75 0 01.75-.75h3.75a.75.75 0 010 1.5H9a.75.75 0 01-.75-.75z"
clipRule="evenodd"
/>
</svg>
</button>
</div>
</span>
<a
class="blue-button"
href="https://developer.chrome.com/docs/extensions/mv3/manifest/icons/"
target="_blank"
>
Extension Docs
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="w-6 h-6"
>
<path
fill-rule="evenodd"
d="M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625zM7.5 15a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 017.5 15zm.75 2.25a.75.75 0 000 1.5H12a.75.75 0 000-1.5H8.25z"
clip-rule="evenodd"
/>
<path
d="M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z"
/>
</svg>
</a>
</div>
<footer>
<p>
Created By
<a href="https://twitter.com/AlexLeybourne" target="_blank">
@Alex Leybourne
</a>
2023
</p>
<p class="github">
<a
href="https://github.com/alexleybourne/chrome-extension-icon-generator"
target="_blank"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
className="w-6 h-6"
>
<path
fillRule="evenodd"
d="M14.447 3.027a.75.75 0 01.527.92l-4.5 16.5a.75.75 0 01-1.448-.394l4.5-16.5a.75.75 0 01.921-.526zM16.72 6.22a.75.75 0 011.06 0l5.25 5.25a.75.75 0 010 1.06l-5.25 5.25a.75.75 0 11-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 010-1.06zm-9.44 0a.75.75 0 010 1.06L2.56 12l4.72 4.72a.75.75 0 11-1.06 1.06L.97 12.53a.75.75 0 010-1.06l5.25-5.25a.75.75 0 011.06 0z"
clipRule="evenodd"
/>
</svg>
Github Repo
</a>
</p>
</footer>
<script src="script.js"></script>
</body>
</html>