forked from robdodson/JavaScript-Design-Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
27 lines (27 loc) · 876 Bytes
/
index.html
File metadata and controls
27 lines (27 loc) · 876 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Strategy: Painter</title>
<meta name="description" content="Strategy pattern in JavaScript with pretty pictures!">
<meta name="author" content="Rob Dodson">
<style type="text/css">
canvas {
border: 1px solid black;
}
canvas, #btns {
float: left;
}
</style>
</head>
<body>
<canvas id="painter" width="300" height="300"></canvas>
<div id="btns">
<div><button id="btn-outline" data-brush="outline">Outline</button></div>
<div><button id="btn-square" data-brush="square">Square</button></div>
<div><button id="btn-circle" data-brush="circle">Circle</button></div>
</div>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>