coolstrap-generator 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/.gitignore +4 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Rakefile +6 -0
- data/bin/coolstrap +5 -0
- data/coolstrap-generator.gemspec +42 -0
- data/lib/.DS_Store +0 -0
- data/lib/coolstrap-generator.rb +39 -0
- data/lib/coolstrap-generator/.DS_Store +0 -0
- data/lib/coolstrap-generator/builder/middleman.rb +0 -0
- data/lib/coolstrap-generator/cli.rb +71 -0
- data/lib/coolstrap-generator/generate/project.rb +96 -0
- data/lib/coolstrap-generator/generate/view.rb +54 -0
- data/lib/coolstrap-generator/logger.rb +13 -0
- data/lib/coolstrap-generator/middleman/helpers.rb +176 -0
- data/lib/coolstrap-generator/templates/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/assets/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/lib/coolstrap-generator/templates/app/assets/fonts/fontawesome-webfont.svg +255 -0
- data/lib/coolstrap-generator/templates/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/lib/coolstrap-generator/templates/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/arrow-list.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/arrow.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/menu.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/smatphone.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/smatphone@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/tablet-landscape.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/tablet-landscape@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/tablet-portrait.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/coolstrap/startup/tablet-portrait@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/smatphone.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/smatphone@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/tablet-landscape.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/tablet-landscape@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/tablet-portrait.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/images/startup/tablet-portrait@2x.png +0 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/app.js +18 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/_Coolstrap.App.coffee +39 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/_Coolstrap.Console.coffee +49 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/_Coolstrap.Constants.coffee +89 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/_Coolstrap.js +13 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/build/_wrap-start.js +18 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/coolstrap-0.1.js +20 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/coolstrap-0.1.packed.js +23 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/fallback/_Coolstrap.Fallback.Android.coffee +53 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/fallback/_Coolstrap.Fallback.iOS.coffee +29 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/framework/_Coolstrap.Framework.Articles.coffee +34 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/framework/_Coolstrap.Framework.Dialogs.coffee +33 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/framework/_Coolstrap.Framework.Navigation.coffee +118 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/framework/_Coolstrap.Framework.Sections.coffee +60 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/lib/iscroll.js +1076 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/lib/modernizr-2.5.3.js +1265 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/lib/zepto-1.0rc1.js +1357 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/navigate/_Coolstrap.Navigate.History.coffee +164 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/navigate/_Coolstrap.Navigate.coffee +105 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/plugins/_Coolstrap.Plugins.coffee +157 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/util/_Coolstrap.Util.Core.coffee +54 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/util/_Coolstrap.Util.Platform.coffee +89 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/util/_Coolstrap.Util.UI.coffee +96 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/util/_Coolstrap.Util.coffee +41 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/view/_Coolstrap.View.Article.coffee +43 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/view/_Coolstrap.View.Aside.coffee +65 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/view/_Coolstrap.View.Dialog.coffee +129 -0
- data/lib/coolstrap-generator/templates/app/assets/javascripts/coolstrap/view/_Coolstrap.View.Scroll.coffee +191 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/_structure.scss +8 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/coolstrap.css.scss +2 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/_components.scss +5 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/_layout.scss +4 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/_utilities.scss +6 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/components/_dialog.scss +122 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/components/_formelements.scss +89 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/components/_listview.scss +76 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/components/_navigations.scss +192 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/components/_tools.scss +169 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/layout/_layers.scss +57 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/layout/_layout.scss +62 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/layout/_positions.scss +38 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/layout/_transitions.scss +35 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_animate.scss +63 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_helpers.scss +82 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_icons.scss +336 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_mixins.scss +45 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_reset.scss +367 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/structure/utilities/_variables.scss +176 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/themes/_default.scss +255 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/coolstrap/themes/coolstrap.css.scss +164 -0
- data/lib/coolstrap-generator/templates/app/assets/stylesheets/customtheme.css.scss +19 -0
- data/lib/coolstrap-generator/templates/app/components/_formelements.html.haml +130 -0
- data/lib/coolstrap-generator/templates/app/components/_tabbar.html.haml +343 -0
- data/lib/coolstrap-generator/templates/app/components/_toolbar.html.haml +463 -0
- data/lib/coolstrap-generator/templates/app/components/formelements.html.haml +196 -0
- data/lib/coolstrap-generator/templates/app/components/listview/_complexlistavatar.html.haml.erb +77 -0
- data/lib/coolstrap-generator/templates/app/components/listview/_simplelist.html.haml.erb +31 -0
- data/lib/coolstrap-generator/templates/app/components/tabbar.html.haml.erb +16 -0
- data/lib/coolstrap-generator/templates/app/components/toolbar.html.haml.erb +32 -0
- data/lib/coolstrap-generator/templates/app/index.html.haml.erb +21 -0
- data/lib/coolstrap-generator/templates/app/layout.haml.erb +79 -0
- data/lib/coolstrap-generator/templates/app/views/.DS_Store +0 -0
- data/lib/coolstrap-generator/templates/app/views/_home.haml.erb +31 -0
- data/lib/coolstrap-generator/templates/app/views/shared/_aside_onbottom.haml +2 -0
- data/lib/coolstrap-generator/templates/app/views/shared/_aside_onleft.haml +56 -0
- data/lib/coolstrap-generator/templates/app/views/shared/_aside_onright.haml +66 -0
- data/lib/coolstrap-generator/templates/app/views/shared/_aside_ontop.haml +19 -0
- data/lib/coolstrap-generator/templates/defaults/Gemfile.erb +3 -0
- data/lib/coolstrap-generator/templates/defaults/LICENSE.erb +1 -0
- data/lib/coolstrap-generator/templates/defaults/Readme.mkd.erb +1 -0
- data/lib/coolstrap-generator/templates/defaults/config.erb +42 -0
- data/lib/coolstrap-generator/templates/defaults/gitignore.erb +2 -0
- data/lib/coolstrap-generator/templates/rakefile +102 -0
- data/lib/coolstrap-generator/templates/specs/app_spec.coffee +3 -0
- data/lib/coolstrap-generator/utils.rb +82 -0
- data/lib/coolstrap-generator/version.rb +5 -0
- data/readme.md +107 -0
- data/spec/cli/command_spec.rb +88 -0
- data/spec/coolstrap-generator/generate/project_spec.rb +126 -0
- data/spec/coolstrap-generator/generate/view_spec.rb +26 -0
- data/spec/coolstrap-generator/logger_spec.rb +25 -0
- data/spec/coolstrap-generator/middleman/helpers_spec.rb +16 -0
- data/spec/coolstrap-generator/utils_spec.rb +120 -0
- data/spec/spec_helper.rb +39 -0
- metadata +321 -0
@@ -0,0 +1,343 @@
|
|
1
|
+
%h1 NAVS Y TABBARS
|
2
|
+
%p
|
3
|
+
Las barras de navegación
|
4
|
+
%span.code <nav>
|
5
|
+
en Coolstrap soportan cualquier tipo de botón
|
6
|
+
%span.code <a>
|
7
|
+
se encuentre este en dentro de una lista o no.
|
8
|
+
Las barras de navegación, al igual que los header tienen una altura default de 44px, pero también está la posibilidad de convertirlas en un tabbar más alto que pueda soportar la incorporación de íconos y texto. Esto suele darse en los footers.
|
9
|
+
Para convertir un
|
10
|
+
%span.code <nav>
|
11
|
+
en un tabbar es necesario agregarle el atributo
|
12
|
+
%span.code data-type="tabbar"
|
13
|
+
Estirándose a la altura default de esta barra que es de 50px y permitiendo el adecuado comportamiento de ubicación en los elementos en su interior.
|
14
|
+
%h1
|
15
|
+
NAVS
|
16
|
+
%h2
|
17
|
+
Navs fuera del
|
18
|
+
%span.code <article>
|
19
|
+
%p
|
20
|
+
Un
|
21
|
+
%span.code <nav>
|
22
|
+
puede encontrarse también fuera del
|
23
|
+
%span.code <article>
|
24
|
+
e incluso fuera del
|
25
|
+
%span.code <section>
|
26
|
+
y quedar adherida al header.
|
27
|
+
%h2
|
28
|
+
%span.code <nav>
|
29
|
+
sin
|
30
|
+
%span.code <ul>
|
31
|
+
y con botones de texto en su interior.
|
32
|
+
%nav
|
33
|
+
%a button 1
|
34
|
+
%a button 2
|
35
|
+
%a button 3
|
36
|
+
%a button 4
|
37
|
+
%pre
|
38
|
+
= preserve do
|
39
|
+
:escaped
|
40
|
+
<nav>
|
41
|
+
<a>button 1</a>
|
42
|
+
<a>button 2</a>
|
43
|
+
<a>button 3</a>
|
44
|
+
<a>button 4</a>
|
45
|
+
</nav>
|
46
|
+
%h2
|
47
|
+
%span.code <nav>
|
48
|
+
sin
|
49
|
+
%span.code <ul>
|
50
|
+
y con botones de texto e ícono en su interior.
|
51
|
+
%p
|
52
|
+
El texto puede estar envuelto en una etiqueta
|
53
|
+
%span.code <span>
|
54
|
+
o suelto, aunque con esta última opción el texto pierde sus márgenes laterales.
|
55
|
+
%nav
|
56
|
+
%a
|
57
|
+
%i.icon-facebook
|
58
|
+
%span Facebook
|
59
|
+
%a
|
60
|
+
%i.icon-twitter
|
61
|
+
%span Twitter
|
62
|
+
%a
|
63
|
+
%span Comments
|
64
|
+
%i.icon-comments
|
65
|
+
%a
|
66
|
+
%span Linkedin
|
67
|
+
%i.icon-linkedin
|
68
|
+
%pre
|
69
|
+
= preserve do
|
70
|
+
:escaped
|
71
|
+
<nav>
|
72
|
+
<a>
|
73
|
+
<i></i>
|
74
|
+
<span>button 1</span>
|
75
|
+
</a>
|
76
|
+
<a>
|
77
|
+
<i></i>
|
78
|
+
<span>button 2</span>
|
79
|
+
</a>
|
80
|
+
<a>
|
81
|
+
<span>button 3</span>
|
82
|
+
<i></i>
|
83
|
+
</a>
|
84
|
+
<a>
|
85
|
+
<span>button 4</span>
|
86
|
+
<i></i>
|
87
|
+
</a>
|
88
|
+
</nav>
|
89
|
+
%h2
|
90
|
+
%span.code <nav>
|
91
|
+
sin
|
92
|
+
%span.code <ul>
|
93
|
+
y botones con ícono en su interior
|
94
|
+
%nav
|
95
|
+
%a
|
96
|
+
%i.icon-facebook
|
97
|
+
%a
|
98
|
+
%i.icon-twitter
|
99
|
+
%a
|
100
|
+
%i.icon-comments
|
101
|
+
%a
|
102
|
+
%i.icon-linkedin
|
103
|
+
%pre
|
104
|
+
= preserve do
|
105
|
+
:escaped
|
106
|
+
<nav>
|
107
|
+
<a>
|
108
|
+
<i></i>
|
109
|
+
</a>
|
110
|
+
<a>
|
111
|
+
<i></i>
|
112
|
+
</a>
|
113
|
+
<a>
|
114
|
+
<i></i>
|
115
|
+
</a>
|
116
|
+
<a>
|
117
|
+
<i></i>
|
118
|
+
</a>
|
119
|
+
</nav>
|
120
|
+
%h1 TABBARS
|
121
|
+
%p
|
122
|
+
Recuerda que a los
|
123
|
+
%span.code <nav>
|
124
|
+
debes agregarle el atributo
|
125
|
+
%span.code data-type="tabbar"
|
126
|
+
%h2
|
127
|
+
Tabbar con
|
128
|
+
%span.code <ul>
|
129
|
+
y botones de texto en su interior
|
130
|
+
%nav{"data-type" => "tabbar"}
|
131
|
+
%ul
|
132
|
+
%li
|
133
|
+
%a button 1
|
134
|
+
%li
|
135
|
+
%a button 2
|
136
|
+
%li
|
137
|
+
%a button 3
|
138
|
+
%li
|
139
|
+
%a button 4
|
140
|
+
%pre
|
141
|
+
= preserve do
|
142
|
+
:escaped
|
143
|
+
<nav data-type="tabbar">
|
144
|
+
<ul>
|
145
|
+
<li>
|
146
|
+
<a>button 1</a>
|
147
|
+
</li>
|
148
|
+
<li>
|
149
|
+
<a>button 2</a>
|
150
|
+
</li>
|
151
|
+
<li>
|
152
|
+
<a>button 3</a>
|
153
|
+
</li>
|
154
|
+
<li>
|
155
|
+
<a>button 4</a>
|
156
|
+
</li>
|
157
|
+
</ul>
|
158
|
+
</nav>
|
159
|
+
%h2
|
160
|
+
Tabbar sin
|
161
|
+
%span.code <ul>
|
162
|
+
en su interior y con botones de texto
|
163
|
+
%nav{"data-type" => "tabbar"}
|
164
|
+
%a button 1
|
165
|
+
%a button 2
|
166
|
+
%a button 3
|
167
|
+
%a button 4
|
168
|
+
%pre
|
169
|
+
= preserve do
|
170
|
+
:escaped
|
171
|
+
<nav data-type="tabbar">
|
172
|
+
<a>button 1</a>
|
173
|
+
<a>button 2</a>
|
174
|
+
<a>button 3</a>
|
175
|
+
<a>button 4</a>
|
176
|
+
</nav>
|
177
|
+
|
178
|
+
%h2
|
179
|
+
Tabbar con
|
180
|
+
%span.code <ul>
|
181
|
+
y botones con ícono en su interior.
|
182
|
+
%nav{"data-type" => "tabbar"}
|
183
|
+
%ul
|
184
|
+
%li
|
185
|
+
%a
|
186
|
+
%i.icon-facebook
|
187
|
+
%li
|
188
|
+
%a
|
189
|
+
%i.icon-twitter
|
190
|
+
%li
|
191
|
+
%a
|
192
|
+
%i.icon-comments
|
193
|
+
%li
|
194
|
+
%a
|
195
|
+
%i.icon-linkedin
|
196
|
+
%pre
|
197
|
+
= preserve do
|
198
|
+
:escaped
|
199
|
+
<nav data-type="tabbar">
|
200
|
+
<ul>
|
201
|
+
<li>
|
202
|
+
<a>
|
203
|
+
<i></i>
|
204
|
+
</a>
|
205
|
+
</li>
|
206
|
+
<li>
|
207
|
+
<a>
|
208
|
+
<i></i>
|
209
|
+
</a>
|
210
|
+
</li>
|
211
|
+
<li>
|
212
|
+
<a>
|
213
|
+
<i></i>
|
214
|
+
</a>
|
215
|
+
</li>
|
216
|
+
<li>
|
217
|
+
<a>
|
218
|
+
<i></i>
|
219
|
+
</a>
|
220
|
+
</li>
|
221
|
+
</ul>
|
222
|
+
</nav>
|
223
|
+
|
224
|
+
|
225
|
+
%h2
|
226
|
+
Tabbar sin
|
227
|
+
%span.code <ul>
|
228
|
+
y con íconos en los botones
|
229
|
+
%nav{"data-type" => "tabbar"}
|
230
|
+
%a
|
231
|
+
%i.icon-facebook
|
232
|
+
%a
|
233
|
+
%i.icon-twitter
|
234
|
+
%a
|
235
|
+
%i.icon-comments
|
236
|
+
%a
|
237
|
+
%i.icon-linkedin
|
238
|
+
%pre
|
239
|
+
= preserve do
|
240
|
+
:escaped
|
241
|
+
<nav data-type="tabbar">
|
242
|
+
<a>
|
243
|
+
<i></i>
|
244
|
+
</a>
|
245
|
+
<a>
|
246
|
+
<i></i>
|
247
|
+
</a>
|
248
|
+
<a>
|
249
|
+
<i></i>
|
250
|
+
</a>
|
251
|
+
<a>
|
252
|
+
<i></i>
|
253
|
+
</a>
|
254
|
+
</nav>
|
255
|
+
|
256
|
+
%h2
|
257
|
+
Tabbar con
|
258
|
+
%span.code <ul>
|
259
|
+
y botones con ícono y texto
|
260
|
+
%nav{"data-type" => "tabbar"}
|
261
|
+
%ul
|
262
|
+
%li
|
263
|
+
%a
|
264
|
+
%i.icon-facebook
|
265
|
+
Facebook
|
266
|
+
%li
|
267
|
+
%a
|
268
|
+
%i.icon-twitter
|
269
|
+
Twitter
|
270
|
+
%li
|
271
|
+
%a
|
272
|
+
%i.icon-comments
|
273
|
+
Comments
|
274
|
+
%li
|
275
|
+
%a
|
276
|
+
%i.icon-linkedin
|
277
|
+
Linkedin
|
278
|
+
%pre
|
279
|
+
= preserve do
|
280
|
+
:escaped
|
281
|
+
<nav data-type="tabbar">
|
282
|
+
<ul>
|
283
|
+
<li>
|
284
|
+
<a>
|
285
|
+
button 1
|
286
|
+
<i></i>
|
287
|
+
</a>
|
288
|
+
<a>
|
289
|
+
button 2
|
290
|
+
<i></i>
|
291
|
+
</a>
|
292
|
+
<a>
|
293
|
+
button 3
|
294
|
+
<i></i>
|
295
|
+
</a>
|
296
|
+
<a>
|
297
|
+
button 4
|
298
|
+
<i></i>
|
299
|
+
</a>
|
300
|
+
</li>
|
301
|
+
</ul>
|
302
|
+
</nav>
|
303
|
+
|
304
|
+
|
305
|
+
%h2
|
306
|
+
Tabbar sin
|
307
|
+
%span.code <ul>
|
308
|
+
y con botones de texto
|
309
|
+
%nav{"data-type" => "tabbar"}
|
310
|
+
%a
|
311
|
+
%i.icon-facebook
|
312
|
+
Facebook
|
313
|
+
%a
|
314
|
+
%i.icon-twitter
|
315
|
+
Twitter
|
316
|
+
%a
|
317
|
+
%i.icon-comments
|
318
|
+
Comments
|
319
|
+
%a
|
320
|
+
%i.icon-linkedin
|
321
|
+
Linkedin
|
322
|
+
%pre
|
323
|
+
= preserve do
|
324
|
+
:escaped
|
325
|
+
<nav data-type="tabbar">
|
326
|
+
<a>
|
327
|
+
<i></i>
|
328
|
+
button 1
|
329
|
+
</a>
|
330
|
+
<a>
|
331
|
+
<i></i>
|
332
|
+
button 2
|
333
|
+
</a>
|
334
|
+
<a>
|
335
|
+
<i></i>
|
336
|
+
button 3
|
337
|
+
</a>
|
338
|
+
<a>
|
339
|
+
<i></i>
|
340
|
+
button 4
|
341
|
+
</a>
|
342
|
+
</nav>
|
343
|
+
|
@@ -0,0 +1,463 @@
|
|
1
|
+
%h1 TOOLBARS
|
2
|
+
%p
|
3
|
+
Cualquier tipo de barra con herramientas que quieras hacer con Coolstrap debe estar construido con la etiqueta
|
4
|
+
%span.code <nav>
|
5
|
+
a la que se le agrega el atributo
|
6
|
+
%span.code data-type="toolbar"
|
7
|
+
para que se comporte como tal y se diferencie de un nav simple y un tabbar.
|
8
|
+
%h1
|
9
|
+
1. Navs con un grupo de botones centradeos
|
10
|
+
%span.code <div class="control-group autoWith">
|
11
|
+
%p
|
12
|
+
Para agregar un grupo de botones unidos y que permanezca centrado en la barra sin importar el ancho del viewport, estos deben estar encerrados en una etiqueta
|
13
|
+
%span.code <div>
|
14
|
+
con la clase
|
15
|
+
%span.code .control-group.
|
16
|
+
Con este procedimiento cada botón se ajustará al tamaño de su contenido.
|
17
|
+
%h2 Botones con ícono y texto
|
18
|
+
%nav{"data-type" => "toolbar"}
|
19
|
+
.control-group
|
20
|
+
%a
|
21
|
+
%i.icon-facebook
|
22
|
+
%span Facebook
|
23
|
+
%a
|
24
|
+
%i.icon-twitter
|
25
|
+
%span Twitter
|
26
|
+
%a
|
27
|
+
%span Comments
|
28
|
+
%i.icon-comments
|
29
|
+
%pre
|
30
|
+
= preserve do
|
31
|
+
:escaped
|
32
|
+
<nav data-type="toolbar">
|
33
|
+
<div class="control-group">
|
34
|
+
<a>
|
35
|
+
<i></i>
|
36
|
+
<span>button</span>
|
37
|
+
</a>
|
38
|
+
</div>
|
39
|
+
</nav>
|
40
|
+
|
41
|
+
%h2 Botones de texto
|
42
|
+
%nav{"data-type" => "toolbar"}
|
43
|
+
.control-group
|
44
|
+
%a nombre 1
|
45
|
+
%a nombre 3
|
46
|
+
%a nombre 4
|
47
|
+
%pre
|
48
|
+
= preserve do
|
49
|
+
:escaped
|
50
|
+
<nav data-type="toolbar">
|
51
|
+
<div class="control-group">
|
52
|
+
<a>
|
53
|
+
<span>button</span>
|
54
|
+
</a>
|
55
|
+
</div>
|
56
|
+
</nav>
|
57
|
+
%h2 Botones con íconos
|
58
|
+
%nav{"data-type" => "toolbar"}
|
59
|
+
.control-group
|
60
|
+
%a
|
61
|
+
%i.icon-facebook
|
62
|
+
%a
|
63
|
+
%i.icon-twitter
|
64
|
+
%a
|
65
|
+
%i.icon-comments
|
66
|
+
%pre
|
67
|
+
= preserve do
|
68
|
+
:escaped
|
69
|
+
<nav data-type="toolbar">
|
70
|
+
<div class="control-group">
|
71
|
+
<a>
|
72
|
+
<i></i>
|
73
|
+
</a>
|
74
|
+
</div>
|
75
|
+
</nav>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
%h1
|
80
|
+
2. Nav con un
|
81
|
+
%span.code <div class="control-group autoWith">
|
82
|
+
|
83
|
+
%p
|
84
|
+
Si queremos que el mismo
|
85
|
+
%span.code .control-group
|
86
|
+
se ajuste a todo el ancho del viewport es necesario también agregar la clase
|
87
|
+
%span.code .autoWidth
|
88
|
+
Con este procedimiento, sin importar el tamaño del viewport, el grupo de botones se expanderá a todo el ancho, distribuyendo proporcionalmente el tamaño de los botones según el tamaño del contenido que tenga cada uno.
|
89
|
+
%h2 Botones con ícono y texto
|
90
|
+
%nav{"data-type" => "toolbar"}
|
91
|
+
.control-group.autoWidth
|
92
|
+
%a
|
93
|
+
%i.icon-facebook
|
94
|
+
%span button 1
|
95
|
+
%a
|
96
|
+
%i.icon-twitter
|
97
|
+
%span button 2
|
98
|
+
%a
|
99
|
+
%span button 3
|
100
|
+
%i.icon-comments
|
101
|
+
%pre
|
102
|
+
= preserve do
|
103
|
+
:escaped
|
104
|
+
<nav data-type="toolbar">
|
105
|
+
<div class="control-group autoWidth">
|
106
|
+
<a>
|
107
|
+
<i></i>
|
108
|
+
<span>button</span>
|
109
|
+
</a>
|
110
|
+
</div>
|
111
|
+
</nav>
|
112
|
+
|
113
|
+
%h2 Botones de texto
|
114
|
+
%nav{"data-type" => "toolbar"}
|
115
|
+
.control-group.autoWidth
|
116
|
+
%a button 1
|
117
|
+
%a button 2
|
118
|
+
%a button 3
|
119
|
+
%a button 4
|
120
|
+
%pre
|
121
|
+
= preserve do
|
122
|
+
:escaped
|
123
|
+
<nav data-type="toolbar">
|
124
|
+
<div class="control-group autoWidth">
|
125
|
+
<a>
|
126
|
+
<span>button</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
</nav>
|
130
|
+
%h2 Botones con íconos
|
131
|
+
%nav{"data-type" => "toolbar"}
|
132
|
+
.control-group.autoWidth
|
133
|
+
%a
|
134
|
+
%i.icon-facebook
|
135
|
+
%a
|
136
|
+
%i.icon-twitter
|
137
|
+
%a
|
138
|
+
%i.icon-comments
|
139
|
+
%a
|
140
|
+
%i.icon-linkedin
|
141
|
+
%pre
|
142
|
+
= preserve do
|
143
|
+
:escaped
|
144
|
+
<nav data-type="toolbar">
|
145
|
+
<div class="control-group autoWidth">
|
146
|
+
<a>
|
147
|
+
<i></i>
|
148
|
+
</a>
|
149
|
+
</div>
|
150
|
+
</nav>
|
151
|
+
|
152
|
+
|
153
|
+
%h1 3. Navs con un searchbar
|
154
|
+
%p
|
155
|
+
Este proceso es muy sencillo ya que sólo basta con con agregar la etiqueta
|
156
|
+
%span.code <input>
|
157
|
+
dentro de la etiqueta
|
158
|
+
%span.code <nav>
|
159
|
+
ajustándose al ancho total del viewport. Si se quiere agregar un botón, un ícono o cualquier otro elemento, el ancho de la barra de busqueda se ajustará automáticamente a al espacio que le quede, como se muestra en los siguientes ejemplos:
|
160
|
+
%h2 Searchbar a todo el ancho
|
161
|
+
%nav{"data-type" => "toolbar", "data-icon" => ""}
|
162
|
+
%input{:type => "search", :name => "txt"}
|
163
|
+
%pre
|
164
|
+
= preserve do
|
165
|
+
:escaped
|
166
|
+
<nav data-type="toolbar">
|
167
|
+
<input type="search">
|
168
|
+
</nav>
|
169
|
+
%h2 Searchbar con un botón
|
170
|
+
%nav{"data-type" => "toolbar"}
|
171
|
+
%input{:type => "search", :name => "txt"}
|
172
|
+
%a search
|
173
|
+
%pre
|
174
|
+
= preserve do
|
175
|
+
:escaped
|
176
|
+
<nav data-type="toolbar">
|
177
|
+
<input type="search">
|
178
|
+
<a>search</a>
|
179
|
+
</nav>
|
180
|
+
%h2 Searchbar con un ícono y un botón
|
181
|
+
%nav{"data-type" => "toolbar"}
|
182
|
+
%a.onlyIcon
|
183
|
+
%i.icon-facebook
|
184
|
+
%input{:type => "search", :name => "txt"}
|
185
|
+
%a
|
186
|
+
%span search
|
187
|
+
%i.icon-search
|
188
|
+
%pre
|
189
|
+
= preserve do
|
190
|
+
:escaped
|
191
|
+
<nav data-type="toolbar">
|
192
|
+
<a class="onlyIcon">
|
193
|
+
<i></i>
|
194
|
+
</a>
|
195
|
+
<input type="search"/ >
|
196
|
+
<a>
|
197
|
+
<span></span>
|
198
|
+
<i></i>
|
199
|
+
</a>
|
200
|
+
</nav>
|
201
|
+
|
202
|
+
%h1 4. Botones en los lados
|
203
|
+
%p
|
204
|
+
En muchas ocaciones se requieren botones a los lados de la barra de herramientas, en especial con fines de navegación utilizándose el clásico botón back y next. La fijación de estos a los lados dependerá principalmente del elemento que haya al centro, sin ser necesario utilizar floats en el css. Para este caso, los botones de los lados concervarán su tamaño en relación a su contenido y todo lo que esté al centro utilizará el espacio completo restante sin importar el ancho del viewport. Este elemento del centro puede ser un
|
205
|
+
%span.code <hgroup>
|
206
|
+
, un
|
207
|
+
%span.code <div class="control-group autoWith">
|
208
|
+
o un
|
209
|
+
%span.code <div class="flex">
|
210
|
+
para dejar el espacio vacío como se muestra en el siguiente ejemplo:
|
211
|
+
%nav{"data-type" => "toolbar"}
|
212
|
+
%a back
|
213
|
+
.flex
|
214
|
+
%a next
|
215
|
+
%pre
|
216
|
+
= preserve do
|
217
|
+
:escaped
|
218
|
+
<nav data-type="toolbar">
|
219
|
+
<a>back</a>
|
220
|
+
<div class="flex"></div>
|
221
|
+
<a>next</a>
|
222
|
+
</nav>
|
223
|
+
%h2
|
224
|
+
Dos botones
|
225
|
+
%span.code <a>
|
226
|
+
a los lados y un
|
227
|
+
%span.code <div class="control-group autoWith">
|
228
|
+
al centro
|
229
|
+
%nav{"data-type" => "toolbar"}
|
230
|
+
%a back
|
231
|
+
.control-group.autoWidth
|
232
|
+
%a button 1
|
233
|
+
%a button 2
|
234
|
+
%a button 3
|
235
|
+
%a next
|
236
|
+
%pre
|
237
|
+
= preserve do
|
238
|
+
:escaped
|
239
|
+
<nav data-type="toolbar">
|
240
|
+
<div class="control-group autoWidth">
|
241
|
+
<a>button 1</a>
|
242
|
+
<a>button 2</a>
|
243
|
+
<a>button 3</a>
|
244
|
+
<div/>
|
245
|
+
</nav>
|
246
|
+
%h2
|
247
|
+
Iconos a los lados y un
|
248
|
+
%span.code <div class="control-group">
|
249
|
+
centered.
|
250
|
+
%p
|
251
|
+
Acá podemos apreciar como podemos utilizar botones que sólo contengan ícono en los lados agregándole la clase
|
252
|
+
%span.code .onlyIcon
|
253
|
+
a la etiqueta
|
254
|
+
%span.code <a>
|
255
|
+
que los envuelve.
|
256
|
+
Para que el
|
257
|
+
%span.code .control-group
|
258
|
+
se mantenga centrado sin expandirse a todo el ancho del viewport es necesario que esté rodeado por un
|
259
|
+
%span.code <div class="flex">
|
260
|
+
para que siga manteniendo sus propiedades flexibles, tal como se muestra en el ejemplo:
|
261
|
+
%nav{"data-type" => "toolbar"}
|
262
|
+
%a.onlyIcon
|
263
|
+
%i.icon-facebook
|
264
|
+
.flex
|
265
|
+
.control-group
|
266
|
+
%a button 1
|
267
|
+
%a button 2
|
268
|
+
%a button 3
|
269
|
+
.flex
|
270
|
+
%a.onlyIcon <i></i>
|
271
|
+
%pre
|
272
|
+
= preserve do
|
273
|
+
:escaped
|
274
|
+
<nav data-type="toolbar">
|
275
|
+
<div class="flex"><div/>
|
276
|
+
<div class="control-group">
|
277
|
+
<a>button 1</a>
|
278
|
+
<a>button 2</a>
|
279
|
+
<a>button 3</a>
|
280
|
+
<div/>
|
281
|
+
<div class="flex"><div/>
|
282
|
+
</nav>
|
283
|
+
%h2
|
284
|
+
Botones separados proporcionalmente según el tamaño de su contenido con
|
285
|
+
%span.code <div class="flex">
|
286
|
+
entre ellos
|
287
|
+
%nav{"data-type" => "toolbar"}
|
288
|
+
%a back
|
289
|
+
.flex
|
290
|
+
%a button 1
|
291
|
+
.flex
|
292
|
+
%a button 2
|
293
|
+
.flex
|
294
|
+
%a button 3
|
295
|
+
.flex
|
296
|
+
%a next
|
297
|
+
%pre
|
298
|
+
= preserve do
|
299
|
+
:escaped
|
300
|
+
<nav data-type="toolbar">
|
301
|
+
<a>button 1</a>
|
302
|
+
<div class="flex"><div/>
|
303
|
+
<a>button 1</a>
|
304
|
+
<div class="flex"><div/>
|
305
|
+
<a>button 1</a>
|
306
|
+
<div class="flex"><div/>
|
307
|
+
<a>button 1</a>
|
308
|
+
<div class="flex"><div/>
|
309
|
+
<a>button 1</a>
|
310
|
+
</nav>
|
311
|
+
%nav{"data-type" => "toolbar"}
|
312
|
+
%a
|
313
|
+
%i.icon-facebook
|
314
|
+
%span Facebook
|
315
|
+
.flex
|
316
|
+
%a
|
317
|
+
%i.icon-twitter
|
318
|
+
%span Twitter
|
319
|
+
.flex
|
320
|
+
%a
|
321
|
+
%span Comments
|
322
|
+
%i.icon-comments
|
323
|
+
%pre
|
324
|
+
= preserve do
|
325
|
+
:escaped
|
326
|
+
<nav data-type="toolbar">
|
327
|
+
<a>
|
328
|
+
<i></i>
|
329
|
+
<span>button 1</span>
|
330
|
+
</a>
|
331
|
+
<div class="flex"><div/>
|
332
|
+
<a>
|
333
|
+
<i></i>
|
334
|
+
<span>button 2</span>
|
335
|
+
</a>
|
336
|
+
<div class="flex"><div/>
|
337
|
+
<a>
|
338
|
+
<i></i>
|
339
|
+
<span>button 3</span>
|
340
|
+
</a>
|
341
|
+
</nav>
|
342
|
+
%nav{"data-type" => "toolbar"}
|
343
|
+
%a.onlyIcon
|
344
|
+
%i.icon-facebook
|
345
|
+
.flex
|
346
|
+
%a.onlyIcon
|
347
|
+
%i.icon-twitter
|
348
|
+
.flex
|
349
|
+
%a.onlyIcon
|
350
|
+
%i.icon-comments
|
351
|
+
.flex
|
352
|
+
%a.onlyIcon
|
353
|
+
%i.icon-linkedin
|
354
|
+
%pre
|
355
|
+
= preserve do
|
356
|
+
:escaped
|
357
|
+
<nav data-type="toolbar">
|
358
|
+
<a class="onlyIcon">
|
359
|
+
<i></i>
|
360
|
+
</a>
|
361
|
+
<div class="flex"><div/>
|
362
|
+
<a class="onlyIcon">
|
363
|
+
<i></i>
|
364
|
+
</a>
|
365
|
+
<div class="flex"><div/>
|
366
|
+
<a class="onlyIcon">
|
367
|
+
<i></i>
|
368
|
+
</a>
|
369
|
+
<div class="flex"><div/>
|
370
|
+
<a class="onlyIcon">
|
371
|
+
<i></i>
|
372
|
+
</a>
|
373
|
+
</nav>
|
374
|
+
%h2
|
375
|
+
Botones a los lados con un
|
376
|
+
%span.code <div class="control-group">
|
377
|
+
y un
|
378
|
+
%span.code <hgroup>
|
379
|
+
centrado
|
380
|
+
%p
|
381
|
+
Este es un ejemplo de cómo puedes combinar muchas opciones y seguir obteniendo buenos resultados en el orden de los elementos. Fíjate en lo sencillo del marckup y prueba tus opciones para tu aplicación.
|
382
|
+
Es importante usar las etiquetas correctas, como por ejemplo
|
383
|
+
%span.code <i>
|
384
|
+
para los iconos. Si necesitas un grupo de textos o un título utilizas
|
385
|
+
%span.code <hgroup>
|
386
|
+
o
|
387
|
+
%span.code <h1>
|
388
|
+
respectivamente. Estas últimas dos tienen la propiedad de ser elásticas y centrar su contenido para conservar el layout de los elementos de una manera coherente para la aplicación en diseño.
|
389
|
+
%nav{"data-type" => "toolbar"}
|
390
|
+
%a back
|
391
|
+
%hgroup
|
392
|
+
%h1 Rhyboo
|
393
|
+
%h2 The social TV
|
394
|
+
.control-group
|
395
|
+
%a
|
396
|
+
%i.icon-facebook
|
397
|
+
%a
|
398
|
+
%i.icon-twitter
|
399
|
+
%a back
|
400
|
+
%pre
|
401
|
+
= preserve do
|
402
|
+
:escaped
|
403
|
+
<nav data-type="toolbar">
|
404
|
+
<a>back</a>
|
405
|
+
<hgroup></hgroup>
|
406
|
+
<h1>Rhyboo</h1>
|
407
|
+
<h2>The social TV</h2>
|
408
|
+
</hgroup>
|
409
|
+
<div class="control-group">
|
410
|
+
<a>
|
411
|
+
<i></i>
|
412
|
+
<a/>
|
413
|
+
<a>
|
414
|
+
<i></i>
|
415
|
+
<a/>
|
416
|
+
</div>
|
417
|
+
<a>next</a>
|
418
|
+
%h2
|
419
|
+
Botones en los lados y un
|
420
|
+
%span.code <div class="control-group">
|
421
|
+
con texto y un
|
422
|
+
%span.code <div class="loader">
|
423
|
+
que contiene una barra de progreso.
|
424
|
+
%nav{"data-type" => "toolbar"}
|
425
|
+
%a back
|
426
|
+
.content
|
427
|
+
%h2 Descargando 1 de 5
|
428
|
+
.loader
|
429
|
+
.progress
|
430
|
+
%a >
|
431
|
+
%pre
|
432
|
+
= preserve do
|
433
|
+
:escaped
|
434
|
+
<nav data-type="toolbar">
|
435
|
+
<a>back</a>
|
436
|
+
<div class="content">
|
437
|
+
<h1>Descargando 1 de 5</h1>
|
438
|
+
<div class="loader">
|
439
|
+
<div class="progress"></div>
|
440
|
+
</div>
|
441
|
+
</div>
|
442
|
+
</nav>
|
443
|
+
|
444
|
+
%h2 Dos botones a los lados y una barra de progreso
|
445
|
+
%nav{"data-type" => "toolbar"}
|
446
|
+
%a back
|
447
|
+
.content
|
448
|
+
.loader
|
449
|
+
.progress
|
450
|
+
%a >
|
451
|
+
%pre
|
452
|
+
= preserve do
|
453
|
+
:escaped
|
454
|
+
<nav data-type="toolbar">
|
455
|
+
<a>back</a>
|
456
|
+
<div class="content">
|
457
|
+
<div class="loader">
|
458
|
+
<div class="progress"></div>
|
459
|
+
</div>
|
460
|
+
</div>
|
461
|
+
</nav>
|
462
|
+
|
463
|
+
|