-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
42 lines (35 loc) · 1.61 KB
/
Copy pathtest.html
File metadata and controls
42 lines (35 loc) · 1.61 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Rooms</title>
<!-- Latest compiled and minified CSS -->
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="tools"></div>
<canvas id="colors_sketch" width="300" height="300"></canvas>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://intridea.github.io/sketch.js/lib/sketch.min.js"></script>
<script type="text/javascript">
$(function() {
$.each(['#f00', '#ff0', '#0f0', '#0ff', '#00f', '#f0f', '#000', '#fff'], function() {
$('.tools').append("<a href='#colors_sketch' data-color='" + this + "' style='border: 1px solid black; padding: 10px 20px; margin-right: 5px; background: " + this + ";'></a> ");
});
$.each([3, 5, 10, 15], function() {
$('.tools').append("<a href='#colors_sketch' data-size='" + this + "' style='border: 1px solid black; padding: 10px 15px; margin-right: 5px; text-decoration: none; background: #ccc'>" + this + "</a> ");
});
$('#colors_sketch').sketch();
});
</script>
</body>
</html>