-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
235 lines (235 loc) · 6.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter&display=swap"
rel="stylesheet"
/>
<title>base64 / utf-8</title>
</head>
<body class="bg-gray-100 text-gray-700">
<section
class="min-h-screen flex flex-col container mx-auto p-2 lg:flex-row"
>
<div
class="
relative
flex-grow flex-shrink-0 flex flex-col
rounded
border border-gray-300
overflow-hidden
"
>
<div
class="
flex
items-center
justify-between
bg-gray-200
py-1
px-2
border-b border-gray-300
"
>
<h2 class="text-sm text-gray-500">base64</h2>
<span
id="utf8Error"
class="
hidden
px-2
rounded-full
bg-red-200
border border-red-300
text-xs text-red-500
"
>Error</span
>
</div>
<textarea
tabindex="1"
id="base64Text"
autofocus
spellcheck="false"
class="flex-grow p-2 pb-12 resize-none focus:outline-none"
></textarea>
<div class="absolute bottom-2 right-2 flex space-x-2">
<button
id="base64Past"
title="Past base64"
class="
bg-gray-500
text-white
p-2
rounded-full
transition
focus:outline-none
active:bg-gray-500/90
focus:ring-gray-300/75 focus:ring
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
></path>
<rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>
</svg>
</button>
<button
id="base64Copy"
title="Copy base64"
class="
bg-primary-500
text-white
p-2
rounded-full
transition
focus:outline-none
active:bg-primary-500/90
focus:ring-gray-300/75 focus:ring
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path
d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
></path>
</svg>
</button>
</div>
</div>
<div
class="
relative
flex-grow flex-shrink-0 flex flex-col
mt-2
rounded
border border-gray-300
overflow-hidden
lg:mt-0 lg:ml-2
"
>
<div
class="
flex
items-center
justify-between
bg-gray-200
py-1
px-2
border-b border-gray-300
"
>
<h2 class="text-sm text-gray-500">utf-8</h2>
<span
id="base64Error"
class="
hidden
px-2
rounded-full
bg-red-200
border border-red-300
text-xs text-red-500
"
>Error</span
>
</div>
<textarea
tabindex="1"
id="utf8Text"
spellcheck="false"
class="flex-grow p-2 pb-12 resize-none focus:outline-none"
></textarea>
<div class="absolute bottom-2 right-2 flex space-x-2">
<button
id="utf8Past"
title="Past utf-8"
class="
bg-gray-500
text-white
p-2
rounded-full
transition
focus:outline-none
active:bg-gray-500/90
focus:ring-gray-300/75 focus:ring
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
></path>
<rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>
</svg>
</button>
<button
id="utf8Copy"
title="Copy utf-8"
class="
bg-primary-500
text-white
p-2
rounded-full
transition
focus:outline-none
active:bg-primary-500/90
focus:ring-gray-300/75 focus:ring
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path
d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
></path>
</svg>
</button>
</div>
</div>
</section>
<script type="module" src="/main.js"></script>
</body>
</html>