-
Notifications
You must be signed in to change notification settings - Fork 0
/
paint.html
144 lines (137 loc) · 4.63 KB
/
paint.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
133
134
135
136
137
138
139
140
141
142
143
144
<head>
<title>Paint</title>
</head>
<body>
<div id="screenshotModal" class="modal hide fade large" tabindex="-1" role="dialog" aria-labelledby="screenshotModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="screenshotModalLabel"></h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<span style="float:left;">Right click on the image and save the screenshot!</span>
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<div class="container">
<div class="row">
<div class="span5">
<h1>My paint, your paint</h1>
{{> myName}}
</div>
<div class="span4">
{{> colorPalette}}
</div>
<div class="span3">
{{> export}}
</div>
</div>
<div class="row">
<div class="span9">
{{> myPaint}}
</div>
<div class="span3 painterSideBar">
{{> painters}}
</div>
</div>
<div class="row">
<div class="span12 painterBottomBar">
{{> painters}}
</div>
</div>
</div>
</body>
<template name="myPaint">
<div id="paintBoard">
{{#each pixels}}
<div class="singlePixel" style="background:{{color}}" id="{{_id}}" title="{{painter}} {{myDateFormat when}}"></div>
{{/each}}
</div>
</template>
<template name="myName">
<div id="myNameDiv">
<label for="nameTF">What's your name?</label>
<input type="text" id="nameTF"/><span id="errorMessage"></span>
</div>
</template>
<template name="export">
<div id="exportContainer">
{{#each screenshots}}
<dl class="screenshotDiv">
<dt class="text-center"><img src="data:image/png;base64,{{colorArrayToBase64 what}}" title="Click on the thumbnail to magnify" id="thumb_{{_id}}" style="cursor:pointer"/></dt>
<dd class="text-center">{{who}} - {{myDateFormat when}}</dd>
</dl>
{{/each}}
</div>
<button class="btn exportButt">export</button>
</template>
<template name="painters">
<div id="paintersContainer">
<h4>Contributed to this painting...</h4>
<ul class="unstyled">
{{#each painters}}
<li><img src="img/{{status}}.png"/><span class="painter-name">{{name}}</span></li>
{{/each}}
</ul>
</div>
</template>
<template name="colorPalette">
<div id="paletteContainer">
<h4>Chose the color of your pixel</h4>
<ul class="nav nav-tabs">
<li class="active"><a href="#nicecolors" data-toggle="tab">Nice colors</a></li>
<li><a href="#uglycolors" data-toggle="tab">Ugly colors</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade in active" id="nicecolors">
<div class="colorDiv" title="#FF6600"></div>
<div class="colorDiv" title="#CD0074"></div>
<div class="colorDiv" title="#7109AA"></div>
<div class="colorDiv" title="#4512AE"></div>
<div class="colorDiv" title="blue"></div>
<div class="colorDiv" title="#514ED9"></div>
<div class="colorDiv" title="#33CCCC"></div>
<div class="colorDiv" title="#39E639"></div>
<div class="colorDiv" title="#B9F73E"></div>
<div class="colorDiv" title="#FFFF00"></div>
<div class="colorDiv" title="#FFD200"></div>
<div class="colorDiv" title="#FFB800"></div>
<div class="colorDiv" title="#FF0000"></div>
<div class="colorDiv" title="#FFFFFF"></div>
<div class="colorDiv" title="#000000"></div>
<div class="paletteSpace"></div>
<div class="colorDiv" title="#c5649d"></div>
<div class="colorDiv" title="#915eb0"></div>
<div class="colorDiv" title="#2e457b"></div>
<div class="colorDiv" title="#5995a8"></div>
<div class="colorDiv" title="#59ae94"></div>
<div class="colorDiv" title="#75ca67"></div>
<div class="colorDiv" title="#dbe474"></div>
<div class="colorDiv" title="#e7ce76"></div>
<div class="colorDiv" title="#e7b576"></div>
<div class="colorDiv" title="#e77b76"></div>
</div>
<div class="tab-pane fade" id="uglycolors">
<div class="colorDiv" title="#654c4c"></div>
<div class="colorDiv" title="#3e3342"></div>
<div class="colorDiv" title="#353843"></div>
<div class="colorDiv" title="#2e3b3c"></div>
<div class="colorDiv" title="#3d4f3d"></div>
<div class="colorDiv" title="#525b46"></div>
<div class="colorDiv" title="#63634c"></div>
<div class="colorDiv" title="#63564c"></div>
<div class="colorDiv" title="#acacac"></div>
<div class="colorDiv" title="#5f5f5f"></div>
<div class="colorDiv" title="#262626"></div>
<div class="colorDiv" title="#462c15"></div>
<div class="colorDiv" title="#532d0b"></div>
<div class="colorDiv" title="#361b04"></div>
<div class="colorDiv" title="#160b00"></div>
<div class="paletteSpace"></div>
<div class="colorDiv" title="#FF0067"></div>
<div class="colorDiv" title="#11172c"></div>
</div>
</div>
</div>
</template>