bootstrap-generators 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. data/.rvmrc +1 -0
  2. data/README.md +128 -22
  3. data/Rakefile +59 -0
  4. data/bootstrap-generators.gemspec +1 -1
  5. data/lib/bootstrap/generators/version.rb +1 -1
  6. data/lib/generators/bootstrap/install/install_generator.rb +1 -0
  7. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.less +98 -0
  8. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +99 -0
  9. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.less +3 -100
  10. data/lib/generators/bootstrap/install/templates/assets/stylesheets/fluid.css.scss +4 -4
  11. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +1 -0
  12. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +4 -100
  13. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +5 -4
  14. data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +23 -22
  15. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +4 -7
  16. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +4 -6
  17. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +3 -2
  18. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +3 -2
  19. data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +15 -7
  20. data/lib/generators/bootstrap/install/templates/layouts/hero.html.haml +16 -10
  21. data/test/lib/generators/bootstrap/install_generator_test.rb +2 -0
  22. data/vendor/assets/javascripts/bootstrap-alert.js +8 -5
  23. data/vendor/assets/javascripts/bootstrap-button.js +5 -3
  24. data/vendor/assets/javascripts/bootstrap-carousel.js +5 -2
  25. data/vendor/assets/javascripts/bootstrap-collapse.js +2 -2
  26. data/vendor/assets/javascripts/bootstrap-dropdown.js +2 -2
  27. data/vendor/assets/javascripts/bootstrap-modal.js +6 -5
  28. data/vendor/assets/javascripts/bootstrap-popover.js +2 -2
  29. data/vendor/assets/javascripts/bootstrap-scrollspy.js +2 -2
  30. data/vendor/assets/javascripts/bootstrap-tab.js +2 -2
  31. data/vendor/assets/javascripts/bootstrap-tooltip.js +2 -2
  32. data/vendor/assets/javascripts/bootstrap-transition.js +3 -3
  33. data/vendor/assets/javascripts/bootstrap-typeahead.js +2 -2
  34. data/vendor/assets/stylesheets/less/bootstrap.less +1 -1
  35. data/vendor/assets/stylesheets/less/breadcrumbs.less +1 -1
  36. data/vendor/assets/stylesheets/less/button-groups.less +2 -1
  37. data/vendor/assets/stylesheets/less/buttons.less +25 -7
  38. data/vendor/assets/stylesheets/less/code.less +13 -0
  39. data/vendor/assets/stylesheets/less/dropdowns.less +1 -2
  40. data/vendor/assets/stylesheets/less/forms.less +48 -41
  41. data/vendor/assets/stylesheets/less/labels.less +23 -7
  42. data/vendor/assets/stylesheets/less/mixins.less +78 -25
  43. data/vendor/assets/stylesheets/less/modals.less +11 -0
  44. data/vendor/assets/stylesheets/less/navbar.less +11 -4
  45. data/vendor/assets/stylesheets/less/navs.less +20 -11
  46. data/vendor/assets/stylesheets/less/reset.less +1 -1
  47. data/vendor/assets/stylesheets/less/responsive.less +9 -5
  48. data/vendor/assets/stylesheets/less/sprites.less +7 -5
  49. data/vendor/assets/stylesheets/less/tables.less +14 -3
  50. data/vendor/assets/stylesheets/less/thumbnails.less +2 -2
  51. data/vendor/assets/stylesheets/less/type.less +3 -2
  52. data/vendor/assets/stylesheets/less/variables.less +15 -7
  53. data/vendor/assets/stylesheets/scss/accordion.scss +28 -0
  54. data/vendor/assets/stylesheets/scss/alerts.scss +70 -0
  55. data/vendor/assets/stylesheets/scss/bootstrap.scss +62 -0
  56. data/vendor/assets/stylesheets/scss/breadcrumbs.scss +22 -0
  57. data/vendor/assets/stylesheets/scss/button-groups.scss +148 -0
  58. data/vendor/assets/stylesheets/scss/buttons.scss +183 -0
  59. data/vendor/assets/stylesheets/scss/carousel.scss +121 -0
  60. data/vendor/assets/stylesheets/scss/close.scss +18 -0
  61. data/vendor/assets/stylesheets/scss/code.scss +57 -0
  62. data/vendor/assets/stylesheets/scss/component-animations.scss +18 -0
  63. data/vendor/assets/stylesheets/scss/dropdowns.scss +130 -0
  64. data/vendor/assets/stylesheets/scss/forms.scss +522 -0
  65. data/vendor/assets/stylesheets/scss/grid.scss +8 -0
  66. data/vendor/assets/stylesheets/scss/hero-unit.scss +20 -0
  67. data/vendor/assets/stylesheets/scss/labels.scss +32 -0
  68. data/vendor/assets/stylesheets/scss/layouts.scss +17 -0
  69. data/vendor/assets/stylesheets/scss/mixins.scss +579 -0
  70. data/vendor/assets/stylesheets/scss/modals.scss +83 -0
  71. data/vendor/assets/stylesheets/scss/navbar.scss +299 -0
  72. data/vendor/assets/stylesheets/scss/navs.scss +353 -0
  73. data/vendor/assets/stylesheets/scss/pager.scss +30 -0
  74. data/vendor/assets/stylesheets/scss/pagination.scss +55 -0
  75. data/vendor/assets/stylesheets/scss/popovers.scss +49 -0
  76. data/vendor/assets/stylesheets/scss/progress-bars.scss +95 -0
  77. data/vendor/assets/stylesheets/scss/reset.scss +126 -0
  78. data/vendor/assets/stylesheets/scss/responsive.scss +327 -0
  79. data/vendor/assets/stylesheets/scss/scaffolding.scss +29 -0
  80. data/vendor/assets/stylesheets/scss/sprites.scss +158 -0
  81. data/vendor/assets/stylesheets/scss/tables.scss +150 -0
  82. data/vendor/assets/stylesheets/scss/thumbnails.scss +35 -0
  83. data/vendor/assets/stylesheets/scss/tooltip.scss +35 -0
  84. data/vendor/assets/stylesheets/scss/type.scss +218 -0
  85. data/vendor/assets/stylesheets/scss/utilities.scss +23 -0
  86. data/vendor/assets/stylesheets/scss/variables.scss +107 -0
  87. data/vendor/assets/stylesheets/scss/wells.scss +17 -0
  88. metadata +49 -11
@@ -81,7 +81,7 @@
81
81
  margin-top: 5px; // make buttons vertically centered in navbar
82
82
  }
83
83
  .btn-group .btn {
84
- margin-top: 0;
84
+ margin-top: 0; // then undo the margin here so we don't accidentally double it
85
85
  }
86
86
  }
87
87
 
@@ -104,6 +104,14 @@
104
104
  input[type="radio"] {
105
105
  margin-top: 3px;
106
106
  }
107
+ .input-append,
108
+ .input-prepend {
109
+ margin-top: 6px;
110
+ white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
111
+ input {
112
+ margin-top: 0; // remove the margin on top since it's on the parent
113
+ }
114
+ }
107
115
  }
108
116
 
109
117
  // Navbar search
@@ -133,7 +141,7 @@
133
141
  background-color: @grayLight;
134
142
  background-color: rgba(255,255,255,.5);
135
143
  }
136
- // Focus states (we use .focused since IE8 and down doesn't support :focus)
144
+ // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
137
145
  &:focus,
138
146
  &.focused {
139
147
  padding: 5px 10px;
@@ -194,7 +202,7 @@
194
202
  }
195
203
  // Hover
196
204
  .navbar .nav > li > a:hover {
197
- background-color: transparent;
205
+ background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
198
206
  color: @navbarLinkColorHover;
199
207
  text-decoration: none;
200
208
  }
@@ -205,7 +213,6 @@
205
213
  color: @navbarLinkColorHover;
206
214
  text-decoration: none;
207
215
  background-color: @navbarBackground;
208
- background-color: rgba(0,0,0,.5);
209
216
  }
210
217
 
211
218
  // Dividers (basically a vertical hr)
@@ -21,6 +21,21 @@
21
21
  background-color: @grayLighter;
22
22
  }
23
23
 
24
+ // Nav headers (for dropdowns and lists)
25
+ .nav .nav-header {
26
+ display: block;
27
+ padding: 3px 15px;
28
+ font-size: 11px;
29
+ font-weight: bold;
30
+ line-height: @baseLineHeight;
31
+ color: @grayLight;
32
+ text-shadow: 0 1px 0 rgba(255,255,255,.5);
33
+ text-transform: uppercase;
34
+ }
35
+ // Space them out when they follow another list item (link)
36
+ .nav li + .nav-header {
37
+ margin-top: 9px;
38
+ }
24
39
 
25
40
 
26
41
  // NAV LIST
@@ -33,21 +48,12 @@
33
48
  }
34
49
  .nav-list > li > a,
35
50
  .nav-list .nav-header {
36
- display: block;
37
- padding: 3px 15px;
38
51
  margin-left: -15px;
39
52
  margin-right: -15px;
40
53
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
41
54
  }
42
- .nav-list .nav-header {
43
- font-size: 11px;
44
- font-weight: bold;
45
- line-height: @baseLineHeight;
46
- color: @grayLight;
47
- text-transform: uppercase;
48
- }
49
- .nav-list > li + .nav-header {
50
- margin-top: 9px;
55
+ .nav-list > li > a {
56
+ padding: 3px 15px;
51
57
  }
52
58
  .nav-list .active > a,
53
59
  .nav-list .active > a:hover {
@@ -249,6 +255,9 @@
249
255
  .tabbable {
250
256
  .clearfix();
251
257
  }
258
+ .tab-content {
259
+ overflow: hidden; // prevent content from running below tabs
260
+ }
252
261
 
253
262
  // Remove border on bottom, left, right
254
263
  .tabs-below .nav-tabs,
@@ -108,7 +108,7 @@ input[type="button"],
108
108
  input[type="reset"],
109
109
  input[type="submit"] {
110
110
  cursor: pointer; // Cursors on all buttons applied consistently
111
- -webkit-appearance: button; // Style clicable inputs in iOS
111
+ -webkit-appearance: button; // Style clickable inputs in iOS
112
112
  }
113
113
  input[type="search"] { // Appearance in Safari/Chrome
114
114
  -webkit-appearance: textfield;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Responsive v2.0.0
2
+ * Bootstrap Responsive v2.0.1
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -56,7 +56,7 @@
56
56
  .uneditable-input {
57
57
  display: block;
58
58
  width: 100%;
59
- height: 28px; /* Make inputs at least the height of their button counterpart */
59
+ min-height: 28px; /* Make inputs at least the height of their button counterpart */
60
60
  /* Makes inputs behave like true block-level elements */
61
61
  -webkit-box-sizing: border-box; /* Older Webkit */
62
62
  -moz-box-sizing: border-box; /* Older FF */
@@ -123,7 +123,7 @@
123
123
  // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
124
124
  // --------------------------------------------------
125
125
 
126
- @media (max-width: 768px) {
126
+ @media (max-width: 767px) {
127
127
  // GRID & CONTAINERS
128
128
  // -----------------
129
129
  // Remove width from containers
@@ -154,7 +154,7 @@
154
154
  // PORTRAIT TABLET TO DEFAULT DESKTOP
155
155
  // ----------------------------------
156
156
 
157
- @media (min-width: 768px) and (max-width: 980px) {
157
+ @media (min-width: 768px) and (max-width: 979px) {
158
158
 
159
159
  // Fixed grid
160
160
  #gridSystem > .generate(12, 42px, 20px);
@@ -171,7 +171,7 @@
171
171
 
172
172
  // TABLETS AND BELOW
173
173
  // -----------------
174
- @media (max-width: 980px) {
174
+ @media (max-width: 979px) {
175
175
 
176
176
  // UNFIX THE TOPBAR
177
177
  // ----------------
@@ -215,6 +215,10 @@
215
215
  .navbar .nav > .divider-vertical {
216
216
  display: none;
217
217
  }
218
+ .navbar .nav .nav-header {
219
+ color: @navbarText;
220
+ text-shadow: none;
221
+ }
218
222
  // Nav and dropdown links in navbar
219
223
  .navbar .nav > li > a,
220
224
  .navbar .dropdown-menu a {
@@ -9,24 +9,26 @@
9
9
  // All icons receive the styles of the <i> tag with a base class
10
10
  // of .i and are then given a unique class to add width, height,
11
11
  // and background-position. Your resulting HTML will look like
12
- // <i class="i icon-inbox"></i>.
12
+ // <i class="icon-inbox"></i>.
13
13
 
14
14
  // For the white version of the icons, just add the .icon-white class:
15
- // <i class="i icon-inbox icon-white"></i>
15
+ // <i class="icon-inbox icon-white"></i>
16
16
 
17
- [class^="icon-"] {
17
+ [class^="icon-"],
18
+ [class*=" icon-"] {
18
19
  display: inline-block;
19
20
  width: 14px;
20
21
  height: 14px;
22
+ line-height: 14px;
21
23
  vertical-align: text-top;
22
- background-image: url(glyphicons-halflings.png);
24
+ background-image: url(@iconSpritePath);
23
25
  background-position: 14px 14px;
24
26
  background-repeat: no-repeat;
25
27
 
26
28
  .ie7-restore-right-whitespace();
27
29
  }
28
30
  .icon-white {
29
- background-image: url(glyphicons-halflings-white.png);
31
+ background-image: url(@iconWhiteSpritePath);
30
32
  }
31
33
 
32
34
  .icon-glass { background-position: 0 0; }
@@ -25,14 +25,15 @@ table {
25
25
  padding: 8px;
26
26
  line-height: @baseLineHeight;
27
27
  text-align: left;
28
+ vertical-align: top;
28
29
  border-top: 1px solid #ddd;
29
30
  }
30
31
  th {
31
32
  font-weight: bold;
32
- vertical-align: bottom;
33
33
  }
34
- td {
35
- vertical-align: top;
34
+ // Bottom align for column headings
35
+ thead th {
36
+ vertical-align: bottom;
36
37
  }
37
38
  // Remove top border from thead by default
38
39
  thead:first-child tr th,
@@ -113,6 +114,16 @@ table {
113
114
  }
114
115
 
115
116
 
117
+ // HOVER EFFECT
118
+ // ------------
119
+ // Placed here since it has to come after the potential zebra striping
120
+ .table {
121
+ tbody tr:hover td,
122
+ tbody tr:hover th {
123
+ background-color: #f5f5f5;
124
+ }
125
+ }
126
+
116
127
 
117
128
  // TABLE CELL SIZING
118
129
  // -----------------
@@ -2,13 +2,13 @@
2
2
  // ----------
3
3
 
4
4
  .thumbnails {
5
- margin-left: -20px;
5
+ margin-left: -@gridGutterWidth;
6
6
  list-style: none;
7
7
  .clearfix();
8
8
  }
9
9
  .thumbnails > li {
10
10
  float: left;
11
- margin: 0 0 @baseLineHeight 20px;
11
+ margin: 0 0 @baseLineHeight @gridGutterWidth;
12
12
  }
13
13
  .thumbnail {
14
14
  display: block;
@@ -110,7 +110,8 @@ ol {
110
110
  li {
111
111
  line-height: @baseLineHeight;
112
112
  }
113
- ul.unstyled {
113
+ ul.unstyled,
114
+ ol.unstyled {
114
115
  margin-left: 0;
115
116
  list-style: none;
116
117
  }
@@ -137,7 +138,7 @@ dd {
137
138
  hr {
138
139
  margin: @baseLineHeight 0;
139
140
  border: 0;
140
- border-top: 1px solid #e5e5e5;
141
+ border-top: 1px solid @hrBorder;
141
142
  border-bottom: 1px solid @white;
142
143
  }
143
144
 
@@ -47,20 +47,28 @@
47
47
  // Z-index master list
48
48
  // Used for a bird's eye view of components dependent on the z-axis
49
49
  // Try to avoid customizing these :)
50
- @zindexDropdown: 1000;
51
- @zindexPopover: 1010;
52
- @zindexTooltip: 1020;
53
- @zindexFixedNavbar: 1030;
54
- @zindexModalBackdrop: 1040;
55
- @zindexModal: 1050;
50
+ @zindexDropdown: 1000;
51
+ @zindexPopover: 1010;
52
+ @zindexTooltip: 1020;
53
+ @zindexFixedNavbar: 1030;
54
+ @zindexModalBackdrop: 1040;
55
+ @zindexModal: 1050;
56
+
57
+ // Sprite icons path
58
+ @iconSpritePath: "glyphicons-halflings.png";
59
+ @iconWhiteSpritePath: "glyphicons-halflings-white.png";
56
60
 
57
61
  // Input placeholder text color
58
- @placeholderText: @grayLight;
62
+ @placeholderText: @grayLight;
63
+
64
+ // Hr border color
65
+ @hrBorder: @grayLighter;
59
66
 
60
67
  // Navbar
61
68
  @navbarHeight: 40px;
62
69
  @navbarBackground: @grayDarker;
63
70
  @navbarBackgroundHighlight: @grayDark;
71
+ @navbarLinkBackgroundHover: transparent;
64
72
 
65
73
  @navbarText: @grayLight;
66
74
  @navbarLinkColor: @grayLight;
@@ -0,0 +1,28 @@
1
+ // ACCORDION
2
+ // ---------
3
+
4
+
5
+ // Parent container
6
+ .accordion {
7
+ margin-bottom: $baseLineHeight;
8
+ }
9
+
10
+ // Group == heading + body
11
+ .accordion-group {
12
+ margin-bottom: 2px;
13
+ border: 1px solid #e5e5e5;
14
+ @include border-radius(4px);
15
+ }
16
+ .accordion-heading {
17
+ border-bottom: 0;
18
+ }
19
+ .accordion-heading .accordion-toggle {
20
+ display: block;
21
+ padding: 8px 15px;
22
+ }
23
+
24
+ // Inner needs the styles because you can't animate properly with any styles on the element
25
+ .accordion-inner {
26
+ padding: 9px 15px;
27
+ border-top: 1px solid #e5e5e5;
28
+ }
@@ -0,0 +1,70 @@
1
+ // ALERT STYLES
2
+ // ------------
3
+
4
+ // Base alert styles
5
+ .alert {
6
+ padding: 8px 35px 8px 14px;
7
+ margin-bottom: $baseLineHeight;
8
+ text-shadow: 0 1px 0 rgba(255,255,255,.5);
9
+ background-color: $warningBackground;
10
+ border: 1px solid $warningBorder;
11
+ @include border-radius(4px);
12
+ }
13
+ .alert,
14
+ .alert-heading {
15
+ color: $warningText;
16
+ }
17
+
18
+ // Adjust close link position
19
+ .alert .close {
20
+ position: relative;
21
+ top: -2px;
22
+ right: -21px;
23
+ line-height: 18px;
24
+ }
25
+
26
+ // Alternate styles
27
+ // ----------------
28
+
29
+ .alert-success {
30
+ background-color: $successBackground;
31
+ border-color: $successBorder;
32
+ }
33
+ .alert-success,
34
+ .alert-success .alert-heading {
35
+ color: $successText;
36
+ }
37
+ .alert-danger,
38
+ .alert-error {
39
+ background-color: $errorBackground;
40
+ border-color: $errorBorder;
41
+ }
42
+ .alert-danger,
43
+ .alert-error,
44
+ .alert-danger .alert-heading,
45
+ .alert-error .alert-heading {
46
+ color: $errorText;
47
+ }
48
+ .alert-info {
49
+ background-color: $infoBackground;
50
+ border-color: $infoBorder;
51
+ }
52
+ .alert-info,
53
+ .alert-info .alert-heading {
54
+ color: $infoText;
55
+ }
56
+
57
+
58
+ // Block alerts
59
+ // ------------------------
60
+ .alert-block {
61
+ padding-top: 14px;
62
+ padding-bottom: 14px;
63
+ }
64
+ .alert-block > p,
65
+ .alert-block > ul {
66
+ margin-bottom: 0;
67
+ }
68
+ .alert-block p + p {
69
+ margin-top: 5px;
70
+ }
@@ -0,0 +1,62 @@
1
+ /*!
2
+ * Bootstrap v2.0.1
3
+ *
4
+ * Copyright 2012 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 $twitter by $mdo and $fat.
9
+ */
10
+
11
+ // Core variables and mixins
12
+ @import "variables"; // Modify this for custom colors, font-sizes, etc
13
+ @import "mixins";
14
+
15
+ // CSS Reset
16
+ @import "reset";
17
+
18
+ // Grid system and page structure
19
+ @import "scaffolding";
20
+ @import "grid";
21
+ @import "layouts";
22
+
23
+ // Base CSS
24
+ @import "type";
25
+ @import "code";
26
+ @import "forms";
27
+ @import "tables";
28
+
29
+ // Components: common
30
+ @import "sprites";
31
+ @import "dropdowns";
32
+ @import "wells";
33
+ @import "component-animations";
34
+ @import "close";
35
+
36
+ // Components: Buttons & Alerts
37
+ @import "buttons";
38
+ @import "button-groups";
39
+ @import "alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons
40
+
41
+ // Components: Nav
42
+ @import "navs";
43
+ @import "navbar";
44
+ @import "breadcrumbs";
45
+ @import "pagination";
46
+ @import "pager";
47
+
48
+ // Components: Popovers
49
+ @import "modals";
50
+ @import "tooltip";
51
+ @import "popovers";
52
+
53
+ // Components: Misc
54
+ @import "thumbnails";
55
+ @import "labels";
56
+ @import "progress-bars";
57
+ @import "accordion";
58
+ @import "carousel";
59
+ @import "hero-unit";
60
+
61
+ // Utility classes
62
+ @import "utilities"; // Has to be last to override when necessary