Skip to content

Commit 75b8c3d

Browse files
authored
Merge pull request #89 from jvalen/feat/add-new-routes
Feat/add new routes
2 parents de2bd76 + 58a7ac2 commit 75b8c3d

File tree

16 files changed

+1514
-284
lines changed

16 files changed

+1514
-284
lines changed

.eslintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"no-console": 0,
3131
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
3232
"react/jsx-props-no-spreading": [0, { "custom": "ignore" }],
33+
"react/jsx-no-target-blank": ["error", { "allowReferrer": true }],
34+
"react/jsx-one-expression-per-line": "off",
3335
"jsx-a11y/no-static-element-interactions": 0,
3436
"jsx-a11y/label-has-for": [
3537
2,

public/_redirects

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/ /index.html 200
2+
/about /index.html 200
3+
/links /index.html 200
24
/cookies /privacy-and-data 301
35
/privacy-and-data /index.html 200
46
/* /index.html 404

public/index.dev.html

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,22 @@
1111
<body>
1212
<div class="app-container">
1313
<header>
14-
<div class="col-2-3">
15-
<h1><a href="/">PIXEL ART TO CSS</a></h1>
16-
</div>
17-
<div class="col-1-3">
18-
<div class="header__social">
19-
<div class="header__credits">
20-
<a target="_blank" href="https://coindrop.to/jvalen"
21-
>by <span>JVALEN</span
22-
><img
23-
height="26"
24-
width="26"
25-
src="coindrop-img.png"
26-
alt="coindrop.to"
27-
/></a>
28-
</div>
29-
<div>
30-
<iframe
31-
src="https://ghbtns.com/github-btn.html?user=jvalen&repo=pixel-art-react&type=star&count=true"
32-
frameborder="0"
33-
scrolling="0"
34-
width="94px"
35-
height="20px"
36-
>
37-
</iframe>
38-
</div>
14+
<h1><a href="/">PIXEL ART TO CSS</a></h1>
15+
<div class="info-route-nav">
16+
<nav>
17+
<a href="/about">About</a>
18+
<a href="/links">Mentions</a>
19+
<a href="/privacy-and-data">Data</a>
20+
</nav>
21+
<div class="counter">
22+
<iframe
23+
src="https://ghbtns.com/github-btn.html?user=jvalen&repo=pixel-art-react&type=star&count=true"
24+
frameborder="0"
25+
scrolling="0"
26+
width="94px"
27+
height="20px"
28+
>
29+
</iframe>
3930
</div>
4031
</div>
4132
</header>

public/index.html

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,21 @@
3232
<body>
3333
<div class="app-container">
3434
<header>
35-
<div class="col-2-3">
36-
<h1><a href="/">PIXEL ART TO CSS</a></h1>
37-
</div>
38-
<div class="col-1-3">
39-
<div class="header__social">
40-
<div class="header__credits">
41-
<a target="_blank" href="https://coindrop.to/jvalen"
42-
>by <span>JVALEN</span
43-
><img
44-
height="26"
45-
width="26"
46-
src="coindrop-img.png"
47-
alt="coindrop.to"
48-
/></a>
49-
</div>
50-
<div>
51-
<iframe
52-
src="https://ghbtns.com/github-btn.html?user=jvalen&amp;repo=pixel-art-react&amp;type=star&amp;count=true"
53-
frameborder="0"
54-
scrolling="0"
55-
width="94px"
56-
height="20px"
57-
></iframe>
58-
</div>
35+
<h1><a href="/">PIXEL ART TO CSS</a></h1>
36+
<div class="info-route-nav">
37+
<nav>
38+
<a href="/about">About</a>
39+
<a href="/links">Mentions</a>
40+
<a href="/privacy-and-data">Data</a>
41+
</nav>
42+
<div class="counter">
43+
<iframe
44+
src="https://ghbtns.com/github-btn.html?user=jvalen&amp;repo=pixel-art-react&amp;type=star&amp;count=true"
45+
frameborder="0"
46+
scrolling="0"
47+
width="94px"
48+
height="20px"
49+
></iframe>
5950
</div>
6051
</div>
6152
</header>

src/assets/tree-pixelartcss.png

7.84 KB
Loading

src/components/About/About.jsx

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
import React from 'react';
2+
import { Helmet } from 'react-helmet';
3+
4+
const About = () => (
5+
<main className="description">
6+
<Helmet>
7+
<title>About | Pixel Art to CSS</title>
8+
</Helmet>
9+
<h1>
10+
About <span className="highlighted">Pixel Art to CSS</span>
11+
</h1>
12+
<div className="about-image">
13+
<img width="150" src="tree-pixelartcss.png" alt="pixelartcss.com" />
14+
</div>
15+
16+
<section id="what-is-it">
17+
<h2>What is this site?</h2>
18+
<p>
19+
<span className="highlighted">pixelartcss.com</span> is a{' '}
20+
<strong>free, open-source, and online tool</strong> that converts your
21+
pixel art designs directly into <strong>pure CSS code</strong>. Instead
22+
of relying on traditional image files (.png or .jpg), it uses CSS
23+
properties, primarily the <code>box-shadow</code> property, to render
24+
the artwork entirely within the browser.
25+
</p>
26+
<div>
27+
<p>
28+
This means your art is created entirely by the browser, resulting in:
29+
</p>
30+
<ul>
31+
<li>
32+
<strong>Lightning Fast Loading:</strong> Zero HTTP requests for the
33+
image file, speeding up your page load time.
34+
</li>
35+
<li>
36+
<strong>Scalability:</strong> The CSS art can be scaled crisply
37+
without the blur or distortion of traditional bitmap images.
38+
</li>
39+
<li>
40+
<strong>Minimal File Size:</strong> The code is lightweight and
41+
efficient for small graphics.
42+
</li>
43+
</ul>
44+
</div>
45+
</section>
46+
47+
<hr />
48+
49+
<section id="features">
50+
<h2>Core Features & Flexibility</h2>
51+
52+
<h3>Animation Support (Frame-Based)</h3>
53+
<p>
54+
Beyond static images, this tool is a powerful{' '}
55+
<strong>animation creator</strong>. You can use the built-in{' '}
56+
<strong>frame editor</strong> to easily design movement or looping
57+
effects. The tool generates optimized CSS keyframes to bring your pixel
58+
art to life!
59+
</p>
60+
<div className="pixel-animation">
61+
<div className="pixelcat-animation" />
62+
</div>
63+
64+
<h3>Input and Output Options</h3>
65+
<div>
66+
<p>
67+
While the main purpose is to generate CSS,{' '}
68+
<span className="highlighted">pixelartcss.com</span> offers maximum
69+
flexibility:
70+
</p>
71+
<ul>
72+
<li>
73+
<strong>Import Images:</strong> You can{' '}
74+
<strong>kickstart your project</strong> by importing a small image
75+
file, which the editor automatically translates into an editable
76+
pixel grid.
77+
</li>
78+
<li>
79+
<strong>Export as PNG:</strong> Download your finished static pixel
80+
art as a traditional <strong>.png file</strong>.
81+
</li>
82+
<li>
83+
<strong>Export as GIF:</strong> Download your frame-based animations
84+
as an animated <strong>.gif file</strong>.
85+
</li>
86+
</ul>
87+
</div>
88+
</section>
89+
90+
<hr />
91+
92+
<section id="how-it-works">
93+
<h2>How Does it Work?</h2>
94+
<p>
95+
The core magic lies in the <code>box-shadow</code> property. A pixel art
96+
grid is mapped, and <strong>each colored square</strong> is treated as a
97+
distinct <strong>box-shadow layer</strong>.
98+
</p>
99+
<p>
100+
The tool generates a comma-separated list of shadows. Each entry in the
101+
list defines a single colored &quot;pixel&quot; by specifying its
102+
horizontal offset, vertical offset, and color, effectively painting the
103+
entire design using one CSS property.
104+
</p>
105+
</section>
106+
107+
<hr />
108+
109+
<section id="comparison">
110+
<h2>Efficiency Trade-Offs: When to Use CSS vs an Image</h2>
111+
<p>
112+
While the CSS method is innovative, there&quot;s a trade-off between{' '}
113+
<strong>Network Cost</strong> and <strong>Rendering Cost</strong>.
114+
</p>
115+
<dl>
116+
<dt>
117+
<div className="pixel-icon">
118+
<div className="green-tick" />
119+
</div>
120+
<strong>
121+
CSS Image (box-shadow){' '}
122+
<span className="highlighted">Advantages</span>
123+
</strong>
124+
</dt>
125+
<dd>
126+
<strong>Zero Network Requests:</strong> The code is already loaded,
127+
eliminating the need for the browser to fetch a separate image file
128+
from the server. This is a massive speed win for small icons and
129+
assets.
130+
</dd>
131+
<dt>
132+
<div className="pixel-icon">
133+
<div className="alert-icon" />
134+
</div>
135+
<strong>
136+
CSS Image (box-shadow){' '}
137+
<span className="highlighted">Disadvantages</span>
138+
</strong>
139+
</dt>
140+
<dd>
141+
<strong>High Rendering Cost:</strong> The browser&quot;s CPU/GPU must
142+
calculate and draw thousands of individual box-shadow layers. For{' '}
143+
<strong>large</strong> pixel art, this computational load can cause
144+
significant rendering lag and is less efficient than loading one
145+
optimized image file.
146+
</dd>
147+
<dt>
148+
<div className="pixel-icon">
149+
<div className="image-icon" />
150+
</div>
151+
<strong>
152+
Actual Image (PNG/WebP){' '}
153+
<span className="highlighted">Efficiency</span>
154+
</strong>
155+
</dt>
156+
<dd>
157+
Actual image files have a <strong>network cost</strong> (they must be
158+
downloaded), but their <strong>rendering cost</strong> is low. Once
159+
downloaded, the browser can quickly draw a pre-calculated image
160+
bitmap. Therefore, for <strong>large or complex</strong> pixel art, an
161+
optimized image file is usually faster to display than generating it
162+
with complex CSS.
163+
</dd>
164+
</dl>
165+
<p>
166+
<strong>In short:</strong> Use CSS for <strong>small icons</strong> and
167+
images for <strong>large assets</strong>. This tool enables you to
168+
create both types of output, giving you all the possibilities.
169+
</p>
170+
</section>
171+
172+
<hr />
173+
174+
<section id="who-is-it-for">
175+
<h2>Who is this for?</h2>
176+
<ul>
177+
<li>
178+
<strong>Web Developers</strong>: Quickly add{' '}
179+
<strong>retro, 8-bit style icons</strong>, loading spinners, or small
180+
artistic flourishes.
181+
</li>
182+
<li>
183+
<strong>Pixel Artists</strong>: Easily prototype and translate your
184+
creations into a <strong>web-friendly, non-image format</strong> for
185+
online portfolios, or quickly generate GIF animations.
186+
</li>
187+
<li>
188+
<strong>Students & Hobbyists</strong>: A fun way to explore the
189+
capabilities of <strong>pure CSS</strong> and the power of the{' '}
190+
<code>box-shadow</code> property or just have fun unleashing their
191+
creativity.
192+
</li>
193+
</ul>
194+
</section>
195+
196+
<hr />
197+
198+
<section>
199+
<h2>More Info</h2>
200+
<ul>
201+
<li>
202+
<strong>Author</strong>:{' '}
203+
<a target="_blank" rel="noopener" href="https://jvalen.com">
204+
jvalen
205+
</a>
206+
</li>
207+
<li>
208+
<strong>Contributors</strong>: Amazing contributions have been
209+
provided along the time. You can check the full contributors list{' '}
210+
<a
211+
target="_blank"
212+
rel="noopener"
213+
href="https://github.com/jvalen/pixel-art-react/graphs/contributors"
214+
>
215+
here
216+
</a>
217+
.
218+
</li>
219+
<li>
220+
<strong>Source Code</strong>:{' '}
221+
<a
222+
target="_blank"
223+
rel="noopener"
224+
href="https://github.com/jvalen/pixel-art-react"
225+
>
226+
GitHub
227+
</a>
228+
</li>
229+
<li>
230+
<strong>Data and Privacy Info</strong>: This site uses LocalStorage
231+
and GoatCounter,{' '}
232+
<a rel="noopener" href="https://pixelartcss.com/privacy-and-data">
233+
check this out
234+
</a>{' '}
235+
to know more about it.
236+
</li>
237+
</ul>
238+
</section>
239+
</main>
240+
);
241+
242+
export default About;

0 commit comments

Comments
 (0)