layout.html
9.78 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
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
<section>
<h1 class="blue" data-id="#basics/layout"><i class="ace-icon fa fa-desktop grey"></i> Layout</h1>
<div class="hr hr-double hr32"></div>
<h2 class="blue lighter" data-id="#basics/layout.default">
Default layout
</h2>
<div class="space-4"></div>
<div class="help-content">
<h3 class="info-title smaller">1. Layout</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Default layout used for all pages (except for login) is:
<img src="images/default.png" />
<ul>
<li>
1) Navbar
</li>
<li>
Inside <b>main-container</b> area:
<ul>
<li> 2) Sidebar </li>
<li> 3) Breadcrumbs (inside "main-content") </li>
<li> 4) Page content (inside "main-content") </li>
<li> 5) Settings box (inside "page-content") </li>
<li> 6) Footer </li>
</ul>
</li>
</ul>
<div class="space-4"></div>
<pre data-language="html">
<!DOCTYPE html>
<html lang="en">
<head>
<!-- title, meta tags, list of stylesheets, etc ... -->
</head>
<body class="no-skin">
<div class="navbar" id="navbar">
<!-- navbar goes here -->
</div>
<div class="main-container" id="main-container">
<div class="sidebar responsive" id="sidebar">
<!-- sidebar goes here -->
</div>
<div class="main-content">
<div class="breadcrumbs">
<!-- breadcrumbs goes here -->
</div>
<div class="page-content">
<!-- setting box goes here if needed -->
<div class="row">
<div class="col-xs-12">
<!-- page content goes here -->
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.page-content -->
</div><!-- /.main-content -->
<!-- footer area -->
</div><!-- /.main-container -->
<!-- list of script files -->
</body>
</html>
</pre>
</li>
<li>
Starting with the following file you can find more details:
<br />
<code data-open-file="html" class="open-file"><span class="brief-show">mustache/app/views/layouts/</span>default.mustache</code>
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
<h3 class="info-title smaller">2. Head element</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
<code>head</code> element contains title, meta tags, stylesheets and some scripts:
<pre data-language="html">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- use the following meta to force IE use its most up to date rendering engine -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> page tite </title>
<meta name="description" content="page description" />
<!-- stylesheets are put here, refer to files/css documentation -->
<!-- some scripts should be here, refer to files/javascript documentation -->
</head>
</pre>
For more info about stylesheets and order of use, please see <a href="#files/css.order">CSS order</a>.
<br />
For more info about scripts and order of use, please see <a href="#files/javascript.order">Javascript order</a>.
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
<h3 class="info-title smaller">3. Viewport meta tag</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Please note that with mobile devices, pages may not look good when user zooms in/out,
especially when navbar or sidebar is fixed.
<br />
One option is preventing user from zooming in/out using <code>user-scalable=no</code> property:
<pre data-language="html">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</pre>
The following links have more info:
<br />
<a href="http://www.javascriptkit.com/dhtmltutors/cssmediaqueries3.shtml">
http://www.javascriptkit.com/dhtmltutors/cssmediaqueries3.shtml
</a>
<br />
<a href="https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html">
developer.apple.com
</a>
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
<h3 class="info-title smaller">4. Body element</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
<pre data-language="html">
<body class="no-skin">
...
</body>
</pre>
You can use one of the following classes to apply different skins:
<ol>
<li><code>.no-skin</code></li>
<li><code>.skin-1</code></li>
<li><code>.skin-2</code></li>
<li><code>.no-skin.skin-3</code></li>
</ol>
There is more information about this in
<a href="#settings.skins" class="help-more">Skins section</a>
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
<h3 class="info-title smaller">5. End of document</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Here you put your script list and inline scripts.
<br />
For more info about scripts and order of use, please see <a href="#files/javascript.order">Javascript order</a>.
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
</div><!-- /.help-content -->
<div class="hr hr-double hr32"></div>
<h2 class="blue lighter" data-id="#basics/layout.empty">
Empty layout
</h2>
<div class="space-4"></div>
<!-- #section:basics/layout.empty -->
<div class="help-content">
<h3 class="info-title smaller">Layout</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Empty layout is similar to default layout and is only used for
<code data-open-file="html" class="open-file">html/empty.html</code>
file which has minimal code for easier investigation:
<div class="space-4"></div>
<pre data-language="html">
<html>
<head>
<!-- title, meta tags, list of stylesheets, etc ... -->
</head>
<body class="no-skin">
<div class="navbar" id="navbar">
<!-- navbar goes here -->
</div>
<div class="main-container" id="main-container">
<div class="sidebar responsive" id="sidebar">
<!-- sidebar goes here -->
</div>
<div class="main-content">
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<!-- page content goes here -->
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.page-content -->
</div><!-- /.main-content -->
</div><!-- /.main-container -->
<!-- list of script files -->
</body>
</html>
</pre>
</li>
<li>
Starting with the following file you can find more details:
<br />
<code data-open-file="html" class="open-file"><span class="brief-show">mustache/app/views/layouts/</span>empty.mustache</code>
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
</div><!-- /.help-content -->
<!-- /section:basics/layout.empty -->
<div class="hr hr-double hr32"></div>
<h2 class="blue lighter" data-id="#basics/layout.login">
Login layout
</h2>
<div class="space-4"></div>
<!-- #section:basics/layout.login -->
<div class="help-content">
<h3 class="info-title smaller">1. Layout</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Login layout used only for the login page is as follows:
<div class="space-4"></div>
<pre data-language="html">
<html>
<head>
</head>
<body class="login-layout">
<div class="main-container">
<div class="main-content">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<!-- page content goes here -->
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.main-content -->
</div><!-- /.main-container -->
</body>
</html>
</pre>
</li>
<li>
For more info about login page, please see <a href="#pages/login" class="help-more">login page</a>
</li>
<li>
Starting with the following file you can find more details:
<br />
<code data-open-file="html" class="open-file"><span class="brief-show">mustache/app/views/layouts/</span>login.mustache</code>
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
<h3 class="info-title smaller">2. Scripts</h3>
<div class="info-section">
<ul class="info-list list-unstyled">
<li>
Fewer scripts are needed for login page.
<br />
Basically, you just need <b>jquery</b> and the following snippet to switch to a different box:
<pre data-language="javascript">
jQuery(function($) {
$(document).on('click', '.toolbar a[data-target]', function(e) {
e.preventDefault();
var target = $(this).data('target');
$('.widget-box.visible').removeClass('visible');//hide others
$(target).addClass('visible');//show target
})
})
</pre>
<code data-open-file="javascript" class="open-file"><span class="brief-show">mustache/app/views/assets/scripts/</span>login.js</code>
<br />
Of course if you want to use extra functionality such as form validation
or elements such as datepicker or a slider,
you should include the relevant scripts.
</li>
</ul><!-- /.info-list -->
</div><!-- /.info-section -->
</div><!-- /.help-content -->
<!-- /section:basics/layout.login -->
</section>