-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
280 lines (268 loc) · 16.9 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
<!DOCTYPE html>
<html lang="en" class="h-full text-gray-900 bg-gray-100 dark:text-white dark:bg-gray-900">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png" />
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#4ade80" />
<link rel="manifest" href="site.webmanifest" />
<meta name="theme-color" content="#4ade80" />
<title>snake_label</title>
<meta name="description" content="Schneidet Paketmarken auf dem lokalen Gerät auf passende Größe im 62mm-Format!" />
<link rel="stylesheet" href="src/css/app.css" />
<script type="module" src="src/js/crop.js" defer></script>
</head>
<body class="h-full">
<div class="min-h-full">
<div class="bg-green-400 pb-32">
<header class="py-4 mb-4">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div
class="flex h-20 justify-between items-center text-end border-b-8 border-double border-green-600 border-opacity-80">
<a href="#" aria-label="Home">
<img src="img/snake_label.svg" aria-label="snake_label Logo"
class="h-24 w-auto mt-4 pr-6 bg-green-400" />
</a>
<div class="p-2 lg:ml-6">
<!-- <a href="https://github.com/typingbeaver/snake-label/tree/dist"
class="py-1 px-2 bg-gray-900 text-sm font-medium text-white md:text-base hover:text-amber-400 focus:outline-none focus:ring-2 focus:ring-amber-400">
<span aria-hidden><</span>
<span class="underline underline-offset-2 decoration-amber-400 decoration-[1.5px]">
Get your offline version on GitHub</span>
<span aria-hidden>></span>
</a> -->
</div>
</div>
</div>
</header>
</div>
<main class="-mt-32 h-full">
<!-- Label Input -->
<div class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8">
<div class="bg-white text-gray-900 px-5 py-6 shadow sm:px-6">
<div class="grid lg:grid-cols-2 gap-8">
<!-- Label Selection -->
<div class="space-y-2">
<div class="flex items-center gap-2">
<label for="label-type" class="flex-shrink-0 font-medium px-2">
Paketlabel <span aria-hidden>:::</span>
</label>
<select id="label-type"
class="w-full border-gray-900 py-2 pl-3 pr-10 focus:border-green-600 focus:outline-none focus:ring-green-600 focus:ring-2">
<optgroup label="dhl">
<option value="dhl-privat">
dhl_privat | 62x145mm
</option>
<option value="dhl-privat-international">
dhl_privat_international_eu | 62x195mm
</option>
<option value="dhl-privat-international-native">
dhl_privat_international_eu_native | 62x165mm
</option>
<option value="dhl-retoure">
dhl_retoure | 62x145mm
</option>
<option value="dhl-return-connect">
dhl_return_connect | 62x160mm
</option>
</optgroup>
<optgroup label="deutsche_post">
<option value="dp-briefmarke">
briefmarke | 62x40mm
</option>
<option value="dp-briefmarke-short">
briefmarke_short | 62x30mm
</option>
<option value="dp-briefmarke-adresse">
briefmarke_adresse | 62x80mm
</option>
</optgroup>
<optgroup label="hermes">
<option value="hermes-privat-v102">
hermes_privat [v1.0.2] | 62x150mm
</option>
</optgroup>
<optgroup label="seller_returns">
<option value="adidas">
adidas_retoure [dhl] | 62x120mm
</option>
<option value="amazon-dhl">
amazon_retoure [dhl] [gif] | 62x120mm
</option>
<option value="bestsecret-retoure-dhl">
bestsecret_retoure [dhl] | 62x150mm
</option>
<option value="hm-retoure-dhl">
hm_retoure [dhl] | 62x150mm
</option>
<option value="mediamarkt-saturn">
mediamarkt_saturn_retoure [dhl] | 62x145mm
</option>
<option value="nike-dhl">
nike_retoure [dhl] | 62x160mm
</option>
</optgroup>
<optgroup label="dpd">
<option value="dpd-packlink">
dpd_packlink | 62x180mm
</option>
<option value="dpd-return">
dpd_return | 62x180mm
</option>
</optgroup>
<optgroup label="gls">
<option value="gls-return">
gls_return | 62x145mm
</option>
</optgroup>
<optgroup label="dhl_netherlands">
<option value="dhl-nl-4-4">
dhl_nl_4_4 [mdp v5.7] | 62x110mm
</option>
<option value="dhl-nl-4-5">
dhl_nl_4_5 [mdp v5.7] | 62x110mm
</option>
<option value="dhl-nl-5-4">
dhl_nl_5_4 [mdp v5.7] | 62x110mm
</option>
<option value="dhl-nl-5-5">
dhl_nl_5_5 [mdp v5.7] | 62x110mm
</option>
</optgroup>
</select>
</div>
<!-- Label Options - In the future... -->
<!-- Label Details - In the future... -->
</div>
<!-- File Input -->
<div>
<div class="w-full border border-gray-900 p-4">
<div class="flex justify-between gap-4 text-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor"
class="my-auto h-12 w-12 text-green-400" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
</svg>
<div class="w-full">
<div class="text-gray-900">
<label for="file-input" class="cursor-pointer hover:text-green-500">
<!-- Select file -->
<input id="file-input" type="file" accept="application/pdf,image/gif"
class="w-full file:px-2 file:bg-green-400 file:text-gray-900 file:border-0 file:font-sans focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2" />
</label>
<!-- <div class="pl-1">or drag and drop</div> -->
</div>
<p class="mt-2 text-xs text-gray-900">PDF, GIF</p>
</div>
</div>
</div>
<!-- Crop Button -->
<div class="w-full text-end">
<button id="convertLabel"
class="mt-8 bg-green-400 px-4 py-2 text-sm text-gray-900 font-bold shadow-sm focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2">
Convert to snake_label
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Label Output -->
<div id="view" class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8 invisible">
<!-- Label Preview -->
<div class="border-8 border-green-400 md:p-2 md:border-[12px]">
<div class="max-w-max mx-auto bg-white px-6 py-2">
<img id="labelImg" aria-label="Label-Vorschau" />
</div>
</div>
<!-- Download Buttons -->
<div id="buttons" class="flex justify-center gap-4 mt-8">
<button id="downloadLabel"
class="bg-green-400 px-4 py-2 text-sm font-medium text-gray-900 shadow-sm hover:font-bold focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2">
Save as PDF
</button>
<button id="downloadLabelIMG"
class="bg-amber-400 px-4 py-2 text-sm font-medium text-gray-900 shadow-sm hover:font-bold focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2">
Save as PNG Image
</button>
<button id="downloadPageIMG" hidden
class="border-amber-400 border-4 text-amber-400 px-4 py-2 text-sm font-medium shadow-sm hover:font-bold focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2">
Save uncropped PNG Image
</button>
</div>
</div>
</main>
<footer class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div
class="py-6 border-t-4 border-double border-gray-900 dark:border-white md:flex md:items-center md:justify-between">
<!-- Links -->
<div class="flex justify-center space-x-6 md:order-2">
<a href="https://github.com/typingbeaver/snake-label"
class="rounded-full text-green-400 hover:text-amber-400 focus:outline-none focus:ring-2 focus:ring-amber-400">
<span class="sr-only">GitHub</span>
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd"
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
clip-rule="evenodd" />
</svg>
</a>
</div>
<!-- Copyright Note -->
<div class="mt-8 md:order-1 md:mt-0">
<p class="text-center text-base text-grey-900">
© 2022
<a href="https://github.com/typingbeaver" class="link">typingbeaver</a>
and
<a href="https://github.com/cheetahdotcat" class="link">catSIXe</a>. Licensed under
<a href="https://www.gnu.org/licenses/gpl-3.0.html" class="link">GPL-3.0</a>.
</p>
</div>
</div>
<!-- Privacy information -->
<details class="py-4 open:font-medium">
<summary
class="mb-2 w-fit cursor-pointer list-none underline underline-offset-2 decoration-green-400 decoration-2 hover:font-green-400 hover:font-medium focus:outline-none focus:decoration-amber-400">
Datenschutz <span aria-hidden>:::</span> Privacy information
</summary>
<div class="font-normal text-justify break-words">
<p>
snake_label arbeitet vollständig lokal auf Ihrem eigenen Gerät.
snake_label speichert oder verarbeitet daher keine
personenbezogenen Daten.
</p>
<p>
Für Verlinkungen auf externe Webseiten wird keine Haftung
übernommen.
</p>
<br />
<p>
<em>Hinweis zu snake-label.de:</em><br />
Die Online-Version snake-label.de wird zur Bereitstellung der
benötigten Softwarebibliotheken angeboten von Servern der GitHub
B.V., Prins Bernhardplein 200, 1097 JB Amsterdam, NL. Es findet
die Speicherung und Verarbeitung folgender personenbezogener Daten
statt:
</p>
<ul class="list-disc list-inside">
<li>
<a href="https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#data-collection"
class="link">
IP-Adresse (zu Sicherheitszwecken)
</a>
</li>
</ul>
<p>
Vollständige Datenschutzerklärung von GitHub
<a href="https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
class="link">
siehe hier [Englisch]</a>.
</p>
</div>
</details>
</footer>
</div>
</body>
</html>