padrino-admin 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +3 -3
- data/lib/padrino-admin/access_control.rb +46 -47
- data/lib/padrino-admin/bootstrap-less/alerts.less +29 -55
- data/lib/padrino-admin/bootstrap-less/badges.less +13 -15
- data/lib/padrino-admin/bootstrap-less/bootstrap.less +17 -21
- data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -11
- data/lib/padrino-admin/bootstrap-less/button-groups.less +114 -32
- data/lib/padrino-admin/bootstrap-less/buttons.less +41 -41
- data/lib/padrino-admin/bootstrap-less/carousel.less +43 -18
- data/lib/padrino-admin/bootstrap-less/close.less +4 -4
- data/lib/padrino-admin/bootstrap-less/code.less +8 -10
- data/lib/padrino-admin/bootstrap-less/component-animations.less +10 -4
- data/lib/padrino-admin/bootstrap-less/dropdowns.less +78 -51
- data/lib/padrino-admin/bootstrap-less/forms.less +183 -274
- data/lib/padrino-admin/bootstrap-less/glyphicons.less +232 -0
- data/lib/padrino-admin/bootstrap-less/grid.less +230 -88
- data/lib/padrino-admin/bootstrap-less/input-groups.less +127 -0
- data/lib/padrino-admin/bootstrap-less/jumbotron.less +16 -8
- data/lib/padrino-admin/bootstrap-less/labels.less +25 -37
- data/lib/padrino-admin/bootstrap-less/list-group.less +34 -35
- data/lib/padrino-admin/bootstrap-less/media.less +7 -5
- data/lib/padrino-admin/bootstrap-less/mixins.less +321 -108
- data/lib/padrino-admin/bootstrap-less/modals.less +24 -20
- data/lib/padrino-admin/bootstrap-less/navbar.less +474 -216
- data/lib/padrino-admin/bootstrap-less/navs.less +67 -85
- data/lib/padrino-admin/bootstrap-less/pager.less +4 -4
- data/lib/padrino-admin/bootstrap-less/pagination.less +64 -69
- data/lib/padrino-admin/bootstrap-less/panels.less +114 -62
- data/lib/padrino-admin/bootstrap-less/popovers.less +18 -18
- data/lib/padrino-admin/bootstrap-less/print.less +22 -7
- data/lib/padrino-admin/bootstrap-less/progress-bars.less +10 -33
- data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +141 -40
- data/lib/padrino-admin/bootstrap-less/scaffolding.less +66 -19
- data/lib/padrino-admin/bootstrap-less/tables.less +154 -158
- data/lib/padrino-admin/bootstrap-less/theme.less +232 -0
- data/lib/padrino-admin/bootstrap-less/thumbnails.less +9 -20
- data/lib/padrino-admin/bootstrap-less/tooltip.less +3 -3
- data/lib/padrino-admin/bootstrap-less/type.less +47 -55
- data/lib/padrino-admin/bootstrap-less/utilities.less +2 -2
- data/lib/padrino-admin/bootstrap-less/variables.less +289 -93
- data/lib/padrino-admin/bootstrap-less/wells.less +2 -2
- data/lib/padrino-admin/generators/actions.rb +11 -10
- data/lib/padrino-admin/generators/admin_app.rb +11 -11
- data/lib/padrino-admin/generators/admin_page.rb +9 -9
- data/lib/padrino-admin/generators/orm.rb +6 -7
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +16 -16
- data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +9 -9
- data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +9 -3
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +4 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +9 -5
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +19 -12
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +68 -45
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +6 -7
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +43 -40
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -10
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +6 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +78 -48
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +10 -1
- data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +1 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +622 -334
- data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +2 -2
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +9 -9
- data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -7
- data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/page/controller.rb.tt +3 -3
- data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +9 -7
- data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +2 -2
- data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +2 -2
- data/lib/padrino-admin/helpers/authentication_helpers.rb +35 -35
- data/lib/padrino-admin/helpers/view_helpers.rb +12 -19
- data/lib/padrino-admin/utils/crypt.rb +10 -9
- data/lib/padrino-admin.rb +4 -5
- data/test/fixtures/data_mapper.rb +10 -9
- data/test/generators/test_account_model_generator.rb +2 -2
- metadata +14 -21
@@ -2,69 +2,124 @@
|
|
2
2
|
// Navbars
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
|
+
|
5
6
|
// Wrapper and base class
|
7
|
+
//
|
8
|
+
// Provide a static navbar from which we expand to create full-width, fixed, and
|
9
|
+
// other navbar variations.
|
10
|
+
|
6
11
|
.navbar {
|
7
12
|
position: relative;
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
border-radius: @border-radius-base;
|
13
|
+
z-index: @zindex-navbar;
|
14
|
+
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
|
15
|
+
margin-bottom: @navbar-margin-bottom;
|
16
|
+
border: 1px solid transparent;
|
13
17
|
|
14
18
|
// Prevent floats from breaking the navbar
|
15
19
|
.clearfix();
|
20
|
+
|
21
|
+
@media (min-width: @grid-float-breakpoint) {
|
22
|
+
border-radius: @navbar-border-radius;
|
23
|
+
}
|
16
24
|
}
|
17
25
|
|
18
|
-
// Navbar nav links
|
19
|
-
// -------------------------
|
20
26
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
margin-bottom: 15px;
|
27
|
+
// Navbar heading
|
28
|
+
//
|
29
|
+
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
|
30
|
+
// styling of responsive aspects.
|
26
31
|
|
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
|
-
|
32
|
+
.navbar-header {
|
33
|
+
.clearfix();
|
34
|
+
|
35
|
+
@media (min-width: @grid-float-breakpoint) {
|
36
|
+
float: left;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
// Navbar collapse (body)
|
42
|
+
//
|
43
|
+
// Group your navbar content into this for easy collapsing and expanding across
|
44
|
+
// various device sizes. By default, this content is collapsed when <768px, but
|
45
|
+
// will expand past that for a horizontal display.
|
46
|
+
//
|
47
|
+
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
|
48
|
+
// vertically and include a `max-height` to overflow in case you have too much
|
49
|
+
// content for the user's viewport.
|
50
|
+
|
51
|
+
.navbar-collapse {
|
52
|
+
max-height: 340px;
|
53
|
+
overflow-x: visible;
|
54
|
+
padding-right: @navbar-padding-horizontal;
|
55
|
+
padding-left: @navbar-padding-horizontal;
|
56
|
+
border-top: 1px solid transparent;
|
57
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
|
58
|
+
.clearfix();
|
59
|
+
-webkit-overflow-scrolling: touch;
|
60
|
+
|
61
|
+
&.in {
|
62
|
+
overflow-y: auto;
|
63
|
+
}
|
64
|
+
|
65
|
+
@media (min-width: @grid-float-breakpoint) {
|
66
|
+
width: auto;
|
67
|
+
border-top: 0;
|
68
|
+
box-shadow: none;
|
69
|
+
|
70
|
+
&.collapse {
|
71
|
+
display: block !important;
|
72
|
+
height: auto !important;
|
73
|
+
padding-bottom: 0; // Override default setting
|
74
|
+
overflow: visible !important;
|
75
|
+
}
|
76
|
+
|
77
|
+
&.in {
|
78
|
+
overflow-y: visible;
|
79
|
+
}
|
80
|
+
|
81
|
+
// Account for first and last children spacing
|
82
|
+
.navbar-nav.navbar-left:first-child {
|
83
|
+
margin-left: -@navbar-padding-horizontal;
|
84
|
+
}
|
85
|
+
.navbar-nav.navbar-right:last-child {
|
86
|
+
margin-right: -@navbar-padding-horizontal;
|
87
|
+
}
|
88
|
+
.navbar-text:last-child {
|
89
|
+
margin-right: 0;
|
90
|
+
}
|
56
91
|
}
|
57
92
|
}
|
58
93
|
|
59
94
|
|
95
|
+
// Both navbar header and collapse
|
96
|
+
//
|
97
|
+
// When a container is present, change the behavior of the header and collapse.
|
98
|
+
|
99
|
+
.container > .navbar-header,
|
100
|
+
.container > .navbar-collapse {
|
101
|
+
margin-right: -@navbar-padding-horizontal;
|
102
|
+
margin-left: -@navbar-padding-horizontal;
|
103
|
+
|
104
|
+
@media (min-width: @grid-float-breakpoint) {
|
105
|
+
margin-right: 0;
|
106
|
+
margin-left: 0;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
60
110
|
|
61
111
|
//
|
62
112
|
// Navbar alignment options
|
63
|
-
//
|
113
|
+
//
|
114
|
+
// Display the navbar across the entirity of the page or fixed it to the top or
|
115
|
+
// bottom of the page.
|
64
116
|
|
65
|
-
// Static navbar
|
117
|
+
// Static top (unfixed, but 100% wide) navbar
|
66
118
|
.navbar-static-top {
|
67
|
-
border-
|
119
|
+
border-width: 0 0 1px;
|
120
|
+
@media (min-width: @grid-float-breakpoint) {
|
121
|
+
border-radius: 0;
|
122
|
+
}
|
68
123
|
}
|
69
124
|
|
70
125
|
// Fix the top/bottom navbars when screen real estate supports it
|
@@ -73,10 +128,15 @@
|
|
73
128
|
position: fixed;
|
74
129
|
right: 0;
|
75
130
|
left: 0;
|
76
|
-
|
77
|
-
|
131
|
+
border-width: 0 0 1px;
|
132
|
+
|
133
|
+
// Undo the rounded corners
|
134
|
+
@media (min-width: @grid-float-breakpoint) {
|
135
|
+
border-radius: 0;
|
136
|
+
}
|
78
137
|
}
|
79
138
|
.navbar-fixed-top {
|
139
|
+
z-index: @zindex-navbar-fixed;
|
80
140
|
top: 0;
|
81
141
|
}
|
82
142
|
.navbar-fixed-bottom {
|
@@ -85,105 +145,174 @@
|
|
85
145
|
}
|
86
146
|
|
87
147
|
|
88
|
-
|
89
|
-
//
|
90
|
-
// Navbar optional components
|
91
|
-
// --------------------------------------------------
|
92
|
-
|
93
148
|
// Brand/project name
|
149
|
+
|
94
150
|
.navbar-brand {
|
95
|
-
|
96
|
-
|
97
|
-
margin-left: auto;
|
98
|
-
margin-right: auto;
|
99
|
-
padding: @navbar-padding;
|
151
|
+
float: left;
|
152
|
+
padding: @navbar-padding-vertical @navbar-padding-horizontal;
|
100
153
|
font-size: @font-size-large;
|
101
|
-
font-weight: 500;
|
102
154
|
line-height: @line-height-computed;
|
103
|
-
color: @navbar-brand-color;
|
104
|
-
text-align: center;
|
105
155
|
&:hover,
|
106
156
|
&:focus {
|
107
|
-
color: @navbar-brand-hover-color;
|
108
157
|
text-decoration: none;
|
109
|
-
|
158
|
+
}
|
159
|
+
|
160
|
+
@media (min-width: @grid-float-breakpoint) {
|
161
|
+
.navbar > .container & {
|
162
|
+
margin-left: -@navbar-padding-horizontal;
|
163
|
+
}
|
110
164
|
}
|
111
165
|
}
|
112
166
|
|
113
|
-
|
167
|
+
|
168
|
+
// Navbar toggle
|
169
|
+
//
|
170
|
+
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
171
|
+
// JavaScript plugin.
|
172
|
+
|
114
173
|
.navbar-toggle {
|
115
|
-
position:
|
116
|
-
|
117
|
-
right:
|
118
|
-
padding:
|
174
|
+
position: relative;
|
175
|
+
float: right;
|
176
|
+
margin-right: @navbar-padding-horizontal;
|
177
|
+
padding: 9px 10px;
|
178
|
+
.navbar-vertical-align(34px);
|
119
179
|
background-color: transparent;
|
120
|
-
border: 1px solid
|
121
|
-
border-radius:
|
122
|
-
|
123
|
-
&:hover,
|
124
|
-
&:focus {
|
125
|
-
background-color: #ddd;
|
126
|
-
}
|
180
|
+
border: 1px solid transparent;
|
181
|
+
border-radius: @border-radius-base;
|
127
182
|
|
128
183
|
// Bars
|
129
184
|
.icon-bar {
|
130
185
|
display: block;
|
131
186
|
width: 22px;
|
132
187
|
height: 2px;
|
133
|
-
background-color: #ccc;
|
134
188
|
border-radius: 1px;
|
135
189
|
}
|
136
190
|
.icon-bar + .icon-bar {
|
137
191
|
margin-top: 4px;
|
138
192
|
}
|
193
|
+
|
194
|
+
@media (min-width: @grid-float-breakpoint) {
|
195
|
+
display: none;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
// Navbar nav links
|
201
|
+
//
|
202
|
+
// Builds on top of the `.nav` components with it's own modifier class to make
|
203
|
+
// the nav the full height of the horizontal nav (above 768px).
|
204
|
+
|
205
|
+
.navbar-nav {
|
206
|
+
margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
|
207
|
+
|
208
|
+
> li > a {
|
209
|
+
padding-top: 10px;
|
210
|
+
padding-bottom: 10px;
|
211
|
+
line-height: @line-height-computed;
|
212
|
+
}
|
213
|
+
|
214
|
+
@media (max-width: @screen-xs-max) {
|
215
|
+
// Dropdowns get custom display when collapsed
|
216
|
+
.open .dropdown-menu {
|
217
|
+
position: static;
|
218
|
+
float: none;
|
219
|
+
width: auto;
|
220
|
+
margin-top: 0;
|
221
|
+
background-color: transparent;
|
222
|
+
border: 0;
|
223
|
+
box-shadow: none;
|
224
|
+
> li > a,
|
225
|
+
.dropdown-header {
|
226
|
+
padding: 5px 15px 5px 25px;
|
227
|
+
}
|
228
|
+
> li > a {
|
229
|
+
line-height: @line-height-computed;
|
230
|
+
&:hover,
|
231
|
+
&:focus {
|
232
|
+
background-image: none;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
// Uncollapse the nav
|
239
|
+
@media (min-width: @grid-float-breakpoint) {
|
240
|
+
float: left;
|
241
|
+
margin: 0;
|
242
|
+
|
243
|
+
> li {
|
244
|
+
float: left;
|
245
|
+
> a {
|
246
|
+
padding-top: ((@navbar-height - @line-height-computed) / 2);
|
247
|
+
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
139
252
|
}
|
140
253
|
|
254
|
+
|
255
|
+
// Component alignment
|
256
|
+
//
|
257
|
+
// Repurpose the pull utilities as their own navbar utilities to avoid specifity
|
258
|
+
// issues with parents and chaining. Only do this when the navbar is uncollapsed
|
259
|
+
// though so that navbar contents properly stack and align in mobile.
|
260
|
+
|
261
|
+
@media (min-width: @grid-float-breakpoint) {
|
262
|
+
.navbar-left { .pull-left(); }
|
263
|
+
.navbar-right { .pull-right(); }
|
264
|
+
}
|
265
|
+
|
266
|
+
|
141
267
|
// Navbar form
|
268
|
+
//
|
269
|
+
// Extension of the `.form-inline` with some extra flavor for optimum display in
|
270
|
+
// our navbars.
|
271
|
+
|
142
272
|
.navbar-form {
|
273
|
+
margin-left: -@navbar-padding-horizontal;
|
274
|
+
margin-right: -@navbar-padding-horizontal;
|
275
|
+
padding: 10px @navbar-padding-horizontal;
|
276
|
+
border-top: 1px solid transparent;
|
277
|
+
border-bottom: 1px solid transparent;
|
278
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
|
279
|
+
.box-shadow(@shadow);
|
280
|
+
|
281
|
+
// Mixin behavior for optimum display
|
143
282
|
.form-inline();
|
144
|
-
|
283
|
+
|
284
|
+
.form-group {
|
285
|
+
@media (max-width: @screen-xs-max) {
|
286
|
+
margin-bottom: 5px;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
// Vertically center in expanded, horizontal navbar
|
291
|
+
.navbar-vertical-align(@input-height-base);
|
292
|
+
|
293
|
+
// Undo 100% width for pull classes
|
294
|
+
@media (min-width: @grid-float-breakpoint) {
|
295
|
+
width: auto;
|
296
|
+
border: 0;
|
297
|
+
margin-left: 0;
|
298
|
+
margin-right: 0;
|
299
|
+
padding-top: 0;
|
300
|
+
padding-bottom: 0;
|
301
|
+
.box-shadow(none);
|
302
|
+
}
|
145
303
|
}
|
146
304
|
|
305
|
+
|
147
306
|
// Dropdown menus
|
148
307
|
|
149
308
|
// Menu position and menu carets
|
150
309
|
.navbar-nav > li > .dropdown-menu {
|
151
310
|
margin-top: 0;
|
152
|
-
border-top-
|
153
|
-
border-top-right-radius: 0;
|
311
|
+
.border-top-radius(0);
|
154
312
|
}
|
155
313
|
// Menu position and menu caret support for dropups via extra dropup class
|
156
314
|
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
|
157
|
-
border-bottom-
|
158
|
-
border-bottom-right-radius: 0;
|
159
|
-
}
|
160
|
-
|
161
|
-
// Dropdown menu items and carets
|
162
|
-
.navbar-nav {
|
163
|
-
// Caret should match text color on hover
|
164
|
-
> .dropdown > a:hover .caret,
|
165
|
-
> .dropdown > a:focus .caret {
|
166
|
-
border-top-color: @navbar-link-hover-color;
|
167
|
-
border-bottom-color: @navbar-link-hover-color;
|
168
|
-
}
|
169
|
-
|
170
|
-
// Remove background color from open dropdown
|
171
|
-
> .open > a,
|
172
|
-
> .open > a:hover,
|
173
|
-
> .open > a:focus {
|
174
|
-
background-color: @navbar-link-active-bg;
|
175
|
-
color: @navbar-link-active-color;
|
176
|
-
}
|
177
|
-
> .dropdown > a .caret {
|
178
|
-
border-top-color: @navbar-link-color;
|
179
|
-
border-bottom-color: @navbar-link-color;
|
180
|
-
}
|
181
|
-
> .open > a .caret,
|
182
|
-
> .open > a:hover .caret,
|
183
|
-
> .open > a:focus .caret {
|
184
|
-
border-top-color: @navbar-link-active-color;
|
185
|
-
border-bottom-color: @navbar-link-active-color;
|
186
|
-
}
|
315
|
+
.border-bottom-radius(0);
|
187
316
|
}
|
188
317
|
|
189
318
|
// Right aligned menus need alt position
|
@@ -194,170 +323,299 @@
|
|
194
323
|
}
|
195
324
|
|
196
325
|
|
326
|
+
// Buttons in navbars
|
327
|
+
//
|
328
|
+
// Vertically center a button within a navbar (when *not* in a form).
|
197
329
|
|
198
|
-
|
330
|
+
.navbar-btn {
|
331
|
+
.navbar-vertical-align(@input-height-base);
|
332
|
+
}
|
333
|
+
|
334
|
+
|
335
|
+
// Text in navbars
|
336
|
+
//
|
337
|
+
// Add a class to make any element properly align itself vertically within the navbars.
|
338
|
+
|
339
|
+
.navbar-text {
|
340
|
+
float: left;
|
341
|
+
.navbar-vertical-align(@line-height-computed);
|
342
|
+
|
343
|
+
@media (min-width: @grid-float-breakpoint) {
|
344
|
+
margin-left: @navbar-padding-horizontal;
|
345
|
+
margin-right: @navbar-padding-horizontal;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
|
349
|
+
// Alternate navbars
|
199
350
|
// --------------------------------------------------
|
200
351
|
|
201
|
-
|
202
|
-
|
352
|
+
// Default navbar
|
353
|
+
.navbar-default {
|
354
|
+
background-color: @navbar-default-bg;
|
355
|
+
border-color: @navbar-default-border;
|
203
356
|
|
204
357
|
.navbar-brand {
|
205
|
-
color: @navbar-
|
358
|
+
color: @navbar-default-brand-color;
|
206
359
|
&:hover,
|
207
360
|
&:focus {
|
208
|
-
color: @navbar-
|
209
|
-
background-color: @navbar-
|
361
|
+
color: @navbar-default-brand-hover-color;
|
362
|
+
background-color: @navbar-default-brand-hover-bg;
|
210
363
|
}
|
211
364
|
}
|
212
365
|
|
213
366
|
.navbar-text {
|
214
|
-
color: @navbar-
|
367
|
+
color: @navbar-default-color;
|
215
368
|
}
|
216
369
|
|
217
370
|
.navbar-nav {
|
218
371
|
> li > a {
|
219
|
-
color: @navbar-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
372
|
+
color: @navbar-default-link-color;
|
373
|
+
|
374
|
+
&:hover,
|
375
|
+
&:focus {
|
376
|
+
color: @navbar-default-link-hover-color;
|
377
|
+
background-color: @navbar-default-link-hover-bg;
|
378
|
+
}
|
225
379
|
}
|
226
|
-
> .active > a
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
380
|
+
> .active > a {
|
381
|
+
&,
|
382
|
+
&:hover,
|
383
|
+
&:focus {
|
384
|
+
color: @navbar-default-link-active-color;
|
385
|
+
background-color: @navbar-default-link-active-bg;
|
386
|
+
}
|
231
387
|
}
|
232
|
-
> .disabled > a
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
388
|
+
> .disabled > a {
|
389
|
+
&,
|
390
|
+
&:hover,
|
391
|
+
&:focus {
|
392
|
+
color: @navbar-default-link-disabled-color;
|
393
|
+
background-color: @navbar-default-link-disabled-bg;
|
394
|
+
}
|
237
395
|
}
|
238
396
|
}
|
239
397
|
|
240
|
-
// Darken the responsive nav toggle
|
241
398
|
.navbar-toggle {
|
242
|
-
border-color:
|
399
|
+
border-color: @navbar-default-toggle-border-color;
|
243
400
|
&:hover,
|
244
401
|
&:focus {
|
245
|
-
background-color:
|
402
|
+
background-color: @navbar-default-toggle-hover-bg;
|
246
403
|
}
|
247
404
|
.icon-bar {
|
248
|
-
background-color:
|
405
|
+
background-color: @navbar-default-toggle-icon-bar-bg;
|
249
406
|
}
|
250
407
|
}
|
251
408
|
|
252
|
-
|
409
|
+
.navbar-collapse,
|
410
|
+
.navbar-form {
|
411
|
+
border-color: darken(@navbar-default-bg, 7%);
|
412
|
+
}
|
413
|
+
|
414
|
+
// Dropdown menu items and carets
|
253
415
|
.navbar-nav {
|
254
|
-
|
255
|
-
> .
|
256
|
-
> .
|
257
|
-
|
258
|
-
color: @navbar-
|
416
|
+
// Caret should match text color on hover
|
417
|
+
> .dropdown > a:hover .caret,
|
418
|
+
> .dropdown > a:focus .caret {
|
419
|
+
border-top-color: @navbar-default-link-hover-color;
|
420
|
+
border-bottom-color: @navbar-default-link-hover-color;
|
259
421
|
}
|
260
|
-
|
261
|
-
|
262
|
-
|
422
|
+
|
423
|
+
// Remove background color from open dropdown
|
424
|
+
> .open > a {
|
425
|
+
&,
|
426
|
+
&:hover,
|
427
|
+
&:focus {
|
428
|
+
background-color: @navbar-default-link-active-bg;
|
429
|
+
color: @navbar-default-link-active-color;
|
430
|
+
.caret {
|
431
|
+
border-top-color: @navbar-default-link-active-color;
|
432
|
+
border-bottom-color: @navbar-default-link-active-color;
|
433
|
+
}
|
434
|
+
}
|
263
435
|
}
|
264
436
|
> .dropdown > a .caret {
|
265
|
-
border-top-color: @navbar-
|
266
|
-
border-bottom-color: @navbar-
|
267
|
-
}
|
268
|
-
> .open > a .caret,
|
269
|
-
> .open > a:hover .caret,
|
270
|
-
> .open > a:focus .caret {
|
271
|
-
border-top-color: @navbar-inverse-link-active-color;
|
272
|
-
border-bottom-color: @navbar-inverse-link-active-color;
|
437
|
+
border-top-color: @navbar-default-link-color;
|
438
|
+
border-bottom-color: @navbar-default-link-color;
|
273
439
|
}
|
274
440
|
|
441
|
+
|
442
|
+
@media (max-width: @screen-xs-max) {
|
443
|
+
// Dropdowns get custom display when collapsed
|
444
|
+
.open .dropdown-menu {
|
445
|
+
> li > a {
|
446
|
+
color: @navbar-default-link-color;
|
447
|
+
&:hover,
|
448
|
+
&:focus {
|
449
|
+
color: @navbar-default-link-hover-color;
|
450
|
+
background-color: @navbar-default-link-hover-bg;
|
451
|
+
}
|
452
|
+
}
|
453
|
+
> .active > a {
|
454
|
+
&,
|
455
|
+
&:hover,
|
456
|
+
&:focus {
|
457
|
+
color: @navbar-default-link-active-color;
|
458
|
+
background-color: @navbar-default-link-active-bg;
|
459
|
+
}
|
460
|
+
}
|
461
|
+
> .disabled > a {
|
462
|
+
&,
|
463
|
+
&:hover,
|
464
|
+
&:focus {
|
465
|
+
color: @navbar-default-link-disabled-color;
|
466
|
+
background-color: @navbar-default-link-disabled-bg;
|
467
|
+
}
|
468
|
+
}
|
469
|
+
}
|
470
|
+
}
|
275
471
|
}
|
276
|
-
}
|
277
472
|
|
278
473
|
|
474
|
+
// Links in navbars
|
475
|
+
//
|
476
|
+
// Add a class to ensure links outside the navbar nav are colored correctly.
|
279
477
|
|
280
|
-
|
281
|
-
|
478
|
+
.navbar-link {
|
479
|
+
color: @navbar-default-link-color;
|
480
|
+
&:hover {
|
481
|
+
color: @navbar-default-link-hover-color;
|
482
|
+
}
|
483
|
+
}
|
282
484
|
|
283
|
-
|
485
|
+
}
|
486
|
+
|
487
|
+
// Inverse navbar
|
488
|
+
|
489
|
+
.navbar-inverse {
|
490
|
+
background-color: @navbar-inverse-bg;
|
491
|
+
border-color: @navbar-inverse-border;
|
284
492
|
|
285
493
|
.navbar-brand {
|
286
|
-
|
287
|
-
|
288
|
-
|
494
|
+
color: @navbar-inverse-brand-color;
|
495
|
+
&:hover,
|
496
|
+
&:focus {
|
497
|
+
color: @navbar-inverse-brand-hover-color;
|
498
|
+
background-color: @navbar-inverse-brand-hover-bg;
|
499
|
+
}
|
289
500
|
}
|
501
|
+
|
502
|
+
.navbar-text {
|
503
|
+
color: @navbar-inverse-color;
|
504
|
+
}
|
505
|
+
|
290
506
|
.navbar-nav {
|
291
|
-
|
292
|
-
|
293
|
-
margin-top: 0;
|
294
|
-
margin-bottom: 0;
|
507
|
+
> li > a {
|
508
|
+
color: @navbar-inverse-link-color;
|
295
509
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
510
|
+
&:hover,
|
511
|
+
&:focus {
|
512
|
+
color: @navbar-inverse-link-hover-color;
|
513
|
+
background-color: @navbar-inverse-link-hover-bg;
|
300
514
|
}
|
301
515
|
}
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
516
|
+
> .active > a {
|
517
|
+
&,
|
518
|
+
&:hover,
|
519
|
+
&:focus {
|
520
|
+
color: @navbar-inverse-link-active-color;
|
521
|
+
background-color: @navbar-inverse-link-active-bg;
|
522
|
+
}
|
523
|
+
}
|
524
|
+
> .disabled > a {
|
525
|
+
&,
|
526
|
+
&:hover,
|
527
|
+
&:focus {
|
528
|
+
color: @navbar-inverse-link-disabled-color;
|
529
|
+
background-color: @navbar-inverse-link-disabled-bg;
|
530
|
+
}
|
306
531
|
}
|
307
532
|
}
|
308
533
|
|
309
|
-
//
|
534
|
+
// Darken the responsive nav toggle
|
310
535
|
.navbar-toggle {
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
536
|
+
border-color: @navbar-inverse-toggle-border-color;
|
537
|
+
&:hover,
|
538
|
+
&:focus {
|
539
|
+
background-color: @navbar-inverse-toggle-hover-bg;
|
540
|
+
}
|
541
|
+
.icon-bar {
|
542
|
+
background-color: @navbar-inverse-toggle-icon-bar-bg;
|
543
|
+
}
|
319
544
|
}
|
320
545
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
// Buttons in navbars
|
326
|
-
//
|
327
|
-
// Vertically center a button within a navbar (when *not* in a form).
|
328
|
-
|
329
|
-
.navbar-btn {
|
330
|
-
margin-top: ((@navbar-height - @input-height-base) / 2);
|
331
|
-
}
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
// Text in navbars
|
336
|
-
//
|
337
|
-
// Add a class to make any element properly align itself vertically within the navbars.
|
338
|
-
|
339
|
-
.navbar-text {
|
340
|
-
.navbar-vertical-align(@line-height-computed);
|
341
|
-
}
|
342
|
-
|
343
|
-
|
546
|
+
.navbar-collapse,
|
547
|
+
.navbar-form {
|
548
|
+
border-color: darken(@navbar-inverse-bg, 7%);
|
549
|
+
}
|
344
550
|
|
345
|
-
//
|
346
|
-
|
347
|
-
|
551
|
+
// Dropdowns
|
552
|
+
.navbar-nav {
|
553
|
+
> .open > a {
|
554
|
+
&,
|
555
|
+
&:hover,
|
556
|
+
&:focus {
|
557
|
+
background-color: @navbar-inverse-link-active-bg;
|
558
|
+
color: @navbar-inverse-link-active-color;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
> .dropdown > a:hover .caret {
|
562
|
+
border-top-color: @navbar-inverse-link-hover-color;
|
563
|
+
border-bottom-color: @navbar-inverse-link-hover-color;
|
564
|
+
}
|
565
|
+
> .dropdown > a .caret {
|
566
|
+
border-top-color: @navbar-inverse-link-color;
|
567
|
+
border-bottom-color: @navbar-inverse-link-color;
|
568
|
+
}
|
569
|
+
> .open > a {
|
570
|
+
&,
|
571
|
+
&:hover,
|
572
|
+
&:focus {
|
573
|
+
.caret {
|
574
|
+
border-top-color: @navbar-inverse-link-active-color;
|
575
|
+
border-bottom-color: @navbar-inverse-link-active-color;
|
576
|
+
}
|
577
|
+
}
|
578
|
+
}
|
348
579
|
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
580
|
+
@media (max-width: @screen-xs-max) {
|
581
|
+
// Dropdowns get custom display
|
582
|
+
.open .dropdown-menu {
|
583
|
+
> .dropdown-header {
|
584
|
+
border-color: @navbar-inverse-border;
|
585
|
+
}
|
586
|
+
> li > a {
|
587
|
+
color: @navbar-inverse-link-color;
|
588
|
+
&:hover,
|
589
|
+
&:focus {
|
590
|
+
color: @navbar-inverse-link-hover-color;
|
591
|
+
background-color: @navbar-inverse-link-hover-bg;
|
592
|
+
}
|
593
|
+
}
|
594
|
+
> .active > a {
|
595
|
+
&,
|
596
|
+
&:hover,
|
597
|
+
&:focus {
|
598
|
+
color: @navbar-inverse-link-active-color;
|
599
|
+
background-color: @navbar-inverse-link-active-bg;
|
600
|
+
}
|
601
|
+
}
|
602
|
+
> .disabled > a {
|
603
|
+
&,
|
604
|
+
&:hover,
|
605
|
+
&:focus {
|
606
|
+
color: @navbar-inverse-link-disabled-color;
|
607
|
+
background-color: @navbar-inverse-link-disabled-bg;
|
608
|
+
}
|
609
|
+
}
|
610
|
+
}
|
611
|
+
}
|
354
612
|
}
|
355
|
-
}
|
356
613
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
614
|
+
.navbar-link {
|
615
|
+
color: @navbar-inverse-link-color;
|
616
|
+
&:hover {
|
617
|
+
color: @navbar-inverse-link-hover-color;
|
618
|
+
}
|
362
619
|
}
|
620
|
+
|
363
621
|
}
|