bootstrap-on-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README.md +34 -0
  4. data/Rakefile +1 -0
  5. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  6. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +228 -0
  7. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  8. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  9. data/app/assets/javascripts/bootstrap/affix.js +126 -0
  10. data/app/assets/javascripts/bootstrap/alert.js +98 -0
  11. data/app/assets/javascripts/bootstrap/button.js +109 -0
  12. data/app/assets/javascripts/bootstrap/carousel.js +217 -0
  13. data/app/assets/javascripts/bootstrap/collapse.js +179 -0
  14. data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
  15. data/app/assets/javascripts/bootstrap/modal.js +246 -0
  16. data/app/assets/javascripts/bootstrap/popover.js +117 -0
  17. data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
  18. data/app/assets/javascripts/bootstrap/tab.js +135 -0
  19. data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
  20. data/app/assets/javascripts/bootstrap/transition.js +56 -0
  21. data/app/assets/stylesheets/bootstrap/alerts.less +67 -0
  22. data/app/assets/stylesheets/bootstrap/badges.less +51 -0
  23. data/app/assets/stylesheets/bootstrap/bootstrap.less +58 -0
  24. data/app/assets/stylesheets/bootstrap/breadcrumbs.less +23 -0
  25. data/app/assets/stylesheets/bootstrap/button-groups.less +248 -0
  26. data/app/assets/stylesheets/bootstrap/buttons.less +160 -0
  27. data/app/assets/stylesheets/bootstrap/carousel.less +209 -0
  28. data/app/assets/stylesheets/bootstrap/close.less +33 -0
  29. data/app/assets/stylesheets/bootstrap/code.less +56 -0
  30. data/app/assets/stylesheets/bootstrap/component-animations.less +29 -0
  31. data/app/assets/stylesheets/bootstrap/dropdowns.less +193 -0
  32. data/app/assets/stylesheets/bootstrap/forms.less +362 -0
  33. data/app/assets/stylesheets/bootstrap/glyphicons.less +236 -0
  34. data/app/assets/stylesheets/bootstrap/grid.less +346 -0
  35. data/app/assets/stylesheets/bootstrap/input-groups.less +127 -0
  36. data/app/assets/stylesheets/bootstrap/jumbotron.less +40 -0
  37. data/app/assets/stylesheets/bootstrap/labels.less +58 -0
  38. data/app/assets/stylesheets/bootstrap/list-group.less +88 -0
  39. data/app/assets/stylesheets/bootstrap/media.less +56 -0
  40. data/app/assets/stylesheets/bootstrap/mixins.less +744 -0
  41. data/app/assets/stylesheets/bootstrap/modals.less +141 -0
  42. data/app/assets/stylesheets/bootstrap/navbar.less +621 -0
  43. data/app/assets/stylesheets/bootstrap/navs.less +229 -0
  44. data/app/assets/stylesheets/bootstrap/normalize.less +396 -0
  45. data/app/assets/stylesheets/bootstrap/pager.less +55 -0
  46. data/app/assets/stylesheets/bootstrap/pagination.less +85 -0
  47. data/app/assets/stylesheets/bootstrap/panels.less +148 -0
  48. data/app/assets/stylesheets/bootstrap/popovers.less +133 -0
  49. data/app/assets/stylesheets/bootstrap/print.less +100 -0
  50. data/app/assets/stylesheets/bootstrap/progress-bars.less +95 -0
  51. data/app/assets/stylesheets/bootstrap/responsive-utilities.less +220 -0
  52. data/app/assets/stylesheets/bootstrap/scaffolding.less +130 -0
  53. data/app/assets/stylesheets/bootstrap/tables.less +238 -0
  54. data/app/assets/stylesheets/bootstrap/theme.less +241 -0
  55. data/app/assets/stylesheets/bootstrap/thumbnails.less +31 -0
  56. data/app/assets/stylesheets/bootstrap/tooltip.less +95 -0
  57. data/app/assets/stylesheets/bootstrap/type.less +242 -0
  58. data/app/assets/stylesheets/bootstrap/utilities.less +42 -0
  59. data/app/assets/stylesheets/bootstrap/variables.less +635 -0
  60. data/app/assets/stylesheets/bootstrap/wells.less +29 -0
  61. data/bootstrap-on-rails.gemspec +25 -0
  62. data/lib/bootstrap-on-rails.rb +6 -0
  63. data/lib/bootstrap-on-rails/engine.rb +4 -0
  64. data/lib/bootstrap-on-rails/version.rb +3 -0
  65. data/test/test_helper.rb +2 -0
  66. metadata +112 -0
@@ -0,0 +1,56 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#transitions
4
+ * ========================================================================
5
+ * Copyright 2013 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================================== */
19
+
20
+
21
+ +function ($) { "use strict";
22
+
23
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
24
+ // ============================================================
25
+
26
+ function transitionEnd() {
27
+ var el = document.createElement('bootstrap')
28
+
29
+ var transEndEventNames = {
30
+ 'WebkitTransition' : 'webkitTransitionEnd'
31
+ , 'MozTransition' : 'transitionend'
32
+ , 'OTransition' : 'oTransitionEnd otransitionend'
33
+ , 'transition' : 'transitionend'
34
+ }
35
+
36
+ for (var name in transEndEventNames) {
37
+ if (el.style[name] !== undefined) {
38
+ return { end: transEndEventNames[name] }
39
+ }
40
+ }
41
+ }
42
+
43
+ // http://blog.alexmaccaw.com/css-transitions
44
+ $.fn.emulateTransitionEnd = function (duration) {
45
+ var called = false, $el = this
46
+ $(this).one($.support.transition.end, function () { called = true })
47
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
48
+ setTimeout(callback, duration)
49
+ return this
50
+ }
51
+
52
+ $(function () {
53
+ $.support.transition = transitionEnd()
54
+ })
55
+
56
+ }(window.jQuery);
@@ -0,0 +1,67 @@
1
+ //
2
+ // Alerts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // -------------------------
8
+
9
+ .alert {
10
+ padding: @alert-padding;
11
+ margin-bottom: @line-height-computed;
12
+ border: 1px solid transparent;
13
+ border-radius: @alert-border-radius;
14
+
15
+ // Headings for larger alerts
16
+ h4 {
17
+ margin-top: 0;
18
+ // Specified for the h4 to prevent conflicts of changing @headingsColor
19
+ color: inherit;
20
+ }
21
+ // Provide class for links that match alerts
22
+ .alert-link {
23
+ font-weight: @alert-link-font-weight;
24
+ }
25
+
26
+ // Improve alignment and spacing of inner content
27
+ > p,
28
+ > ul {
29
+ margin-bottom: 0;
30
+ }
31
+ > p + p {
32
+ margin-top: 5px;
33
+ }
34
+ }
35
+
36
+ // Dismissable alerts
37
+ //
38
+ // Expand the right padding and account for the close button's positioning.
39
+
40
+ .alert-dismissable {
41
+ padding-right: (@alert-padding + 20);
42
+
43
+ // Adjust close link position
44
+ .close {
45
+ position: relative;
46
+ top: -2px;
47
+ right: -21px;
48
+ color: inherit;
49
+ }
50
+ }
51
+
52
+ // Alternate styles
53
+ //
54
+ // Generate contextual modifier classes for colorizing the alert.
55
+
56
+ .alert-success {
57
+ .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
58
+ }
59
+ .alert-info {
60
+ .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
61
+ }
62
+ .alert-warning {
63
+ .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
64
+ }
65
+ .alert-danger {
66
+ .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
67
+ }
@@ -0,0 +1,51 @@
1
+ //
2
+ // Badges
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base classes
7
+ .badge {
8
+ display: inline-block;
9
+ min-width: 10px;
10
+ padding: 3px 7px;
11
+ font-size: @font-size-small;
12
+ font-weight: @badge-font-weight;
13
+ color: @badge-color;
14
+ line-height: @badge-line-height;
15
+ vertical-align: baseline;
16
+ white-space: nowrap;
17
+ text-align: center;
18
+ background-color: @badge-bg;
19
+ border-radius: @badge-border-radius;
20
+
21
+ // Empty badges collapse automatically (not available in IE8)
22
+ &:empty {
23
+ display: none;
24
+ }
25
+ }
26
+
27
+ // Hover state, but only for links
28
+ a.badge {
29
+ &:hover,
30
+ &:focus {
31
+ color: @badge-link-hover-color;
32
+ text-decoration: none;
33
+ cursor: pointer;
34
+ }
35
+ }
36
+
37
+ // Quick fix for labels/badges in buttons
38
+ .btn .badge {
39
+ position: relative;
40
+ top: -1px;
41
+ }
42
+
43
+ // Account for counters in navs
44
+ a.list-group-item.active > .badge,
45
+ .nav-pills > .active > a > .badge {
46
+ color: @badge-active-color;
47
+ background-color: @badge-active-bg;
48
+ }
49
+ .nav-pills > li > a > .badge {
50
+ margin-left: 3px;
51
+ }
@@ -0,0 +1,58 @@
1
+ /*!
2
+ * Bootstrap v3.0.0
3
+ *
4
+ * Copyright 2013 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world by @mdo and @fat.
9
+ */
10
+
11
+ // Core variables and mixins
12
+ @import "mixins.less";
13
+
14
+ // Reset
15
+ @import "normalize.less";
16
+ @import "print.less";
17
+
18
+ // Core CSS
19
+ @import "scaffolding.less";
20
+ @import "type.less";
21
+ @import "code.less";
22
+ @import "grid.less";
23
+ @import "tables.less";
24
+ @import "forms.less";
25
+ @import "buttons.less";
26
+
27
+ // Components
28
+ @import "component-animations.less";
29
+ @import "glyphicons.less";
30
+ @import "dropdowns.less";
31
+ @import "button-groups.less";
32
+ @import "input-groups.less";
33
+ @import "navs.less";
34
+ @import "navbar.less";
35
+ @import "breadcrumbs.less";
36
+ @import "pagination.less";
37
+ @import "pager.less";
38
+ @import "labels.less";
39
+ @import "badges.less";
40
+ @import "jumbotron.less";
41
+ @import "thumbnails.less";
42
+ @import "alerts.less";
43
+ @import "progress-bars.less";
44
+ @import "media.less";
45
+ @import "list-group.less";
46
+ @import "panels.less";
47
+ @import "wells.less";
48
+ @import "close.less";
49
+
50
+ // Components w/ JavaScript
51
+ @import "modals.less";
52
+ @import "tooltip.less";
53
+ @import "popovers.less";
54
+ @import "carousel.less";
55
+
56
+ // Utility classes
57
+ @import "utilities.less";
58
+ @import "responsive-utilities.less";
@@ -0,0 +1,23 @@
1
+ //
2
+ // Breadcrumbs
3
+ // --------------------------------------------------
4
+
5
+
6
+ .breadcrumb {
7
+ padding: 8px 15px;
8
+ margin-bottom: @line-height-computed;
9
+ list-style: none;
10
+ background-color: @breadcrumb-bg;
11
+ border-radius: @border-radius-base;
12
+ > li {
13
+ display: inline-block;
14
+ &+li:before {
15
+ content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
16
+ padding: 0 5px;
17
+ color: @breadcrumb-color;
18
+ }
19
+ }
20
+ > .active {
21
+ color: @breadcrumb-active-color;
22
+ }
23
+ }
@@ -0,0 +1,248 @@
1
+ //
2
+ // Button groups
3
+ // --------------------------------------------------
4
+
5
+ // Button carets
6
+ //
7
+ // Match the button text color to the arrow/caret for indicating dropdown-ness.
8
+
9
+ .caret {
10
+ .btn-default & {
11
+ border-top-color: @btn-default-color;
12
+ }
13
+ .btn-primary &,
14
+ .btn-success &,
15
+ .btn-warning &,
16
+ .btn-danger &,
17
+ .btn-info & {
18
+ border-top-color: #fff;
19
+ }
20
+ }
21
+ .dropup {
22
+ & .btn-default .caret {
23
+ border-bottom-color: @btn-default-color;
24
+ }
25
+ .btn-primary,
26
+ .btn-success,
27
+ .btn-warning,
28
+ .btn-danger,
29
+ .btn-info {
30
+ .caret {
31
+ border-bottom-color: #fff;
32
+ }
33
+ }
34
+ }
35
+
36
+ // Make the div behave like a button
37
+ .btn-group,
38
+ .btn-group-vertical {
39
+ position: relative;
40
+ display: inline-block;
41
+ vertical-align: middle; // match .btn alignment given font-size hack above
42
+ > .btn {
43
+ position: relative;
44
+ float: left;
45
+ // Bring the "active" button to the front
46
+ &:hover,
47
+ &:focus,
48
+ &:active,
49
+ &.active {
50
+ z-index: 2;
51
+ }
52
+ &:focus {
53
+ // Remove focus outline when dropdown JS adds it after closing the menu
54
+ outline: none;
55
+ }
56
+ }
57
+ }
58
+
59
+ // Prevent double borders when buttons are next to each other
60
+ .btn-group {
61
+ .btn + .btn,
62
+ .btn + .btn-group,
63
+ .btn-group + .btn,
64
+ .btn-group + .btn-group {
65
+ margin-left: -1px;
66
+ }
67
+ }
68
+
69
+ // Optional: Group multiple button groups together for a toolbar
70
+ .btn-toolbar {
71
+ .clearfix();
72
+
73
+ .btn-group {
74
+ float: left;
75
+ }
76
+ // Space out series of button groups
77
+ > .btn,
78
+ > .btn-group {
79
+ + .btn,
80
+ + .btn-group {
81
+ margin-left: 5px;
82
+ }
83
+ }
84
+ }
85
+
86
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
87
+ border-radius: 0;
88
+ }
89
+
90
+ // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
91
+ .btn-group > .btn:first-child {
92
+ margin-left: 0;
93
+ &:not(:last-child):not(.dropdown-toggle) {
94
+ .border-right-radius(0);
95
+ }
96
+ }
97
+ // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
98
+ .btn-group > .btn:last-child:not(:first-child),
99
+ .btn-group > .dropdown-toggle:not(:first-child) {
100
+ .border-left-radius(0);
101
+ }
102
+
103
+ // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
104
+ .btn-group > .btn-group {
105
+ float: left;
106
+ }
107
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
108
+ border-radius: 0;
109
+ }
110
+ .btn-group > .btn-group:first-child {
111
+ > .btn:last-child,
112
+ > .dropdown-toggle {
113
+ .border-right-radius(0);
114
+ }
115
+ }
116
+ .btn-group > .btn-group:last-child > .btn:first-child {
117
+ .border-left-radius(0);
118
+ }
119
+
120
+ // On active and open, don't show outline
121
+ .btn-group .dropdown-toggle:active,
122
+ .btn-group.open .dropdown-toggle {
123
+ outline: 0;
124
+ }
125
+
126
+
127
+ // Sizing
128
+ //
129
+ // Remix the default button sizing classes into new ones for easier manipulation.
130
+
131
+ .btn-group-xs > .btn { .btn-xs(); }
132
+ .btn-group-sm > .btn { .btn-sm(); }
133
+ .btn-group-lg > .btn { .btn-lg(); }
134
+
135
+
136
+ // Split button dropdowns
137
+ // ----------------------
138
+
139
+ // Give the line between buttons some depth
140
+ .btn-group > .btn + .dropdown-toggle {
141
+ padding-left: 8px;
142
+ padding-right: 8px;
143
+ }
144
+ .btn-group > .btn-lg + .dropdown-toggle {
145
+ padding-left: 12px;
146
+ padding-right: 12px;
147
+ }
148
+
149
+ // The clickable button for toggling the menu
150
+ // Remove the gradient and set the same inset shadow as the :active state
151
+ .btn-group.open .dropdown-toggle {
152
+ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
153
+ }
154
+
155
+
156
+ // Reposition the caret
157
+ .btn .caret {
158
+ margin-left: 0;
159
+ }
160
+ // Carets in other button sizes
161
+ .btn-lg .caret {
162
+ border-width: @caret-width-large @caret-width-large 0;
163
+ border-bottom-width: 0;
164
+ }
165
+ // Upside down carets for .dropup
166
+ .dropup .btn-lg .caret {
167
+ border-width: 0 @caret-width-large @caret-width-large;
168
+ }
169
+
170
+
171
+ // Vertical button groups
172
+ // ----------------------
173
+
174
+ .btn-group-vertical {
175
+ > .btn,
176
+ > .btn-group {
177
+ display: block;
178
+ float: none;
179
+ width: 100%;
180
+ max-width: 100%;
181
+ }
182
+
183
+ // Clear floats so dropdown menus can be properly placed
184
+ > .btn-group {
185
+ .clearfix();
186
+ > .btn {
187
+ float: none;
188
+ }
189
+ }
190
+
191
+ > .btn + .btn,
192
+ > .btn + .btn-group,
193
+ > .btn-group + .btn,
194
+ > .btn-group + .btn-group {
195
+ margin-top: -1px;
196
+ margin-left: 0;
197
+ }
198
+ }
199
+
200
+ .btn-group-vertical > .btn {
201
+ &:not(:first-child):not(:last-child) {
202
+ border-radius: 0;
203
+ }
204
+ &:first-child:not(:last-child) {
205
+ border-top-right-radius: @border-radius-base;
206
+ .border-bottom-radius(0);
207
+ }
208
+ &:last-child:not(:first-child) {
209
+ border-bottom-left-radius: @border-radius-base;
210
+ .border-top-radius(0);
211
+ }
212
+ }
213
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
214
+ border-radius: 0;
215
+ }
216
+ .btn-group-vertical > .btn-group:first-child {
217
+ > .btn:last-child,
218
+ > .dropdown-toggle {
219
+ .border-bottom-radius(0);
220
+ }
221
+ }
222
+ .btn-group-vertical > .btn-group:last-child > .btn:first-child {
223
+ .border-top-radius(0);
224
+ }
225
+
226
+
227
+
228
+ // Justified button groups
229
+ // ----------------------
230
+
231
+ .btn-group-justified {
232
+ display: table;
233
+ width: 100%;
234
+ table-layout: fixed;
235
+ border-collapse: separate;
236
+ .btn {
237
+ float: none;
238
+ display: table-cell;
239
+ width: 1%;
240
+ }
241
+ }
242
+
243
+
244
+ // Checkbox and radio options
245
+ [data-toggle="buttons"] > .btn > input[type="radio"],
246
+ [data-toggle="buttons"] > .btn > input[type="checkbox"] {
247
+ display: none;
248
+ }