twitter-bootstrap-rails 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (71) hide show
  1. data/README.md +14 -3
  2. data/app/helpers/bootstrap_flash_helper.rb +12 -0
  3. data/lib/generators/bootstrap/layout/templates/layout.html.erb +1 -0
  4. data/lib/generators/bootstrap/layout/templates/layout.html.haml +1 -0
  5. data/lib/generators/bootstrap/layout/templates/layout.html.slim +1 -0
  6. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  7. data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
  8. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +13 -0
  9. data/lib/generators/bootstrap/themed/templates/index.html.erb +1 -1
  10. data/lib/generators/bootstrap/themed/templates/index.html.haml +1 -1
  11. data/lib/generators/bootstrap/themed/templates/index.html.slim +1 -1
  12. data/lib/generators/bootstrap/themed/templates/show.html.erb +1 -1
  13. data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
  14. data/lib/generators/bootstrap/themed/templates/show.html.slim +1 -1
  15. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  16. data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
  17. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +104 -0
  18. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +1 -1
  19. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +1 -1
  20. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +12 -5
  21. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +4 -3
  22. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +66 -16
  23. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +95 -74
  24. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +9 -4
  25. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +9 -9
  26. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +2 -2
  27. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +15 -15
  28. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +2 -3
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +51 -40
  30. data/vendor/toolkit/fontawesome.less +5 -5
  31. data/vendor/toolkit/twitter/bootstrap/accordion.less +3 -2
  32. data/vendor/toolkit/twitter/bootstrap/alerts.less +16 -9
  33. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +1 -1
  34. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +10 -10
  35. data/vendor/toolkit/twitter/bootstrap/button-groups.less +76 -23
  36. data/vendor/toolkit/twitter/bootstrap/buttons.less +85 -65
  37. data/vendor/toolkit/twitter/bootstrap/carousel.less +13 -3
  38. data/vendor/toolkit/twitter/bootstrap/close.less +4 -2
  39. data/vendor/toolkit/twitter/bootstrap/code.less +6 -5
  40. data/vendor/toolkit/twitter/bootstrap/component-animations.less +5 -2
  41. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +81 -14
  42. data/vendor/toolkit/twitter/bootstrap/forms.less +100 -48
  43. data/vendor/toolkit/twitter/bootstrap/grid.less +17 -1
  44. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +4 -2
  45. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +19 -2
  46. data/vendor/toolkit/twitter/bootstrap/layouts.less +1 -2
  47. data/vendor/toolkit/twitter/bootstrap/mixins.less +98 -73
  48. data/vendor/toolkit/twitter/bootstrap/modals.less +9 -2
  49. data/vendor/toolkit/twitter/bootstrap/navbar.less +238 -127
  50. data/vendor/toolkit/twitter/bootstrap/navs.less +38 -17
  51. data/vendor/toolkit/twitter/bootstrap/pager.less +5 -4
  52. data/vendor/toolkit/twitter/bootstrap/pagination.less +16 -8
  53. data/vendor/toolkit/twitter/bootstrap/popovers.less +101 -33
  54. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +18 -13
  55. data/vendor/toolkit/twitter/bootstrap/reset.less +6 -3
  56. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +9 -7
  57. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +86 -68
  58. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +7 -5
  59. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +18 -5
  60. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +17 -15
  61. data/vendor/toolkit/twitter/bootstrap/responsive.less +5 -5
  62. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +26 -4
  63. data/vendor/toolkit/twitter/bootstrap/sprites.less +15 -19
  64. data/vendor/toolkit/twitter/bootstrap/tables.less +60 -11
  65. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +9 -4
  66. data/vendor/toolkit/twitter/bootstrap/tooltip.less +47 -12
  67. data/vendor/toolkit/twitter/bootstrap/type.less +57 -92
  68. data/vendor/toolkit/twitter/bootstrap/utilities.less +9 -2
  69. data/vendor/toolkit/twitter/bootstrap/variables.less +100 -29
  70. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -5
  71. metadata +16 -22
@@ -1,73 +1,8 @@
1
- // UP TO LANDSCAPE PHONE
2
- // ---------------------
3
-
4
- @media (max-width: 480px) {
5
-
6
- // Smooth out the collapsing/expanding nav
7
- .nav-collapse {
8
- -webkit-transform: translate3d(0, 0, 0); // activate the GPU
9
- }
10
-
11
- // Block level the page header small tag for readability
12
- .page-header h1 small {
13
- display: block;
14
- line-height: @baseLineHeight;
15
- }
16
-
17
- // Update checkboxes for iOS
18
- input[type="checkbox"],
19
- input[type="radio"] {
20
- border: 1px solid #ccc;
21
- }
22
-
23
- // Remove the horizontal form styles
24
- .form-horizontal .control-group > label {
25
- float: none;
26
- width: auto;
27
- padding-top: 0;
28
- text-align: left;
29
- }
30
- // Move over all input controls and content
31
- .form-horizontal .controls {
32
- margin-left: 0;
33
- }
34
- // Move the options list down to align with labels
35
- .form-horizontal .control-list {
36
- padding-top: 0; // has to be padding because margin collaspes
37
- }
38
- // Move over buttons in .form-actions to align with .controls
39
- .form-horizontal .form-actions {
40
- padding-left: 10px;
41
- padding-right: 10px;
42
- }
43
-
44
- // Modals
45
- .modal {
46
- position: absolute;
47
- top: 10px;
48
- left: 10px;
49
- right: 10px;
50
- width: auto;
51
- margin: 0;
52
- &.fade.in { top: auto; }
53
- }
54
- .modal-header .close {
55
- padding: 10px;
56
- margin: -10px;
57
- }
58
-
59
- // Carousel
60
- .carousel-caption {
61
- position: static;
62
- }
63
-
64
- }
65
-
66
-
67
-
68
- // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
1
+ //
2
+ // Responsive: Landscape phone to desktop/tablet
69
3
  // --------------------------------------------------
70
4
 
5
+
71
6
  @media (max-width: 767px) {
72
7
 
73
8
  // Padding to set content in a bit
@@ -116,6 +51,10 @@
116
51
  .thumbnails {
117
52
  margin-left: 0;
118
53
  }
54
+ .thumbnails > li {
55
+ float: none;
56
+ margin-left: 0; // Reset the default margin for all li elements when no .span* classes are present
57
+ }
119
58
  // Make all grid-sized elements block level again
120
59
  [class*="span"],
121
60
  .row-fluid [class*="span"] {
@@ -124,6 +63,11 @@
124
63
  width: auto;
125
64
  margin-left: 0;
126
65
  }
66
+ .span12,
67
+ .row-fluid .span12 {
68
+ width: 100%;
69
+ .box-sizing(border-box);
70
+ }
127
71
 
128
72
  // FORM FIELDS
129
73
  // -----------
@@ -146,4 +90,78 @@
146
90
  width: auto;
147
91
  }
148
92
 
93
+ // Modals
94
+ .modal {
95
+ position: fixed;
96
+ top: 20px;
97
+ left: 20px;
98
+ right: 20px;
99
+ width: auto;
100
+ margin: 0;
101
+ &.fade.in { top: auto; }
102
+ }
103
+
104
+ }
105
+
106
+
107
+
108
+ // UP TO LANDSCAPE PHONE
109
+ // ---------------------
110
+
111
+ @media (max-width: 480px) {
112
+
113
+ // Smooth out the collapsing/expanding nav
114
+ .nav-collapse {
115
+ -webkit-transform: translate3d(0, 0, 0); // activate the GPU
116
+ }
117
+
118
+ // Block level the page header small tag for readability
119
+ .page-header h1 small {
120
+ display: block;
121
+ line-height: @baseLineHeight;
122
+ }
123
+
124
+ // Update checkboxes for iOS
125
+ input[type="checkbox"],
126
+ input[type="radio"] {
127
+ border: 1px solid #ccc;
128
+ }
129
+
130
+ // Remove the horizontal form styles
131
+ .form-horizontal .control-group > label {
132
+ float: none;
133
+ width: auto;
134
+ padding-top: 0;
135
+ text-align: left;
136
+ }
137
+ // Move over all input controls and content
138
+ .form-horizontal .controls {
139
+ margin-left: 0;
140
+ }
141
+ // Move the options list down to align with labels
142
+ .form-horizontal .control-list {
143
+ padding-top: 0; // has to be padding because margin collaspes
144
+ }
145
+ // Move over buttons in .form-actions to align with .controls
146
+ .form-horizontal .form-actions {
147
+ padding-left: 10px;
148
+ padding-right: 10px;
149
+ }
150
+
151
+ // Modals
152
+ .modal {
153
+ top: 10px;
154
+ left: 10px;
155
+ right: 10px;
156
+ }
157
+ .modal-header .close {
158
+ padding: 10px;
159
+ margin: -10px;
160
+ }
161
+
162
+ // Carousel
163
+ .carousel-caption {
164
+ position: static;
165
+ }
166
+
149
167
  }
@@ -1,16 +1,18 @@
1
- // PORTRAIT TABLET TO DEFAULT DESKTOP
2
- // ----------------------------------
1
+ //
2
+ // Responsive: Tablet to desktop
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  @media (min-width: 768px) and (max-width: 979px) {
5
7
 
6
8
  // Fixed grid
7
- #grid > .core(42px, 20px);
9
+ #grid > .core(@gridColumnWidth768, @gridGutterWidth768);
8
10
 
9
11
  // Fluid grid
10
- #grid > .fluid(5.801104972%, 2.762430939%);
12
+ #grid > .fluid(@fluidGridColumnWidth768, @fluidGridGutterWidth768);
11
13
 
12
14
  // Input grid
13
- #grid > .input(42px, 20px);
15
+ #grid > .input(@gridColumnWidth768, @gridGutterWidth768);
14
16
 
15
17
  // No need to reset .thumbnails here since it's the same @gridGutterWidth
16
18
 
@@ -1,6 +1,11 @@
1
+ //
2
+ // Responsive: Navbar
3
+ // --------------------------------------------------
4
+
5
+
1
6
  // TABLETS AND BELOW
2
7
  // -----------------
3
- @media (max-width: 979px) {
8
+ @media (max-width: @navbarCollapseWidth) {
4
9
 
5
10
  // UNFIX THE TOPBAR
6
11
  // ----------------
@@ -8,7 +13,7 @@
8
13
  body {
9
14
  padding-top: 0;
10
15
  }
11
- // Unfix the navbar
16
+ // Unfix the navbars
12
17
  .navbar-fixed-top,
13
18
  .navbar-fixed-bottom {
14
19
  position: static;
@@ -61,7 +66,7 @@
61
66
  // Nav and dropdown links in navbar
62
67
  .nav-collapse .nav > li > a,
63
68
  .nav-collapse .dropdown-menu a {
64
- padding: 6px 15px;
69
+ padding: 9px 15px;
65
70
  font-weight: bold;
66
71
  color: @navbarLinkColor;
67
72
  .border-radius(3px);
@@ -79,6 +84,10 @@
79
84
  .nav-collapse .dropdown-menu a:hover {
80
85
  background-color: @navbarBackground;
81
86
  }
87
+ .navbar-inverse .nav-collapse .nav > li > a:hover,
88
+ .navbar-inverse .nav-collapse .dropdown-menu a:hover {
89
+ background-color: @navbarInverseBackground;
90
+ }
82
91
  // Buttons in the navbar
83
92
  .nav-collapse.in .btn-group {
84
93
  margin-top: 5px;
@@ -138,16 +147,20 @@
138
147
  padding-left: 10px;
139
148
  padding-right: 10px;
140
149
  }
150
+
151
+
141
152
  }
142
153
 
143
154
 
144
155
  // DEFAULT DESKTOP
145
156
  // ---------------
146
157
 
147
- // Required to make the collapsing navbar work on regular desktops
148
158
  @media (min-width: 980px) {
159
+
160
+ // Required to make the collapsing navbar work on regular desktops
149
161
  .nav-collapse.collapse {
150
162
  height: auto !important;
151
163
  overflow: visible !important;
152
164
  }
153
- }
165
+
166
+ }
@@ -1,5 +1,7 @@
1
- // RESPONSIVE CLASSES
2
- // ------------------
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  // Hide from screenreaders and browsers
5
7
  // Credit: HTML5 Boilerplate
@@ -13,29 +15,29 @@
13
15
  // For desktops
14
16
  .visible-phone { display: none !important; }
15
17
  .visible-tablet { display: none !important; }
16
- .visible-desktop { } // Don't set initially
17
18
  .hidden-phone { }
18
19
  .hidden-tablet { }
19
20
  .hidden-desktop { display: none !important; }
20
-
21
- // Phones only
22
- @media (max-width: 767px) {
23
- // Show
24
- .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
25
- // Hide
26
- .hidden-phone { display: none !important; }
27
- // Hide everything else
28
- .hidden-desktop { display: inherit !important; }
29
- .visible-desktop { display: none !important; }
30
- }
21
+ .visible-desktop { display: inherit !important; }
31
22
 
32
23
  // Tablets & small desktops only
33
24
  @media (min-width: 768px) and (max-width: 979px) {
25
+ // Hide everything else
26
+ .hidden-desktop { display: inherit !important; }
27
+ .visible-desktop { display: none !important ; }
34
28
  // Show
35
29
  .visible-tablet { display: inherit !important; }
36
30
  // Hide
37
31
  .hidden-tablet { display: none !important; }
32
+ }
33
+
34
+ // Phones only
35
+ @media (max-width: 767px) {
38
36
  // Hide everything else
39
37
  .hidden-desktop { display: inherit !important; }
40
- .visible-desktop { display: none !important ; }
38
+ .visible-desktop { display: none !important; }
39
+ // Show
40
+ .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
41
+ // Hide
42
+ .hidden-phone { display: none !important; }
41
43
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Responsive v2.0.4
2
+ * Bootstrap Responsive v2.1.0
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -31,14 +31,14 @@
31
31
  // MEDIA QUERIES
32
32
  // ------------------
33
33
 
34
- // Phones to portrait tablets and narrow desktops
35
- @import "responsive-767px-max.less";
34
+ // Large desktops
35
+ @import "responsive-1200px-min.less";
36
36
 
37
37
  // Tablets to regular desktops
38
38
  @import "responsive-768px-979px.less";
39
39
 
40
- // Large desktops
41
- @import "responsive-1200px-min.less";
40
+ // Phones to portrait tablets and narrow desktops
41
+ @import "responsive-767px-max.less";
42
42
 
43
43
 
44
44
  // RESPONSIVE NAVBAR
@@ -1,10 +1,10 @@
1
+ //
1
2
  // Scaffolding
2
- // Basic and global styles for generating a grid system, structural layout, and page templates
3
- // -------------------------------------------------------------------------------------------
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // Body reset
7
- // ----------
7
+ // -------------------------
8
8
 
9
9
  body {
10
10
  margin: 0;
@@ -17,7 +17,7 @@ body {
17
17
 
18
18
 
19
19
  // Links
20
- // -----
20
+ // -------------------------
21
21
 
22
22
  a {
23
23
  color: @linkColor;
@@ -27,3 +27,25 @@ a:hover {
27
27
  color: @linkColorHover;
28
28
  text-decoration: underline;
29
29
  }
30
+
31
+
32
+ // Images
33
+ // -------------------------
34
+
35
+ .img-rounded {
36
+ .border-radius(6px);
37
+ }
38
+
39
+ .img-polaroid {
40
+ padding: 4px;
41
+ background-color: #fff;
42
+ border: 1px solid #ccc;
43
+ border: 1px solid rgba(0,0,0,.2);
44
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.1);
45
+ -moz-box-shadow: 0 1px 3px rgba(0,0,0,.1);
46
+ box-shadow: 0 1px 3px rgba(0,0,0,.1);
47
+ }
48
+
49
+ .img-circle {
50
+ .border-radius(500px);
51
+ }
@@ -1,6 +1,6 @@
1
- // SPRITES
2
- // Glyphs and icons for buttons, nav, and more
3
- // -------------------------------------------
1
+ //
2
+ // Sprites
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // ICONS
@@ -25,9 +25,17 @@
25
25
  background-image: url(@iconSpritePath);
26
26
  background-position: 14px 14px;
27
27
  background-repeat: no-repeat;
28
-
28
+ margin-top: 1px;
29
29
  }
30
- .icon-white {
30
+
31
+ /* White icons with optional class, or on hover/active states of certain elements */
32
+ .icon-white,
33
+ .nav > .active > a > [class^="icon-"],
34
+ .nav > .active > a > [class*=" icon-"],
35
+ .dropdown-menu > li > a:hover > [class^="icon-"],
36
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
37
+ .dropdown-menu > .active > a > [class^="icon-"],
38
+ .dropdown-menu > .active > a > [class*=" icon-"] {
31
39
  background-image: url(@iconWhiteSpritePath);
32
40
  }
33
41
 
@@ -145,7 +153,7 @@
145
153
  .icon-warning-sign { background-position: -144px -120px; }
146
154
  .icon-plane { background-position: -168px -120px; }
147
155
  .icon-calendar { background-position: -192px -120px; }
148
- .icon-random { background-position: -216px -120px; }
156
+ .icon-random { background-position: -216px -120px; width: 16px; }
149
157
  .icon-comment { background-position: -240px -120px; }
150
158
  .icon-magnet { background-position: -264px -120px; }
151
159
  .icon-chevron-up { background-position: -288px -120px; }
@@ -153,7 +161,7 @@
153
161
  .icon-retweet { background-position: -336px -120px; }
154
162
  .icon-shopping-cart { background-position: -360px -120px; }
155
163
  .icon-folder-close { background-position: -384px -120px; }
156
- .icon-folder-open { background-position: -408px -120px; }
164
+ .icon-folder-open { background-position: -408px -120px; width: 16px; }
157
165
  .icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off
158
166
  .icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off
159
167
 
@@ -177,15 +185,3 @@
177
185
  .icon-filter { background-position: -408px -144px; }
178
186
  .icon-briefcase { background-position: -432px -144px; }
179
187
  .icon-fullscreen { background-position: -456px -144px; }
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-