-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
344 lines (332 loc) · 17 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE HTML>
<html>
<head>
<title>coDEsign</title>
<link type="text/css" href="jquery-ui-1.8.17.custom.css" rel="stylesheet" />
<link href="default.css" media="all" rel="stylesheet">
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script> -->
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="underscore.js"></script>
<script type="text/javascript" src="zen_settings.js"></script>
<script type="text/javascript" src="zen_coding.js"></script>
<script type="text/javascript" src="default.js"></script>
</head>
<body>
<div class="doc">
<header class="hd">
<h1 class="logo">coDEsign</h1>
<div id="searchModule">
<script type="text/template" id="searchTemplate">
<div>
<a href="#" id="showColor" class="showColor">Color palette</a>
<form method="post" action="." id="searchForm">
<% if(queryLen != undefined) { %><span class="queryLen"><%=queryLen %> element<% if(queryLen > 1){%>s<%}%> found</span><% } %>
<input type="search" class="search" id="searchInput" placeholder="div.classname > span" value="<%= query %>">
</form>
<ul class="hierarchy">
<% _.each(elements, function(el, i) { %>
<li id="i<%= i %>" title="<%= el.name %>">
<span class="tagName"><%=el.tagName%></span><span class="attrs"><%= el.name %></span>
</li>
<% }); %>
</ul>
</div>
</script>
</div>
</header>
<section class="colorModule" id="colorModule">
<script type="text/template" id="colorTemplate">
<div class="ct">
<a href="#" class="closePalette" id="closePalette">x</a>
<div class="curPrev">
<div class="curCol" id="curCol"></div>
<div class="prevCol" id="prevCol"></div>
</div>
<div class="sliders">
<div id="hueSlider" class="hueSlider slider" title="Hue"></div>
<div id="satSlider" class="satSlider slider" title="Saturation"></div>
<div id="lightSlider" class="lightSlider slider" title="Lightness"></div>
<div id="alphaSlider" class="alphaSlider slider" title="Alpha"></div>
</div>
<div class="colorInputs">
<input type="number" min="0" max="360" class="colorVal" name="h" id="h" value="<%=color.hue %>" />
<input type="number" min="0" max="100" class="colorVal" name="s" id="s" value="<%=color.sat %>" />
<input type="number" min="0" max="100" class="colorVal" name="l" id="l" value="<%=color.light %>" />
<input type="number" min="0.0" max="1.0" class="colorVal" name="a" id="a" value="<%=color.alpha || 1.0 %>" />
<input type="checkbox" class="colorVal useAlpha" name="useAlpha" id="useAlpha" <% if (color.alpha != undefined) { %>checked<% } %> />
</div>
</div>
</script>
</section>
<section class="rightnav">
<div class="ct" id="propertiesModule">
<input class="newStyle" type="text" placeholder="new style">
<span class="intro">click on an element to style it<br>
[stats about this page here]</span>
<script type="text/template" id="propertiesTemplate">
<div>
<div class="selectorsHolder">
<ul class="selectors">
<% _.each(rules, function(rule) { %>
<li class="<%= rule.activeClass %>" id="rule<%= rule.id %>">
<span class="sheet"><%= rule.sheet %></span>
<span class="selector"><%= rule.selector %></span>
</li>
<% }); %>
</ul>
</div>
<div class="tabs modes" id="modes">
<a href="#" id="mode0"<% if (curMode == 0) { %> class="active"<% } %>>layout</a> |
<a href="#" id="mode1"<% if (curMode == 1) { %> class="active"<% } %>>decoration</a> |
<a href="#" id="mode2"<% if (curMode == 2) { %> class="active"<% } %>>typography</a> |
<a href="#" id="mode3"<% if (curMode == 3) { %> class="active"<% } %>>html</a>
</div>
<div class="styles">
<% if (curMode === 0) { %>
<ul class="props">
<li><span>display:</span>
<ul class="btns inline" id="display">
<li<% if (styles['display'] == 'none') { %> class="active"<% } %>>none<span class="remove"></span></li>
<li<% if (styles['display'] == 'inline') { %> class="active"<% } %>>inline<span class="remove"></span></li>
<li<% if (styles['display'] == 'inline-block') { %> class="active"<% } %>>inline-block<span class="remove"></span></li>
<li<% if (styles['display'] == 'block') { %> class="active"<% } %>>block<span class="remove"></span></li>
<!--<li>table</li>
<li>table-cell</li>-->
</ul>
</li>
<li><span>position:</span>
<ul class="btns inline" id="position">
<li<% if (styles['position'] == 'static') { %> class="active"<% } %>>static<span class="remove"></span></li>
<li<% if (styles['position'] == 'relative') { %> class="active"<% } %>>relative<span class="remove"></span></li>
<li<% if (styles['position'] == 'absolute') { %> class="active"<% } %>>absolute<span class="remove"></span></li>
<li<% if (styles['position'] == 'fixed') { %> class="active"<% } %>>fixed<span class="remove"></span></li>
</ul>
</li>
<li><span>float:</span>
<ul class="btns inline" id="float">
<li<% if (styles['float'] == 'left') { %> class="active"<% } %>>left<span class="remove"></span></li>
<li<% if (styles['float'] == 'right') { %> class="active"<% } %>>right<span class="remove"></span></li>
<li<% if (styles['float'] == 'none') { %> class="active"<% } %>>none<span class="remove"></span></li>
</ul>
</li>
<li><span>clear:</span>
<ul class="btns inline" id="clear">
<li<% if (styles['clear'] == 'left') { %> class="active"<% } %>>left<span class="remove"></span></li>
<li<% if (styles['clear'] == 'right') { %> class="active"<% } %>>right<span class="remove"></span></li>
<li<% if (styles['clear'] == 'none') { %> class="active"<% } %>>none<span class="remove"></span></li>
</ul>
</li>
<li><span>visibility:</span>
<ul class="btns inline" id="visibility">
<li<% if (styles['visibility'] == 'visible') { %> class="active"<% } %>>visible<span class="remove"></span></li>
<li<% if (styles['visibility'] == 'hidden') { %> class="active"<% } %>>hidden<span class="remove"></span></li>
<li<% if (styles['visibility'] == 'collapse') { %> class="active"<% } %>>collapse<span class="remove"></span></li>
</ul>
</li>
<li><span>overflow:</span>
<ul class="btns inline" id="overflow">
<li<% if (styles['overflow'] == 'visible') { %> class="active"<% } %>>visible<span class="remove"></span></li>
<li<% if (styles['overflow'] == 'hidden') { %> class="active"<% } %>>hidden<span class="remove"></span></li>
<li<% if (styles['overflow'] == 'scroll') { %> class="active"<% } %>>scroll<span class="remove"></span></li>
<li<% if (styles['overflow'] == 'auto') { %> class="active"<% } %>>auto<span class="remove"></span></li>
</ul>
</li>
</ul>
<% } else if (curMode == 1) { %>
<div class="decoAdd">
<p><label for="background-color">background-color:</label> <input type="color" name="background-color" value="<%=styles['background-color']%>" style="background-color:<%=styles['background-color']%>;" />
<p><a href="#" class="btn" id="decoAdd">Add</a></p>
<ul class="addOptions" id="decoOptions">
<li>background-image</li>
<li>linear-gradient</li>
<li>radial-gradient</li>
<li>box-shadow</li>
<li>text-shadow</li>
</ul>
</div>
<ul class="bgs">
<% _.each(backgrounds, function(bg) { %>
<li id="dec<%=bg.id%>"<% if(bg.id==bgId) { %> class="selected"<%}%>>
<a href="#" class="rem">x</a>
<span class="edit">edit</span>
<h3><span class="bgLabel">background: </span><span class="bgName"><%=bg.image.getName() %></span></h3>
<div style="background-image:<%=bg.image %>, url(layout/grid.png);" class="bgThumb"></div>
<div class="bgControls">
repeat: <select name="repeat">
<option value="">--- not set ---</option>
<option<% if(bg.repeat == 'no-repeat') {%> selected="selected"<%}%>>no-repeat</option>
<option<% if(bg.repeat == 'repeat-x') {%> selected="selected"<%}%>>repeat-x</option>
<option<% if(bg.repeat == 'repeat-y') {%> selected="selected"<%}%>>repeat-y</option>
<option<% if(bg.repeat == 'repeat') {%> selected="selected"<%}%>>repeat</option>
</select> <br>
attachment:<%=bg.attachment%> <select name="attachment">
<option value="">--- not set ---</option>
<option<% if(bg.attachment == 'scroll') {%> selected="selected"<%}%>>scroll</option>
<option<% if(bg.attachment == 'fixed') {%> selected="selected"<%}%>>fixed</option>
<option></option>
</select> <br>
origin: <select name="origin">
<option value="">--- not set ---</option>
<option<% if(bg.origin == 'padding-box') {%> selected="selected"<%}%>>padding-box</option>
<option<% if(bg.origin == 'border-box') {%> selected="selected"<%}%>>border-box</option>
<option<% if(bg.origin == 'content-box') {%> selected="selected"<%}%>>content-box</option>
</select> <br>
clip:<%=bg.clip%> <select name="clip">
<option value="">--- not set ---</option>
<option<% if(bg.clip == 'padding-box') {%> selected="selected"<%}%>>padding-box</option>
<option<% if(bg.clip == 'border-box') {%> selected="selected"<%}%>>border-box</option>
<option<% if(bg.clip == 'content-box') {%> selected="selected"<%}%>>content-box</option>
<option></option>
</select>
</div>
</li>
<% }); %>
<% _.each(shadows, function(shad) { %>
<li id="dec<%=shad.id%>"<% if(shad.id==bgId) { %> class="selected"<%}%>>
<a href="#" class="rem">x</a>
<span class="edit">edit</span>
<h3><span class="shLabel">box-shadow</span></h3>
<div style="background:url(layout/grid.png); background-size:auto;" class="bgThumb">
<div class="thumbBox" style="box-shadow:<%=shad %>;"></div>
</div>
<div class="bgControls">
<label>color:</label> <input type="color" name="box-shadow-color" value="<%=shad.color %>" style="background-color:<%=shad.color %>;" /><br>
<input type="checkbox" name="inset" <% if (shad.inset) { %> checked<%}%> /> <label>inset</label>
</div>
</li>
<% }); %>
<% _.each(textShadows, function(shad) { %>
<li id="dec<%=shad.id%>"<% if(shad.id==bgId) { %> class="selected"<%}%>>
<a href="#" class="rem">x</a>
<span class="edit">edit</span>
<h3><span class="shLabel">text-shadow</span></h3>
<div style="background:url(layout/grid.png); background-size:auto;" class="bgThumb">
<div class="thumbText" style="text-shadow:<%=shad %>;">a</div>
</div>
<div class="bgControls">
<label>color:</label> <input type="color" name="text-shadow-color" value="<%=shad.color %>" style="background-color:<%=shad.color %>;" />
</div>
</li>
<% }); %>
</ul>
<% } else if (curMode == 2) { %>
<ul class="props">
<li><span>font-family:</span><br>
<input name="font-family" id="fontSearch" value="<%=styles['font-family']%>" placeholder="search or enter font-family" class="fontSearch" />
<div id="fontsModule"></div>
</li>
<li><span>font-weight:</span>
<ul class="btns inline" id="font-weight">
<li<% if (styles['font-weight'] == 'normal') { %> class="active"<% } %>>normal<span class="remove"></span></li>
<li<% if (styles['font-weight'] == 'bold') { %> class="active"<% } %>>bold<span class="remove"></span></li>
</ul>
</li>
<li><span>font-style:</span>
<ul class="btns inline" id="font-style">
<li<% if (styles['font-style'] == 'normal') { %> class="active"<% } %>>normal<span class="remove"></span></li>
<li<% if (styles['font-style'] == 'italic') { %> class="active"<% } %>>italic<span class="remove"></span></li>
</ul>
</li>
<li><span>font-variant:</span>
<ul class="btns inline" id="font-variant">
<li<% if (styles['font-variant'] == 'normal') { %> class="active"<% } %>>normal<span class="remove"></span></li>
<li<% if (styles['font-variant'] == 'small-caps') { %> class="active"<% } %>>small-caps<span class="remove"></span></li>
</ul>
</li>
<li><span>text-decoration:</span>
<ul class="btns inline" id="text-decoration">
<li<% if (styles['text-decoration'] == 'none') { %> class="active"<% } %>>none<span class="remove"></span></li>
<li<% if (styles['text-decoration'] == 'underline') { %> class="active"<% } %>>underline<span class="remove"></span></li>
<li<% if (styles['text-decoration'] == 'line-through') { %> class="active"<% } %>>line-through<span class="remove"></span></li>
<li<% if (styles['text-decoration'] == 'overline') { %> class="active"<% } %>>overline<span class="remove"></span></li>
</ul>
</li>
<li><span>text-transform:</span>
<ul class="btns inline" id="text-transform">
<li<% if (styles['text-transform'] == 'normal') { %> class="active"<% } %>>normal<span class="remove"></span></li>
<li<% if (styles['text-transform'] == 'capitalize') { %> class="active"<% } %>>capitalize<span class="remove"></span></li>
<li<% if (styles['text-transform'] == 'uppercase') { %> class="active"<% } %>>uppercase<span class="remove"></span></li>
<li<% if (styles['text-transform'] == 'lowercase') { %> class="active"<% } %>>lowercase<span class="remove"></span></li>
</ul>
</li>
<li><span>white-space:</span>
<ul class="btns inline" id="white-space">
<li<% if (styles['white-space'] == 'normal') { %> class="active"<% } %>>normal<span class="remove"></span></li>
<li<% if (styles['white-space'] == 'pre') { %> class="active"<% } %>>pre<span class="remove"></span></li>
<li<% if (styles['white-space'] == 'nowrap') { %> class="active"<% } %>>nowrap<span class="remove"></span></li>
</ul>
</li>
<li><label for="color">color:</label>
<input type="color" name="color" value="<%=styles['color'] %>" style="background-color:<%=styles['color']%>;" />
</li>
</ul>
<% } else if (curMode == 3) { %>
<div class="ct">
<form id="markupEdit" class="markupEdit">
<input id="markup" name="markup" placeholder='div#myId>span.className' />
</form>
<ul class="btns inline">
<li id="inside" class="modifyDom">add inside</li>
<li id="before" class="modifyDom">add before</li>
<li id="after" class="modifyDom">add after</li>
<li id="wrap" class="modifyDom">wrap</li>
</ul>
<hr>
<ul class="btns inline">
<li id="remove" class="modifyDom">remove</li>
<li id="empty" class="modifyDom">empty</li>
</ul>
<hr>
<div id="domBtns">
<input type="button" value="Bold" id="bold" />
<input type="button" value="Italic" id="italic" />
<input type="button" value="Underline" id="underline" />
<input type="button" value="<s>" id="strikethrough" />
<input type="button" value="<a>" id="createLink" cmdValue="promptUser" promptText="URL of link?" />
<input type="button" value="unlink" id="unlink" />
<input type="button" value="<hr />" id="inserthorizontalrule" />
<input type="button" value="<sub>" id="subscript" />
<input type="button" value="<sup>" id="superscript" />
<span class="separator">|</span>
<input type="button" value="<ol>" id="insertorderedlist" />
<input type="button" value="<ul>" id="insertunorderedlist" />
<input type="button" value="<p>" id="insertparagraph" />
<span class="separator">|</span>
<input type="button" value="heading" id="heading" cmdValue="promptUser" promptText="Which header?" />
<input type="button" value="indent" id="indent" />
<input type="button" value="outdent" id="outdent" />
</div>
<hr>
<h3>CSS Classes</h3>
<ul><li>classname</li></ul>
<h3>Attributes</h3>
<ul><li>attr: val</li></ul>
</div>
<% } %>
</div>
</div>
</script>
<script type="text/template" id="fontsTemplate">
<ul class="fonts">
<% _.each(fonts, function(font) { %>
<li><%=font.family %></li>
<% }); %>
</ul>
</script>
</div>
</section>
<div class="holder" id="pageHolder">
<div id="coverSheet" class="coverSheet"></div>
<div id="grid" class="grid"></div>
<div id="controls" class="controls margin layoutMode">
<div id="box" class="box">
<div id="padding" class="pad"></div>
</div>
</div>
<iframe src="iframe.html" class="document" id="iframe"></iframe>
</div>
</div>
</body>
</html>