Skip to content

Commit cde6f5d

Browse files
committed
Added beter tutorial
1 parent 53cf943 commit cde6f5d

File tree

6 files changed

+25
-12
lines changed

6 files changed

+25
-12
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
Convert any image to pure css.
44

5-
[See and example](http://javier.xyz/img2css/)
5+
[Live demo](http://javier.xyz/img2css/)
6+
7+
More docs coming soon...

index.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
<!doctype html>
22
<html>
33
<head>
4-
<title>Css Pic</title>
4+
<title>img2css</title>
55
<link rel="stylesheet" href="style/main.css">
66
</head>
77
<body>
8-
<div id='root'>
9-
</div>
8+
<div id='root'></div>
9+
1010
<script src="static/bundle.js"></script>
11+
12+
<script>
13+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
14+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
15+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
16+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
17+
ga('create', 'UA-44329676-12', 'auto');
18+
ga('send', 'pageview');
19+
</script>
1120
</body>
1221
</html>

src/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ export const App = React.createClass({
4747

4848
{rgbArray && (
4949
<div>
50+
<div className='tutorial'>
51+
This is your pure css (and single div) image! Enjoy!
52+
</div>
53+
5054
<div className='pixel' style={{
5155
boxShadow: masterShadow,
5256
marginBottom: rgbArray.length
5357
}} />
5458

55-
<br/>
56-
5759
<div className='tutorial'>
5860
Now you can create a single pixel 'div' and with these styles you will get your image!
5961
</div>

static/bundle.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

style/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ body {
3636

3737
.code {
3838
font-family: monaco, monospace;
39-
font-size: 0.7em;
39+
font-size: 0.6em;
4040
padding: 2em;
4141
background: #f0f0f0;
4242
}

0 commit comments

Comments
 (0)