-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
78 lines (61 loc) · 2.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Shadow Image – Convert Images to CSS box-shadow</title>
<!-- Meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width = device-width, initial-scale = 1.0, user-scalable = no">
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- Stylesheets -->
<link rel="stylesheet" type="text/css" href="assets/stylesheets/application.min.css" />
</head>
<body>
<header class="header-wrapper">
<div class="header-content">
<h1 class="entypo-code"> Shadow Image</h1>
<p>This tool will convert your images into a single <a href="http://www.w3schools.com/cssref/css3_pr_box-shadow.asp">CSS box-shadow</a> value. I <u>do not</u> recommend using this technique for production. This is only a tech-demo and should be used with caution.</p>
<p>Scroll down and see how it works.</p>
</div>
<div class="btn-more entypo-down-open-big"></div>
</header>
<div class="wrapper dark">
<div class="content">
<h1>Convert image to box-shadow</h1>
<p>Select an image and wait a couple of seconds. This may take a while to process. It is not recommended to use images larger than 100px.</p>
<div class="upload">
<input type="file" class="file-upload" id="file-upload" />
<label for="file-upload">Select image</label>
</div>
<canvas class="image-preview"></canvas>
<textarea class="code">box-shadow:</textarea>
<p class="preview">
<strong>Box-Shadow Preview</strong>
</p>
<div class="preview-shadow"></div>
<!-- <div class="avg-color">
<strong>Average Color</strong>
<span></span>
</div> -->
</div>
</div>
<div class="wrapper">
<div class="content">
<h1>How it works</h1>
<p>Each pixel of your image will be checked for its color and position. That's basically it. With these information the tool can convert everything to box-shadow. The box-shadow element must be 1 pixel in width and height. The top-left pixel of your image will be the background color of this element and all the other pixels will be added as the box-shadow.</p>
<p><s>Yes! I do suck at descriptions.</s></p>
</div>
</div>
<div class="wrapper dark">
<div class="content">
<h1>Made with <span style="color:red">♥</span></h1>
<p style="text-align: center;">
<img src="assets/images/avatar.jpg" alt="" class="avatar" />
</p>
<p>Shadow image is a project by <a href="http://myxotod.com">Max Boll</a> aka <a href="http://twitter.com/myxotod">@MyXoToD</a>. Proud member of <a href="http://bullg.it">bullgit</a>.</p>
<p>Check out the code on <a href="http://github.com/myxotod/shadow-image">github</a>.</p>
</div>
</div>
<script type="text/javascript" src="assets/javascripts/application.min.js"></script>
</body>
</html>