twitter-bootstrap3-rails 3.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +708 -0
- data/Rakefile +46 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +399 -0
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/twitter/bootstrap.js +12 -0
- data/app/assets/javascripts/twitter/bootstrap/affix.js +126 -0
- data/app/assets/javascripts/twitter/bootstrap/alert.js +98 -0
- data/app/assets/javascripts/twitter/bootstrap/button.js +109 -0
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +217 -0
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +179 -0
- data/app/assets/javascripts/twitter/bootstrap/dropdown.js +154 -0
- data/app/assets/javascripts/twitter/bootstrap/modal.js +244 -0
- data/app/assets/javascripts/twitter/bootstrap/popover.js +117 -0
- data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +158 -0
- data/app/assets/javascripts/twitter/bootstrap/tab.js +135 -0
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +382 -0
- data/app/assets/javascripts/twitter/bootstrap/transition.js +56 -0
- data/app/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +787 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +146 -0
- data/app/helpers/badge_label_helper.rb +16 -0
- data/app/helpers/bootstrap_flash_helper.rb +29 -0
- data/app/helpers/flash_block_helper.rb +17 -0
- data/app/helpers/glyph_helper.rb +17 -0
- data/app/helpers/modal_helper.rb +59 -0
- data/app/helpers/navbar_helper.rb +195 -0
- data/app/helpers/twitter_breadcrumbs_helper.rb +10 -0
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +12 -0
- data/lib/generators/bootstrap/install/install_generator.rb +82 -0
- data/lib/generators/bootstrap/install/templates/application.css +7 -0
- data/lib/generators/bootstrap/install/templates/application.js +10 -0
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +3 -0
- data/lib/generators/bootstrap/install/templates/bootstrap.js +4 -0
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +7 -0
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +29 -0
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +18 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +20 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +85 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +50 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +52 -0
- data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +28 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +10 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +5 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
- data/lib/generators/bootstrap/themed/templates/new.html.erb +5 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +21 -0
- data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +16 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +13 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +10 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +148 -0
- data/lib/twitter-bootstrap-rails.rb +10 -0
- data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
- data/lib/twitter/bootstrap/rails/engine.rb +33 -0
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +42 -0
- data/lib/twitter/bootstrap/rails/version.rb +7 -0
- data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +22 -0
- data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
- data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +331 -0
- data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +47 -0
- data/spec/spec_helper.rb +11 -0
- data/test/lib/breadcrumbs_test.rb +75 -0
- data/test/test_helper.rb +11 -0
- data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
- data/vendor/static-source/bootstrap.less +1 -0
- data/vendor/static-source/fontawesome.less +9 -0
- data/vendor/static-source/sprites.less +6 -0
- data/vendor/toolkit/fontawesome/bootstrap.less +84 -0
- data/vendor/toolkit/fontawesome/core.less +129 -0
- data/vendor/toolkit/fontawesome/extras.less +93 -0
- data/vendor/toolkit/fontawesome/font-awesome-ie7.less +1953 -0
- data/vendor/toolkit/fontawesome/font-awesome.less +33 -0
- data/vendor/toolkit/fontawesome/icons.less +381 -0
- data/vendor/toolkit/fontawesome/mixins.less +48 -0
- data/vendor/toolkit/fontawesome/path.less +14 -0
- data/vendor/toolkit/fontawesome/variables.less +735 -0
- data/vendor/toolkit/twitter/bootstrap/alerts.less +71 -0
- data/vendor/toolkit/twitter/bootstrap/badges.less +51 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +23 -0
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +244 -0
- data/vendor/toolkit/twitter/bootstrap/buttons.less +159 -0
- data/vendor/toolkit/twitter/bootstrap/carousel.less +204 -0
- data/vendor/toolkit/twitter/bootstrap/close.less +33 -0
- data/vendor/toolkit/twitter/bootstrap/code.less +56 -0
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +29 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +176 -0
- data/vendor/toolkit/twitter/bootstrap/forms.less +332 -0
- data/vendor/toolkit/twitter/bootstrap/grid.less +340 -0
- data/vendor/toolkit/twitter/bootstrap/input-groups.less +127 -0
- data/vendor/toolkit/twitter/bootstrap/jumbotron.less +29 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +54 -0
- data/vendor/toolkit/twitter/bootstrap/list-group.less +88 -0
- data/vendor/toolkit/twitter/bootstrap/media.less +56 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +693 -0
- data/vendor/toolkit/twitter/bootstrap/modals.less +133 -0
- data/vendor/toolkit/twitter/bootstrap/navbar.less +559 -0
- data/vendor/toolkit/twitter/bootstrap/navs.less +228 -0
- data/vendor/toolkit/twitter/bootstrap/normalize.less +396 -0
- data/vendor/toolkit/twitter/bootstrap/pager.less +55 -0
- data/vendor/toolkit/twitter/bootstrap/pagination.less +72 -0
- data/vendor/toolkit/twitter/bootstrap/panels.less +128 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
- data/vendor/toolkit/twitter/bootstrap/print.less +100 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +99 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +149 -0
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +111 -0
- data/vendor/toolkit/twitter/bootstrap/tables.less +211 -0
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +42 -0
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +95 -0
- data/vendor/toolkit/twitter/bootstrap/type.less +238 -0
- data/vendor/toolkit/twitter/bootstrap/utilities.less +42 -0
- data/vendor/toolkit/twitter/bootstrap/variables.less +607 -0
- data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
- data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
- metadata +297 -0
@@ -0,0 +1,133 @@
|
|
1
|
+
//
|
2
|
+
// Modals
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// .modal-open - body class for killing the scroll
|
6
|
+
// .modal - container to scroll within
|
7
|
+
// .modal-dialog - positioning shell for the actual modal
|
8
|
+
// .modal-content - actual modal w/ bg and corners and shit
|
9
|
+
|
10
|
+
// Kill the scroll on the body
|
11
|
+
.modal-open {
|
12
|
+
overflow: hidden;
|
13
|
+
}
|
14
|
+
|
15
|
+
// Container that the modal scrolls within
|
16
|
+
.modal {
|
17
|
+
display: none;
|
18
|
+
overflow: auto;
|
19
|
+
overflow-y: scroll;
|
20
|
+
position: fixed;
|
21
|
+
top: 0;
|
22
|
+
right: 0;
|
23
|
+
bottom: 0;
|
24
|
+
left: 0;
|
25
|
+
z-index: @zindex-modal-background;
|
26
|
+
|
27
|
+
// When fading in the modal, animate it to slide down
|
28
|
+
&.fade .modal-dialog {
|
29
|
+
.translate(0, -25%);
|
30
|
+
.transition-transform(~"0.3s ease-out");
|
31
|
+
}
|
32
|
+
&.in .modal-dialog { .translate(0, 0)}
|
33
|
+
}
|
34
|
+
|
35
|
+
// Shell div to position the modal with bottom padding
|
36
|
+
.modal-dialog {
|
37
|
+
margin-left: auto;
|
38
|
+
margin-right: auto;
|
39
|
+
width: auto;
|
40
|
+
padding: 10px;
|
41
|
+
z-index: (@zindex-modal-background + 10);
|
42
|
+
}
|
43
|
+
|
44
|
+
// Actual modal
|
45
|
+
.modal-content {
|
46
|
+
position: relative;
|
47
|
+
background-color: @modal-content-bg;
|
48
|
+
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
|
49
|
+
border: 1px solid @modal-content-border-color;
|
50
|
+
border-radius: @border-radius-large;
|
51
|
+
.box-shadow(0 3px 9px rgba(0,0,0,.5));
|
52
|
+
background-clip: padding-box;
|
53
|
+
// Remove focus outline from opened modal
|
54
|
+
outline: none;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Modal background
|
58
|
+
.modal-backdrop {
|
59
|
+
position: fixed;
|
60
|
+
top: 0;
|
61
|
+
right: 0;
|
62
|
+
bottom: 0;
|
63
|
+
left: 0;
|
64
|
+
z-index: (@zindex-modal-background - 10);
|
65
|
+
background-color: @modal-backdrop-bg;
|
66
|
+
// Fade for backdrop
|
67
|
+
&.fade { .opacity(0); }
|
68
|
+
&.in { .opacity(.5); }
|
69
|
+
}
|
70
|
+
|
71
|
+
// Modal header
|
72
|
+
// Top section of the modal w/ title and dismiss
|
73
|
+
.modal-header {
|
74
|
+
padding: @modal-title-padding;
|
75
|
+
border-bottom: 1px solid @modal-header-border-color;
|
76
|
+
min-height: (@modal-title-padding + @modal-title-line-height);
|
77
|
+
}
|
78
|
+
// Close icon
|
79
|
+
.modal-header .close {
|
80
|
+
margin-top: -2px;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Title text within header
|
84
|
+
.modal-title {
|
85
|
+
margin: 0;
|
86
|
+
line-height: @modal-title-line-height;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Modal body
|
90
|
+
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
91
|
+
.modal-body {
|
92
|
+
position: relative;
|
93
|
+
padding: @modal-inner-padding;
|
94
|
+
}
|
95
|
+
|
96
|
+
// Footer (for actions)
|
97
|
+
.modal-footer {
|
98
|
+
margin-top: 15px;
|
99
|
+
padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
|
100
|
+
text-align: right; // right align buttons
|
101
|
+
border-top: 1px solid @modal-footer-border-color;
|
102
|
+
.clearfix(); // clear it in case folks use .pull-* classes on buttons
|
103
|
+
|
104
|
+
// Properly space out buttons
|
105
|
+
.btn + .btn {
|
106
|
+
margin-left: 5px;
|
107
|
+
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
108
|
+
}
|
109
|
+
// but override that for button groups
|
110
|
+
.btn-group .btn + .btn {
|
111
|
+
margin-left: -1px;
|
112
|
+
}
|
113
|
+
// and override it for block buttons as well
|
114
|
+
.btn-block + .btn-block {
|
115
|
+
margin-left: 0;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
// Scale up the modal
|
120
|
+
@media screen and (min-width: @screen-tablet) {
|
121
|
+
|
122
|
+
.modal-dialog {
|
123
|
+
left: 50%;
|
124
|
+
right: auto;
|
125
|
+
width: 600px;
|
126
|
+
padding-top: 30px;
|
127
|
+
padding-bottom: 30px;
|
128
|
+
}
|
129
|
+
.modal-content {
|
130
|
+
.box-shadow(0 5px 15px rgba(0,0,0,.5));
|
131
|
+
}
|
132
|
+
|
133
|
+
}
|
@@ -0,0 +1,559 @@
|
|
1
|
+
//
|
2
|
+
// Navbars
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
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
|
+
|
11
|
+
.navbar {
|
12
|
+
position: relative;
|
13
|
+
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
|
14
|
+
margin-bottom: @navbar-margin-bottom;
|
15
|
+
background-color: @navbar-bg;
|
16
|
+
border: 1px solid @navbar-border;
|
17
|
+
|
18
|
+
// Prevent floats from breaking the navbar
|
19
|
+
.clearfix();
|
20
|
+
|
21
|
+
@media (min-width: @grid-float-breakpoint) {
|
22
|
+
border-radius: @navbar-border-radius;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
// Navbar heading
|
28
|
+
//
|
29
|
+
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
|
30
|
+
// styling of responsive aspects.
|
31
|
+
|
32
|
+
.navbar-header {
|
33
|
+
padding-left: @navbar-padding-horizontal;
|
34
|
+
padding-right: @navbar-padding-horizontal;
|
35
|
+
.clearfix();
|
36
|
+
|
37
|
+
@media (min-width: @grid-float-breakpoint) {
|
38
|
+
float: left;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
// Navbar collapse (body)
|
44
|
+
//
|
45
|
+
// Group your navbar content into this for easy collapsing and expanding across
|
46
|
+
// various device sizes. By default, this content is collapsed when <768px, but
|
47
|
+
// will expand past that for a horizontal display.
|
48
|
+
//
|
49
|
+
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
|
50
|
+
// vertically and include a `max-height` to overflow in case you have too much
|
51
|
+
// content for the user's viewport.
|
52
|
+
|
53
|
+
.navbar-collapse {
|
54
|
+
padding: 5px @navbar-padding-horizontal;
|
55
|
+
border-top: 1px solid darken(@navbar-bg, 7%);
|
56
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
|
57
|
+
// Clear floated elements and prevent collapsing of padding
|
58
|
+
.clearfix();
|
59
|
+
|
60
|
+
// This is not automatically added to the `.navbar-fixed-top` because it causes
|
61
|
+
// z-index bugs in iOS7 (possibly earlier).
|
62
|
+
max-height: 340px;
|
63
|
+
overflow-x: visible;
|
64
|
+
overflow-y: auto;
|
65
|
+
-webkit-overflow-scrolling: touch;
|
66
|
+
|
67
|
+
@media (min-width: @grid-float-breakpoint) {
|
68
|
+
width: auto;
|
69
|
+
padding-top: 0;
|
70
|
+
padding-bottom: 0;
|
71
|
+
border-top: 0;
|
72
|
+
box-shadow: none;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
//
|
78
|
+
// Navbar alignment options
|
79
|
+
//
|
80
|
+
// Display the navbar across the entirity of the page or fixed it to the top or
|
81
|
+
// bottom of the page.
|
82
|
+
|
83
|
+
// Static top (unfixed, but 100% wide) navbar
|
84
|
+
.navbar-static-top {
|
85
|
+
@media (min-width: @grid-float-breakpoint) {
|
86
|
+
border-width: 0 0 1px;
|
87
|
+
border-radius: 0;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
// Fix the top/bottom navbars when screen real estate supports it
|
92
|
+
.navbar-fixed-top,
|
93
|
+
.navbar-fixed-bottom {
|
94
|
+
position: fixed;
|
95
|
+
right: 0;
|
96
|
+
left: 0;
|
97
|
+
z-index: @zindex-navbar-fixed;
|
98
|
+
border-width: 0 0 1px;
|
99
|
+
|
100
|
+
// Undo the rounded corners
|
101
|
+
@media (min-width: @grid-float-breakpoint) {
|
102
|
+
border-radius: 0;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
.navbar-fixed-top {
|
106
|
+
top: 0;
|
107
|
+
}
|
108
|
+
.navbar-fixed-bottom {
|
109
|
+
bottom: 0;
|
110
|
+
margin-bottom: 0; // override .navbar defaults
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
// Brand/project name
|
115
|
+
|
116
|
+
.navbar-brand {
|
117
|
+
float: left;
|
118
|
+
margin-right: (@navbar-padding-horizontal / 2);
|
119
|
+
padding-top: @navbar-padding-vertical;
|
120
|
+
padding-bottom: @navbar-padding-vertical;
|
121
|
+
font-size: @font-size-large;
|
122
|
+
line-height: @line-height-computed;
|
123
|
+
color: @navbar-brand-color;
|
124
|
+
&:hover,
|
125
|
+
&:focus {
|
126
|
+
color: @navbar-brand-hover-color;
|
127
|
+
text-decoration: none;
|
128
|
+
background-color: @navbar-brand-hover-bg;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
// Navbar toggle
|
134
|
+
//
|
135
|
+
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
136
|
+
// JavaScript plugin.
|
137
|
+
|
138
|
+
.navbar-toggle {
|
139
|
+
position: relative;
|
140
|
+
float: right;
|
141
|
+
padding: 9px 10px;
|
142
|
+
.navbar-vertical-align(34px);
|
143
|
+
background-color: transparent;
|
144
|
+
border: 1px solid @navbar-toggle-border-color;
|
145
|
+
border-radius: @border-radius-base;
|
146
|
+
|
147
|
+
&:hover,
|
148
|
+
&:focus {
|
149
|
+
background-color: @navbar-toggle-hover-bg;
|
150
|
+
}
|
151
|
+
|
152
|
+
// Bars
|
153
|
+
.icon-bar {
|
154
|
+
display: block;
|
155
|
+
width: 22px;
|
156
|
+
height: 2px;
|
157
|
+
background-color: @navbar-toggle-icon-bar-bg;
|
158
|
+
border-radius: 1px;
|
159
|
+
}
|
160
|
+
.icon-bar + .icon-bar {
|
161
|
+
margin-top: 4px;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
// Navbar nav links
|
167
|
+
//
|
168
|
+
// Builds on top of the `.nav` components with it's own modifier class to make
|
169
|
+
// the nav the full height of the horizontal nav (above 768px).
|
170
|
+
|
171
|
+
.navbar-nav {
|
172
|
+
margin-left: -@navbar-padding-horizontal;
|
173
|
+
margin-right: -@navbar-padding-horizontal;
|
174
|
+
|
175
|
+
@media (min-width: @grid-float-breakpoint) {
|
176
|
+
margin-left: 0;
|
177
|
+
margin-right: 0;
|
178
|
+
}
|
179
|
+
|
180
|
+
> li > a {
|
181
|
+
padding-top: 10px;
|
182
|
+
padding-bottom: 10px;
|
183
|
+
color: @navbar-link-color;
|
184
|
+
line-height: @line-height-computed;
|
185
|
+
&:hover,
|
186
|
+
&:focus {
|
187
|
+
color: @navbar-link-hover-color;
|
188
|
+
background-color: @navbar-link-hover-bg;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
> .active > a {
|
192
|
+
&,
|
193
|
+
&:hover,
|
194
|
+
&:focus {
|
195
|
+
color: @navbar-link-active-color;
|
196
|
+
background-color: @navbar-link-active-bg;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
> .disabled > a {
|
200
|
+
&,
|
201
|
+
&:hover,
|
202
|
+
&:focus {
|
203
|
+
color: @navbar-link-disabled-color;
|
204
|
+
background-color: @navbar-link-disabled-bg;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
@media (max-width: @screen-phone-max) {
|
209
|
+
// Dropdowns get custom display
|
210
|
+
.open .dropdown-menu {
|
211
|
+
position: static;
|
212
|
+
float: none;
|
213
|
+
width: auto;
|
214
|
+
margin-top: 0;
|
215
|
+
background-color: transparent;
|
216
|
+
border: 0;
|
217
|
+
box-shadow: none;
|
218
|
+
> li > a,
|
219
|
+
.dropdown-header {
|
220
|
+
padding: 5px 15px 5px 25px;
|
221
|
+
}
|
222
|
+
> li > a {
|
223
|
+
color: @navbar-link-color;
|
224
|
+
line-height: @line-height-computed;
|
225
|
+
&:hover,
|
226
|
+
&:focus {
|
227
|
+
color: @navbar-link-hover-color;
|
228
|
+
background-color: @navbar-link-hover-bg;
|
229
|
+
background-image: none;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
> .active > a {
|
233
|
+
&,
|
234
|
+
&:hover,
|
235
|
+
&:focus {
|
236
|
+
color: @navbar-link-active-color;
|
237
|
+
background-color: @navbar-link-active-bg;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
> .disabled > a {
|
241
|
+
&,
|
242
|
+
&:hover,
|
243
|
+
&:focus {
|
244
|
+
color: @navbar-link-disabled-color;
|
245
|
+
background-color: @navbar-link-disabled-bg;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
|
254
|
+
// Component alignment
|
255
|
+
//
|
256
|
+
// Repurpose the pull utilities as their own navbar utilities to avoid specifity
|
257
|
+
// issues with parents and chaining. Only do this when the navbar is uncollapsed
|
258
|
+
// though so that navbar contents properly stack and align in mobile.
|
259
|
+
|
260
|
+
@media (min-width: @grid-float-breakpoint) {
|
261
|
+
.navbar-left { .pull-left(); }
|
262
|
+
.navbar-right { .pull-right(); }
|
263
|
+
}
|
264
|
+
|
265
|
+
|
266
|
+
// Navbar form
|
267
|
+
//
|
268
|
+
// Extension of the `.form-inline` with some extra flavor for optimum display in
|
269
|
+
// our navbars.
|
270
|
+
|
271
|
+
.navbar-form {
|
272
|
+
margin-left: -@navbar-padding-horizontal;
|
273
|
+
margin-right: -@navbar-padding-horizontal;
|
274
|
+
padding: 10px @navbar-padding-horizontal;
|
275
|
+
border-top: 1px solid darken(@navbar-bg, 7%);
|
276
|
+
border-bottom: 1px solid darken(@navbar-bg, 7%);
|
277
|
+
|
278
|
+
// Mixin behavior for optimum display
|
279
|
+
.form-inline();
|
280
|
+
|
281
|
+
.form-group {
|
282
|
+
@media (max-width: @screen-phone-max) {
|
283
|
+
margin-bottom: 5px;
|
284
|
+
}
|
285
|
+
}
|
286
|
+
|
287
|
+
// Vertically center in expanded, horizontal navbar
|
288
|
+
.navbar-vertical-align(@input-height-base);
|
289
|
+
|
290
|
+
// Undo 100% width for pull classes
|
291
|
+
@media (min-width: @grid-float-breakpoint) {
|
292
|
+
width: auto;
|
293
|
+
border: 0;
|
294
|
+
margin-left: 0;
|
295
|
+
margin-right: 0;
|
296
|
+
padding-top: 0;
|
297
|
+
padding-bottom: 0;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
// Dropdown menus
|
303
|
+
|
304
|
+
// Menu position and menu carets
|
305
|
+
.navbar-nav > li > .dropdown-menu {
|
306
|
+
margin-top: 0;
|
307
|
+
.border-top-radius(0);
|
308
|
+
}
|
309
|
+
// Menu position and menu caret support for dropups via extra dropup class
|
310
|
+
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
|
311
|
+
.border-bottom-radius(0);
|
312
|
+
}
|
313
|
+
|
314
|
+
// Dropdown menu items and carets
|
315
|
+
.navbar-nav {
|
316
|
+
// Caret should match text color on hover
|
317
|
+
> .dropdown > a:hover .caret,
|
318
|
+
> .dropdown > a:focus .caret {
|
319
|
+
border-top-color: @navbar-link-hover-color;
|
320
|
+
border-bottom-color: @navbar-link-hover-color;
|
321
|
+
}
|
322
|
+
|
323
|
+
// Remove background color from open dropdown
|
324
|
+
> .open > a {
|
325
|
+
&,
|
326
|
+
&:hover,
|
327
|
+
&:focus {
|
328
|
+
background-color: @navbar-link-active-bg;
|
329
|
+
color: @navbar-link-active-color;
|
330
|
+
.caret {
|
331
|
+
border-top-color: @navbar-link-active-color;
|
332
|
+
border-bottom-color: @navbar-link-active-color;
|
333
|
+
}
|
334
|
+
}
|
335
|
+
}
|
336
|
+
> .dropdown > a .caret {
|
337
|
+
border-top-color: @navbar-link-color;
|
338
|
+
border-bottom-color: @navbar-link-color;
|
339
|
+
}
|
340
|
+
}
|
341
|
+
|
342
|
+
// Right aligned menus need alt position
|
343
|
+
.navbar-nav.pull-right > li > .dropdown-menu,
|
344
|
+
.navbar-nav > li > .dropdown-menu.pull-right {
|
345
|
+
left: auto;
|
346
|
+
right: 0;
|
347
|
+
}
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
// Inverse navbar
|
352
|
+
// --------------------------------------------------
|
353
|
+
|
354
|
+
.navbar-inverse {
|
355
|
+
background-color: @navbar-inverse-bg;
|
356
|
+
border-color: @navbar-inverse-border;
|
357
|
+
|
358
|
+
.navbar-brand {
|
359
|
+
color: @navbar-inverse-brand-color;
|
360
|
+
&:hover,
|
361
|
+
&:focus {
|
362
|
+
color: @navbar-inverse-brand-hover-color;
|
363
|
+
background-color: @navbar-inverse-brand-hover-bg;
|
364
|
+
}
|
365
|
+
}
|
366
|
+
|
367
|
+
.navbar-text {
|
368
|
+
color: @navbar-inverse-color;
|
369
|
+
}
|
370
|
+
|
371
|
+
.navbar-nav {
|
372
|
+
> li > a {
|
373
|
+
color: @navbar-inverse-link-color;
|
374
|
+
|
375
|
+
&:hover,
|
376
|
+
&:focus {
|
377
|
+
color: @navbar-inverse-link-hover-color;
|
378
|
+
background-color: @navbar-inverse-link-hover-bg;
|
379
|
+
}
|
380
|
+
}
|
381
|
+
> .active > a {
|
382
|
+
&,
|
383
|
+
&:hover,
|
384
|
+
&:focus {
|
385
|
+
color: @navbar-inverse-link-active-color;
|
386
|
+
background-color: @navbar-inverse-link-active-bg;
|
387
|
+
}
|
388
|
+
}
|
389
|
+
> .disabled > a {
|
390
|
+
&,
|
391
|
+
&:hover,
|
392
|
+
&:focus {
|
393
|
+
color: @navbar-inverse-link-disabled-color;
|
394
|
+
background-color: @navbar-inverse-link-disabled-bg;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
}
|
398
|
+
|
399
|
+
// Darken the responsive nav toggle
|
400
|
+
.navbar-toggle {
|
401
|
+
border-color: @navbar-inverse-toggle-border-color;
|
402
|
+
&:hover,
|
403
|
+
&:focus {
|
404
|
+
background-color: @navbar-inverse-toggle-hover-bg;
|
405
|
+
}
|
406
|
+
.icon-bar {
|
407
|
+
background-color: @navbar-inverse-toggle-icon-bar-bg;
|
408
|
+
}
|
409
|
+
}
|
410
|
+
|
411
|
+
.navbar-collapse {
|
412
|
+
border-top-color: darken(@navbar-inverse-bg, 7%);
|
413
|
+
}
|
414
|
+
|
415
|
+
// Dropdowns
|
416
|
+
.navbar-nav {
|
417
|
+
> .open > a {
|
418
|
+
&,
|
419
|
+
&:hover,
|
420
|
+
&:focus {
|
421
|
+
background-color: @navbar-inverse-link-active-bg;
|
422
|
+
color: @navbar-inverse-link-active-color;
|
423
|
+
}
|
424
|
+
}
|
425
|
+
> .dropdown > a:hover .caret {
|
426
|
+
border-top-color: @navbar-inverse-link-hover-color;
|
427
|
+
border-bottom-color: @navbar-inverse-link-hover-color;
|
428
|
+
}
|
429
|
+
> .dropdown > a .caret {
|
430
|
+
border-top-color: @navbar-inverse-link-color;
|
431
|
+
border-bottom-color: @navbar-inverse-link-color;
|
432
|
+
}
|
433
|
+
> .open > a {
|
434
|
+
&,
|
435
|
+
&:hover,
|
436
|
+
&:focus {
|
437
|
+
.caret {
|
438
|
+
border-top-color: @navbar-inverse-link-active-color;
|
439
|
+
border-bottom-color: @navbar-inverse-link-active-color;
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
@media (max-width: @screen-phone-max) {
|
445
|
+
// Dropdowns get custom display
|
446
|
+
.open .dropdown-menu {
|
447
|
+
> .dropdown-header {
|
448
|
+
border-color: @navbar-inverse-border;
|
449
|
+
}
|
450
|
+
> li > a {
|
451
|
+
color: @navbar-inverse-link-color;
|
452
|
+
&:hover,
|
453
|
+
&:focus {
|
454
|
+
color: @navbar-inverse-link-hover-color;
|
455
|
+
background-color: @navbar-inverse-link-hover-bg;
|
456
|
+
}
|
457
|
+
}
|
458
|
+
> .active > a {
|
459
|
+
&,
|
460
|
+
&:hover,
|
461
|
+
&:focus {
|
462
|
+
color: @navbar-inverse-link-active-color;
|
463
|
+
background-color: @navbar-inverse-link-active-bg;
|
464
|
+
}
|
465
|
+
}
|
466
|
+
> .disabled > a {
|
467
|
+
&,
|
468
|
+
&:hover,
|
469
|
+
&:focus {
|
470
|
+
color: @navbar-inverse-link-disabled-color;
|
471
|
+
background-color: @navbar-inverse-link-disabled-bg;
|
472
|
+
}
|
473
|
+
}
|
474
|
+
}
|
475
|
+
}
|
476
|
+
}
|
477
|
+
|
478
|
+
}
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
// Responsive navbar
|
483
|
+
// --------------------------------------------------
|
484
|
+
|
485
|
+
@media screen and (min-width: @grid-float-breakpoint) {
|
486
|
+
|
487
|
+
.navbar-nav {
|
488
|
+
float: left;
|
489
|
+
// undo margin to make nav extend full height of navbar
|
490
|
+
margin-top: 0;
|
491
|
+
margin-bottom: 0;
|
492
|
+
|
493
|
+
> li {
|
494
|
+
float: left;
|
495
|
+
> a {
|
496
|
+
padding-top: ((@navbar-height - @line-height-computed) / 2);
|
497
|
+
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
|
498
|
+
}
|
499
|
+
}
|
500
|
+
}
|
501
|
+
|
502
|
+
// Required to make the collapsing navbar work on regular desktops
|
503
|
+
.navbar-toggle {
|
504
|
+
position: relative;
|
505
|
+
top: auto;
|
506
|
+
left: auto;
|
507
|
+
display: none;
|
508
|
+
}
|
509
|
+
.navbar-collapse.collapse {
|
510
|
+
display: block !important;
|
511
|
+
height: auto !important;
|
512
|
+
padding-bottom: 0; // Override default setting
|
513
|
+
overflow: visible !important;
|
514
|
+
}
|
515
|
+
|
516
|
+
}
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
// Buttons in navbars
|
521
|
+
//
|
522
|
+
// Vertically center a button within a navbar (when *not* in a form).
|
523
|
+
|
524
|
+
.navbar-btn {
|
525
|
+
margin-top: ((@navbar-height - @input-height-base) / 2);
|
526
|
+
}
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
// Text in navbars
|
531
|
+
//
|
532
|
+
// Add a class to make any element properly align itself vertically within the navbars.
|
533
|
+
|
534
|
+
.navbar-text {
|
535
|
+
float: left;
|
536
|
+
.navbar-vertical-align(@line-height-computed);
|
537
|
+
}
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
// Links in navbars
|
542
|
+
//
|
543
|
+
// Add a class to ensure links outside the navbar nav are colored correctly.
|
544
|
+
|
545
|
+
// Default navbar variables
|
546
|
+
.navbar-link {
|
547
|
+
color: @navbar-link-color;
|
548
|
+
&:hover {
|
549
|
+
color: @navbar-link-hover-color;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
|
553
|
+
// Use the inverse navbar variables
|
554
|
+
.navbar-inverse .navbar-link {
|
555
|
+
color: @navbar-inverse-link-color;
|
556
|
+
&:hover {
|
557
|
+
color: @navbar-inverse-link-hover-color;
|
558
|
+
}
|
559
|
+
}
|