-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathindex.html
132 lines (131 loc) · 3.83 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PhotoJShop</title>
<style type="text/css">
body{
text-align:center;
background:#F7F7F7;
font-family:Georgia, "Times New Roman", Times, serif;
}
canvas{
border:#666 solid 1px;
}
h1{
color:#003871;
}
h3{
display:inline-block;
}
a{
text-decoration:none;
color:#005BCC;
}
a:hover{
color:#C00;
}
nav{
border:solid 1px #DDD;
display:inline-block;
}
nav ul{
padding:0;
margin:0;
list-style:none;
}
nav li{ display:inline-block; }
nav a{
display:inline-block;
padding:5px 15px;
}
nav a:hover{
background:#efefef;
}
footer{
text-align:center;
margin:30px 0;
font-size:80%;
color:#555;
}
</style>
<!--<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>-->
<script src="js/jquery.js"></script>
<script src="src/photojshop.jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#effects a').click(function(e){
e.preventDefault();
$('#jack').PhotoJShop({
'effect' : $(this).attr("data-effect")
});
return true;
});
$('#filters a').click(function(e){
e.preventDefault();
$('#jack').PhotoJShop({
'color' : $(this).attr("data-effect")
});
return true;
});
$('#custom').click(function(e){
e.preventDefault();
e.stopPropagation();
var mat = prompt("Please enter custom matrix, in JavaScript format (e.g. [[0,0,0],[0,1,0],[0,0,0]])");
$('#jack').PhotoJShop({
'matrix' : eval(mat)
});
return true;
});
});
</script>
</head>
<body>
<h1>PhotoJShop Demo</h1>
<div style="width:500px; margin:0 auto;">
<p>Welcome to the PhotoJShop demo page. Below you will find a set of links that will apply the corresponding effect to the image.</p>
<p>
<iframe class="github-btn" style="display:inline-block; width:100px;"
src="http://ghbtns.com/github-btn.html?user=aurbano&repo=photojshop&type=watch&count=true"
wtransparency="true" frameborder="0" scrolling="0" height="20px"></iframe>
<iframe class="github-btn" style="display:inline-block; width:100px;"
src="http://ghbtns.com/github-btn.html?user=aurbano&repo=photojshop&type=fork&count=true"
allowtransparency="true" frameborder="0" scrolling="0" height="20px"></iframe>
</p></div>
<h3>Effects: </h3>
<nav>
<ul id="effects">
<li><a href="#effect" data-effect="blur">Blur</a></li>
<li><a href="#effect" data-effect="blur2">Blur (rad=4)</a></li>
<li><a href="#effect" data-effect="sharpen">Sharpen</a></li>
<li><a href="#effect" data-effect="lighten">Lighten</a></li>
<li><a href="#effect" data-effect="darken">Darken</a></li>
<li><a href="#effect" data-effect="emboss">Emboss</a></li>
<li><a href="#effect" data-effect="edge-enhance">Edge enhance</a></li>
<li><a href="#effect" data-effect="edge-detect">Edge detect</a></li>
<li><a href="#effect" data-effect="hard-edge">Hard edge</a></li>
<li><a href="#effect" data-effect="laplace">Laplace</a></li>
</ul>
</nav>
<br />
<h3>Filters: </h3>
<nav>
<ul id="filters">
<li><a href="#filter" data-effect="b&w">B&W</a></li>
<li><a href="#filter" data-effect="sepia">Sepia</a></li>
<li><a href="#filter" data-effect="vintage">Vintage</a></li>
<li><a href="#filter" data-effect="red">Red</a></li>
<li><a href="#filter" data-effect="blue">Blue</a></li>
<li><a href="#filter" data-effect="green">Green</a></li>
<li><a href="#filter" data-effect="recolor">Recolor</a></li>
</ul>
</nav>
<p>You can also use a <a href="#custom" id="custom" data-effect="custom">Custom matrix</a></p>
<article>
<img src="demo/img/ocean.jpg" id="jack" alt="Jack" />
</article>
<footer>
<small><a href="https://github.com/aurbano/PhotoJShop">Fork on Github</a> • Developed by <a href="http://urbanoalvarez.es">Alejandro U. Álvarez</a> • [Photo credit: <a href="http://foter.com/Nature/">Foter.com</a> / <a href="http://creativecommons.org/licenses/by-sa/2.5/">CC BY-SA</a>]</small>
</footer>
</body>
</html>