You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,10 +3,10 @@ import tinycolor from "tinycolor2";
3
3
import_from"lodash";
4
4
5
5
import{
6
+
JBX,
6
7
HeaderH1,
7
8
Text,
8
9
Space,
9
-
Box,
10
10
A,
11
11
Container,
12
12
Dropzone,
@@ -132,185 +132,180 @@ function App() {
132
132
133
133
return(
134
134
<Container>
135
-
<Boxpadding={2}>
136
-
<Spaceh={1}/>
137
-
138
-
<HeaderH1
139
-
style={{
140
-
fontWeight: 900,
141
-
display: "inline-block",
142
-
width: "auto",
143
-
padding: "6px",
144
-
backgroundColor: "var(--accent-color)",
145
-
}}>
146
-
img2css
147
-
</HeaderH1>
148
-
149
-
<Spaceh={1}/>
150
-
<Text>
151
-
This is a tool that can convert any image into a pure css image.
152
-
</Text>
153
-
<Spaceh={2}/>
154
-
155
-
<Dropzone
156
-
onDrop={onFileSelected}
157
-
onDragOver={onDragOver}
158
-
onDragEnter={onDragOver}>
159
-
{loadingImage ? (
160
-
<Text>Processing...</Text>
161
-
) : (
162
-
<div>
163
-
<Text>Drop an image here</Text>
164
-
<Text>or click to select</Text>
165
-
</div>
166
-
)}
167
-
<input
168
-
type="file"
169
-
onChange={onFileSelected}
170
-
multiple
171
-
accept="image/*"
172
-
aria-label="Drop an image here, or click to select"
173
-
/>
174
-
</Dropzone>
175
-
176
-
<Spaceh={2}/>
177
-
<Text>
178
-
I also made a per-pixel animation experiment, see{" "}
179
-
<Ahref="https://javier.xyz/morphin/">morphin</A>.
180
-
</Text>
181
-
182
-
{rgbMatrix&&(
183
-
<Fragment>
184
-
<Spaceh={2}/>
185
-
<Tabs>
186
-
<Inline>
187
-
<Tab
188
-
active={outputType==="SHADOW"}
189
-
key={"SHADOW"}
190
-
onClick={()=>{
191
-
outputTypeSet("SHADOW");
192
-
}}>
193
-
<Text>{"Pure CSS"}</Text>
194
-
</Tab>
195
-
<Tab
196
-
active={outputType==="BASE64"}
197
-
key={"BASE64"}
198
-
onClick={()=>{
199
-
outputTypeSet("BASE64");
200
-
}}>
201
-
<Text>{"Base64"}</Text>
202
-
</Tab>
203
-
</Inline>
204
-
</Tabs>
205
-
<Spaceh={1}/>
206
-
207
-
{outputType==="BASE64"&&(
208
-
<Fragment>
209
-
<Text>
210
-
<strong>The result (base64).</strong>{" "}
211
-
{
212
-
"This is your image tag a base64 output. The entire image file is embedded inside the `<img>` tag using base64, so no need external hosting is needed."
Original size: {Number(originalSize).toLocaleString()}b
277
-
</Text>
278
-
</Fragment>
279
-
)}
280
-
</Fragment>
135
+
<JBXaccent={"#f1c40f"}/>
136
+
<Spaceh={1}/>
137
+
138
+
<HeaderH1
139
+
style={{
140
+
fontWeight: 900,
141
+
display: "inline-block",
142
+
width: "auto",
143
+
padding: "6px",
144
+
backgroundColor: "var(--accent-color)",
145
+
}}>
146
+
img2css
147
+
</HeaderH1>
148
+
149
+
<Spaceh={1}/>
150
+
<Text>
151
+
This is a tool that can convert any image into a pure css image.
152
+
</Text>
153
+
<Spaceh={2}/>
154
+
155
+
<Dropzone
156
+
onDrop={onFileSelected}
157
+
onDragOver={onDragOver}
158
+
onDragEnter={onDragOver}>
159
+
{loadingImage ? (
160
+
<Text>Processing...</Text>
161
+
) : (
162
+
<div>
163
+
<Text>Drop an image here</Text>
164
+
<Text>or click to select</Text>
165
+
</div>
281
166
)}
167
+
<input
168
+
type="file"
169
+
onChange={onFileSelected}
170
+
multiple
171
+
accept="image/*"
172
+
aria-label="Drop an image here, or click to select"
173
+
/>
174
+
</Dropzone>
175
+
176
+
<Spaceh={2}/>
177
+
<Text>
178
+
I also made a per-pixel animation experiment, see{" "}
179
+
<Ahref="https://javier.xyz/morphin/">morphin</A>.
180
+
</Text>
181
+
182
+
{rgbMatrix&&(
183
+
<Fragment>
184
+
<Spaceh={2}/>
185
+
<Tabs>
186
+
<Inline>
187
+
<Tab
188
+
active={outputType==="SHADOW"}
189
+
key={"SHADOW"}
190
+
onClick={()=>{
191
+
outputTypeSet("SHADOW");
192
+
}}>
193
+
<Text>{"Pure CSS"}</Text>
194
+
</Tab>
195
+
<Tab
196
+
active={outputType==="BASE64"}
197
+
key={"BASE64"}
198
+
onClick={()=>{
199
+
outputTypeSet("BASE64");
200
+
}}>
201
+
<Text>{"Base64"}</Text>
202
+
</Tab>
203
+
</Inline>
204
+
</Tabs>
205
+
<Spaceh={1}/>
206
+
207
+
{outputType==="BASE64"&&(
208
+
<Fragment>
209
+
<Text>
210
+
<strong>The result (base64).</strong>{" "}
211
+
{
212
+
"This is your image tag a base64 output. The entire image file is embedded inside the `<img>` tag using base64, so no need external hosting is needed."
0 commit comments