-
Notifications
You must be signed in to change notification settings - Fork 1
/
templates-bkp.html
364 lines (337 loc) · 15.1 KB
/
templates-bkp.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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<script id="container-div" type="text/template">
<div class="<%- item %>">
<% if(item.indexOf('panel') != -1) { %>
<div class="panel-heading">Título</div>
<div class="panel-body">
</div>
<% } %>
</div>
</script>
<script id="container-text" type="text/template">
<% if(item == 'text') { %>
<p>Texto de exemplo</p>
<%} else if (item == 'title') { %>
<h1>Texto de exemplo</h1>
<%} %>
</script>
<script id="component-image" type="text/template">
<% if(item == 'image') { %>
<img src="http://placehold.it/400x300" alt="image" />
<%} else if (item == 'thumbnail') { %>
<div class="thumbnail">
<img src="http://placehold.it/400x300" alt="image" />
</div>
<%} %>
</script>
<!-- Menu de navegação -->
<script id="component-nav" type="text/template">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Título</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
</ul>
</div>
</div>
</nav>
</script>
<script id="component-list" type="text/template">
<% if(item == 'unordered') { %>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<% } else { %>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<%}%>
</script>
<!-- Formulário -->
<script id="form-form" type="text/template">
<form class="<%- item %>">
</form>
</script>
<script id="form-text" type="text/template">
<input class="form-control" type="text" name="" />
</script>
<script id="form-select" type="text/template">
<select class="form-control">
<option value="valor 1">Opção 1</option>
<option value="valor 2">Opção 2</option>
<option value="valor 3">Opção 3</option>
</select>
</script>
<script id="form-textarea" type="text/template">
<textarea class="form-control" name=""></textarea>
</script>
<script id="form-radio-checkbox" type="text/template">
<div class="<% item == 'input-radio' ? print('radio') : print('checkbox')%>">
<label><input type="<% item == 'input-radio' ? print('radio') : print('checkbox')%>" name="" value="valor 1">Opção 1</label>
</div>
<div class="<% item == 'input-radio' ? print('radio') : print('checkbox')%>">
<label><input type="<% item == 'input-radio' ? print('radio') : print('checkbox')%>" name="" value="valor 2">Opção 2</label>
</div>
<div class="<% item == 'input-radio' ? print('radio') : print('checkbox')%>">
<label><input type="<% item == 'input-radio' ? print('radio') : print('checkbox')%>" name="" value="valor 3">Opção 3</label>
</div>
</script>
<script id="form-file" type="text/template">
<input class="form-control" type="file" name="" />
</script>
<script id="form-static" type="text/template">
<p class="form-control-static">Item estático</p>
</script>
<script id="form-group" type="text/template">
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">@</span>
<input type="text" class="form-control" placeholder="Username">
</div>
</script>
<!--Template dos formulários -->
<script type="text/template" id="form-nav">
<form class="form-horizontal form-properties">
<div class="form-group">
<label>Nome</label>
<input type="text" class="form-control" name="name" value="<%=item.name%>" id="nameComponent" />
</div>
<div class="form-group">
<label>Datasource</label>
<div class="input-group">
<input type="text" class="form-control" name="datasource" value="<%=item.datasource%>" id="datasource" />
<span class="input-group-btn">
<button class="btn btn-default btn-datasource" type="button"><span class="glyphicon glyphicon-download-alt"></span></button>
</span>
</div>
</div>
<div class="form-group">
<label>Parse</label>
<input type="text" class="form-control" name="parse" value="<%=item.parse%>" id="parse" />
</div>
<div class="form-group">
<label>Título</label>
<input type="text" class="form-control" name="title" value="<%=item.title%>" id="title" />
</div>
<div class="form-group">
<label>Valores</label>
<label class="radio-inline">
<input type="radio" name="value" id="radio-static" value="0" <% if(item.value == 0) print('cheked')%>> Estáticos
</label>
<label class="radio-inline">
<input type="radio" name="value" id="radio-dynamic" value="1" <% if(item.value == 1) print('cheked')%>> Dinamicos
</label>
</div>
<!-- Valores estátitocs -->
<div id="control-static">
<div class="form-group">
<label>Itens</label>
<textarea id="txtItens" name="itens" class="form-control" rows="6"><% _.each(item.itens, function(obj){ print(obj + '\n'); })%></textarea>
</div>
<div class="form-group">
<label>Label</label>
<textarea id="txtItens" name="hrefs" class="form-control" rows="6"><% _.each(item.hrefs, function(obj){ print(obj + '\n') })%></textarea>
</div>
</div>
<!-- Valores Dinamicos -->
<div id="control-dynamic" style="display:none">
<div class="form-group">
<label>Itens</label>
<input type="text" class="form-control" name="itens" value="<%-item.itens[0] %>" id="itens" />
</div>
<div class="form-group">
<label>Link</label>
<input type="text" class="form-control" name="hrefs" value="<%=item.hrefs[0] %>" id="links" />
</div>
</div>
<div class="form-group">
<label>Classes</label>
<textarea id="txtClasses" name="classes" class="form-control" rows="6"><%=item.classes%></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary" id="btnSalvar">Salvar</button>
<button class="btn btn-default" id="btnFechar">Fechar</button>
</div>
</form>
</script>
<script type="text/template" id="form-text">
<form class="form-horizontal form-properties ">
<div class="form-group">
<label>Nome</label>
<input type="text" class="form-control" value="<%=item.name%>" name="name" id="nameComponent" />
</div>
<div class="form-group">
<label>Parse</label>
<input type="text" class="form-control" name="parse" value="<%=item.parse%>" id="parse" />
</div>
<div class="form-group">
<label>Datasource</label>
<div class="input-group">
<input type="text" class="form-control" name="datasource" value="<%=item.datasource%>" id="datasource" />
<span class="input-group-btn">
<button class="btn btn-default btn-datasource" type="button"><span class="glyphicon glyphicon-download-alt"></span></button>
</span>
</div>
</div>
<% if(item.type == 'header') {%>
<div class="form-group">
<label>Largura da Coluna</label>
<select class="form-control" id="selectTag" name="tag" value="<%=item.tag%>">
<option value="h1" <% if(item.tag == 'h1') print('selected') %> >h1</option>
<option value="h2" <% if(item.tag == 'h2') print('selected') %> >h2</option>
<option value="h3" <% if(item.tag == 'h3') print('selected') %> >h3</option>
<option value="h4" <% if(item.tag == 'h4') print('selected') %> >h4</option>
<option value="h5" <% if(item.tag == 'h5') print('selected') %> >h5</option>
<option value="h6" <% if(item.tag == 'h6') print('selected') %> >h6</option>
</select>
</div>
<%}%>
<div class="form-group">
<label>Texto</label>
<textarea id="txtTexto" name="text" class="form-control" rows="6"><%= item.text %></textarea>
</div>
<div class="form-group">
<label>Alinhamento</label>
<select class="form-control" id="selectAlign" name="align" value="<%=item.align%>">
<option value="normal" <% if(item.align == 'normal') print('selected') %> >Normal</option>
<option value="left" <% if(item.align == 'left') print('selected') %> >Esquerdo</option>
<option value="right" <% if(item.align == 'right') print('selected') %> >Direito</option>
<option value="center" <% if(item.align == 'center') print('selected') %> >Centralizado</option>
<option value="justify" <% if(item.align == 'justify') print('selected') %> >Justificado</option>
</select>
</div>
<div class="form-group">
<label>Classes</label>
<textarea id="txtClasses" name="classes" class="form-control" rows="6"><%= item.classes %></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary" id="btnSalvar">Salvar</button>
<button class="btn btn-default" id="btnFechar">Fechar</button>
</div>
</form>
</script>
<script type="text/template" id="form-image">
<form class="form-horizontal form-properties">
<div class="form-group">
<label>Nome</label>
<input type="text" class="form-control" name="name" value="<%=item.name%>" id="nameComponent" />
</div>
<div class="form-group">
<label>Parse</label>
<input type="text" class="form-control" name="parse" value="<%=item.parse%>" id="parse" />
</div>
<div class="form-group">
<label>Datasource</label>
<div class="input-group">
<input type="text" class="form-control" name="datasource" value="<%=item.datasource%>" id="datasource" />
<span class="input-group-btn">
<button class="btn btn-default btn-datasource" type="button"><span class="glyphicon glyphicon-download-alt"></span></button>
</span>
</div>
</div>
<div class="form-group">
<label>Source</label>
<input type="text" class="form-control" name="src" value="<%=item.src%>" id="srcImage" />
</div>
<div class="form-group">
<label>Largura</label>
<input type="text" id="txtLargura" name="width" class="form-control" value="<%=item.width %>" />
</div>
<div class="form-group">
<label>Altura</label>
<input type="text" id="txtAltura" class="form-control" name="height" value="<%=item.height %>" />
</div>
<div class="form-group">
<label>Classes</label>
<textarea id="txtClasses" name="classes" class="form-control" rows="6"><%= item.classes %></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary" id="btnSalvar">Salvar</button>
<button class="btn btn-default" id="btnFechar">Fechar</button>
</div>
</form>
</script>
<script type="text/template" id="form-list">
<form class="form-horizontal form-properties">
<div class="form-group">
<label>Nome</label>
<input type="text" class="form-control" name="name" value="<%=item.name%>" id="nameComponent" />
</div>
<div class="form-group">
<label>Parse</label>
<input type="text" class="form-control" name="parse" value="<%=item.parse%>" id="parse" />
</div>
<div class="form-group">
<label>Datasource</label>
<div class="input-group">
<input type="text" class="form-control" name="datasource" value="<%=item.datasource%>" id="datasource" />
<span class="input-group-btn">
<button class="btn btn-default btn-datasource" type="button"><span class="glyphicon glyphicon-download-alt"></span></button>
</span>
</div>
</div>
<div class="form-group">
<label>Valores</label>
<label class="radio-inline">
<input type="radio" name="value" id="radio-static" value="0" <% if(item.value == 0) print('cheked')%>> Estáticos
</label>
<label class="radio-inline">
<input type="radio" name="value" id="radio-dynamic" value="1" <% if(item.value == 1) print('cheked')%>> Dinamicos
</label>
</div>
<div id="control-static">
<div class="form-group">
<label>Itens</label>
<textarea id="txtItens" name="itens" class="form-control" rows="6"><% _.each(item.itens, function(obj){ print(obj + '\n'); })%></textarea>
</div>
<div class="form-group">
<label>Links</label>
<textarea id="txtLink" name="hrefs" class="form-control" rows="6"><% _.each(item.hrefs, function(obj){ print(obj + '\n'); })%></textarea>
</div>
</div>
<div id="control-dynamic">
<div class="form-group">
<label>Variável</label>
<input type="text" class="form-control" name="itens" value="<%=item.itens[0]%>" />
</div>
<div class="form-group">
<label>Label</label>
<input type="text" class="form-control" name="label" value="<%=item.label%>" />
</div>
<div class="form-group">
<label>Link</label>
<input type="text" class="form-control" name="hrefs" value="<%=item.hrefs[0]%>" />
</div>
</div>
<div class="form-group">
<label>Lista do Boostrap</label><br />
<label class="radio-inline">
<input type="radio" name="bootstrap" value="0" <% if(item.bootstrap == 0) print('checked') %> > Não
</label>
<label class="radio-inline">
<input type="radio" name="bootstrap" value="1" <% if(item.bootstrap == 1) print('checked') %>> Sim
</label>
</div>
<div class="form-group">
<label>Classes</label>
<textarea id="txtClasses" name="classes" class="form-control" rows="6"><%=item.classes%></textarea>
</div>
<div class="form-group">
<button class="btn btn-primary" id="btnSalvar">Salvar</button>
<button class="btn btn-default" id="btnFechar">Fechar</button>
</div>
</form>
</script>