bootstrap-on-rails 0.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 (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,160 @@
1
+ //
2
+ // Buttons
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // --------------------------------------------------
8
+
9
+ // Core styles
10
+ .btn {
11
+ display: inline-block;
12
+ padding: @padding-base-vertical @padding-base-horizontal;
13
+ margin-bottom: 0; // For input.btn
14
+ font-size: @font-size-base;
15
+ font-weight: @btn-font-weight;
16
+ line-height: @line-height-base;
17
+ text-align: center;
18
+ vertical-align: middle;
19
+ cursor: pointer;
20
+ border: 1px solid transparent;
21
+ border-radius: @border-radius-base;
22
+ white-space: nowrap;
23
+ .user-select(none);
24
+
25
+ &:focus {
26
+ .tab-focus();
27
+ }
28
+
29
+ &:hover,
30
+ &:focus {
31
+ color: @btn-default-color;
32
+ text-decoration: none;
33
+ }
34
+
35
+ &:active,
36
+ &.active {
37
+ outline: 0;
38
+ background-image: none;
39
+ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
40
+ }
41
+
42
+ &.disabled,
43
+ &[disabled],
44
+ fieldset[disabled] & {
45
+ cursor: not-allowed;
46
+ pointer-events: none; // Future-proof disabling of clicks
47
+ .opacity(.65);
48
+ .box-shadow(none);
49
+ }
50
+
51
+ }
52
+
53
+
54
+ // Alternate buttons
55
+ // --------------------------------------------------
56
+
57
+ .btn-default {
58
+ .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
59
+ }
60
+ .btn-primary {
61
+ .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
62
+ }
63
+ // Warning appears as orange
64
+ .btn-warning {
65
+ .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
66
+ }
67
+ // Danger and error appear as red
68
+ .btn-danger {
69
+ .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
70
+ }
71
+ // Success appears as green
72
+ .btn-success {
73
+ .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
74
+ }
75
+ // Info appears as blue-green
76
+ .btn-info {
77
+ .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
78
+ }
79
+
80
+
81
+ // Link buttons
82
+ // -------------------------
83
+
84
+ // Make a button look and behave like a link
85
+ .btn-link {
86
+ color: @link-color;
87
+ font-weight: normal;
88
+ cursor: pointer;
89
+ border-radius: 0;
90
+
91
+ &,
92
+ &:active,
93
+ &[disabled],
94
+ fieldset[disabled] & {
95
+ background-color: transparent;
96
+ .box-shadow(none);
97
+ }
98
+ &,
99
+ &:hover,
100
+ &:focus,
101
+ &:active {
102
+ border-color: transparent;
103
+ }
104
+ &:hover,
105
+ &:focus {
106
+ color: @link-hover-color;
107
+ text-decoration: underline;
108
+ background-color: transparent;
109
+ }
110
+ &[disabled],
111
+ fieldset[disabled] & {
112
+ &:hover,
113
+ &:focus {
114
+ color: @btn-link-disabled-color;
115
+ text-decoration: none;
116
+ }
117
+ }
118
+ }
119
+
120
+
121
+ // Button Sizes
122
+ // --------------------------------------------------
123
+
124
+ .btn-lg {
125
+ // line-height: ensure even-numbered height of button next to large input
126
+ .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
127
+ }
128
+ .btn-sm,
129
+ .btn-xs {
130
+ // line-height: ensure proper height of button next to small input
131
+ .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
132
+ }
133
+ .btn-xs {
134
+ padding: 1px 5px;
135
+ }
136
+
137
+
138
+ // Block button
139
+ // --------------------------------------------------
140
+
141
+ .btn-block {
142
+ display: block;
143
+ width: 100%;
144
+ padding-left: 0;
145
+ padding-right: 0;
146
+ }
147
+
148
+ // Vertically space out multiple block buttons
149
+ .btn-block + .btn-block {
150
+ margin-top: 5px;
151
+ }
152
+
153
+ // Specificity overrides
154
+ input[type="submit"],
155
+ input[type="reset"],
156
+ input[type="button"] {
157
+ &.btn-block {
158
+ width: 100%;
159
+ }
160
+ }
@@ -0,0 +1,209 @@
1
+ //
2
+ // Carousel
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Wrapper for the slide container and indicators
7
+ .carousel {
8
+ position: relative;
9
+ }
10
+
11
+ .carousel-inner {
12
+ position: relative;
13
+ overflow: hidden;
14
+ width: 100%;
15
+
16
+ > .item {
17
+ display: none;
18
+ position: relative;
19
+ .transition(.6s ease-in-out left);
20
+
21
+ // Account for jankitude on images
22
+ > img,
23
+ > a > img {
24
+ .img-responsive();
25
+ line-height: 1;
26
+ }
27
+ }
28
+
29
+ > .active,
30
+ > .next,
31
+ > .prev { display: block; }
32
+
33
+ > .active {
34
+ left: 0;
35
+ }
36
+
37
+ > .next,
38
+ > .prev {
39
+ position: absolute;
40
+ top: 0;
41
+ width: 100%;
42
+ }
43
+
44
+ > .next {
45
+ left: 100%;
46
+ }
47
+ > .prev {
48
+ left: -100%;
49
+ }
50
+ > .next.left,
51
+ > .prev.right {
52
+ left: 0;
53
+ }
54
+
55
+ > .active.left {
56
+ left: -100%;
57
+ }
58
+ > .active.right {
59
+ left: 100%;
60
+ }
61
+
62
+ }
63
+
64
+ // Left/right controls for nav
65
+ // ---------------------------
66
+
67
+ .carousel-control {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ bottom: 0;
72
+ width: @carousel-control-width;
73
+ .opacity(@carousel-control-opacity);
74
+ font-size: @carousel-control-font-size;
75
+ color: @carousel-control-color;
76
+ text-align: center;
77
+ text-shadow: @carousel-text-shadow;
78
+ // We can't have this transition here because webkit cancels the carousel
79
+ // animation if you trip this while in the middle of another animation.
80
+
81
+ // Set gradients for backgrounds
82
+ &.left {
83
+ #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
84
+ }
85
+ &.right {
86
+ left: auto;
87
+ right: 0;
88
+ #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
89
+ }
90
+
91
+ // Hover/focus state
92
+ &:hover,
93
+ &:focus {
94
+ color: @carousel-control-color;
95
+ text-decoration: none;
96
+ .opacity(.9);
97
+ }
98
+
99
+ // Toggles
100
+ .icon-prev,
101
+ .icon-next,
102
+ .glyphicon-chevron-left,
103
+ .glyphicon-chevron-right {
104
+ position: absolute;
105
+ top: 50%;
106
+ left: 50%;
107
+ z-index: 5;
108
+ display: inline-block;
109
+ }
110
+ .icon-prev,
111
+ .icon-next {
112
+ width: 20px;
113
+ height: 20px;
114
+ margin-top: -10px;
115
+ margin-left: -10px;
116
+ font-family: serif;
117
+ }
118
+
119
+ .icon-prev {
120
+ &:before {
121
+ content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
122
+ }
123
+ }
124
+ .icon-next {
125
+ &:before {
126
+ content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
127
+ }
128
+ }
129
+ }
130
+
131
+ // Optional indicator pips
132
+ //
133
+ // Add an unordered list with the following class and add a list item for each
134
+ // slide your carousel holds.
135
+
136
+ .carousel-indicators {
137
+ position: absolute;
138
+ bottom: 10px;
139
+ left: 50%;
140
+ z-index: 15;
141
+ width: 60%;
142
+ margin-left: -30%;
143
+ padding-left: 0;
144
+ list-style: none;
145
+ text-align: center;
146
+
147
+ li {
148
+ display: inline-block;
149
+ width: 10px;
150
+ height: 10px;
151
+ margin: 1px;
152
+ text-indent: -999px;
153
+ border: 1px solid @carousel-indicator-border-color;
154
+ border-radius: 10px;
155
+ cursor: pointer;
156
+ }
157
+ .active {
158
+ margin: 0;
159
+ width: 12px;
160
+ height: 12px;
161
+ background-color: @carousel-indicator-active-bg;
162
+ }
163
+ }
164
+
165
+ // Optional captions
166
+ // -----------------------------
167
+ // Hidden by default for smaller viewports
168
+ .carousel-caption {
169
+ position: absolute;
170
+ left: 15%;
171
+ right: 15%;
172
+ bottom: 20px;
173
+ z-index: 10;
174
+ padding-top: 20px;
175
+ padding-bottom: 20px;
176
+ color: @carousel-caption-color;
177
+ text-align: center;
178
+ text-shadow: @carousel-text-shadow;
179
+ & .btn {
180
+ text-shadow: none; // No shadow for button elements in carousel-caption
181
+ }
182
+ }
183
+
184
+
185
+ // Scale up controls for tablets and up
186
+ @media screen and (min-width: @screen-sm) {
187
+
188
+ // Scale up the controls a smidge
189
+ .carousel-control .icon-prev,
190
+ .carousel-control .icon-next {
191
+ width: 30px;
192
+ height: 30px;
193
+ margin-top: -15px;
194
+ margin-left: -15px;
195
+ font-size: 30px;
196
+ }
197
+
198
+ // Show and left align the captions
199
+ .carousel-caption {
200
+ left: 20%;
201
+ right: 20%;
202
+ padding-bottom: 30px;
203
+ }
204
+
205
+ // Move up the indicators
206
+ .carousel-indicators {
207
+ bottom: 20px;
208
+ }
209
+ }
@@ -0,0 +1,33 @@
1
+ //
2
+ // Close icons
3
+ // --------------------------------------------------
4
+
5
+
6
+ .close {
7
+ float: right;
8
+ font-size: (@font-size-base * 1.5);
9
+ font-weight: @close-font-weight;
10
+ line-height: 1;
11
+ color: @close-color;
12
+ text-shadow: @close-text-shadow;
13
+ .opacity(.2);
14
+
15
+ &:hover,
16
+ &:focus {
17
+ color: @close-color;
18
+ text-decoration: none;
19
+ cursor: pointer;
20
+ .opacity(.5);
21
+ }
22
+
23
+ // Additional properties for button version
24
+ // iOS requires the button element instead of an anchor tag.
25
+ // If you want the anchor version, it requires `href="#"`.
26
+ button& {
27
+ padding: 0;
28
+ cursor: pointer;
29
+ background: transparent;
30
+ border: 0;
31
+ -webkit-appearance: none;
32
+ }
33
+ }
@@ -0,0 +1,56 @@
1
+ //
2
+ // Code (inline and blocK)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ pre {
9
+ font-family: @font-family-monospace;
10
+ }
11
+
12
+ // Inline code
13
+ code {
14
+ padding: 2px 4px;
15
+ font-size: 90%;
16
+ color: @code-color;
17
+ background-color: @code-bg;
18
+ white-space: nowrap;
19
+ border-radius: @border-radius-base;
20
+ }
21
+
22
+ // Blocks of code
23
+ pre {
24
+ display: block;
25
+ padding: ((@line-height-computed - 1) / 2);
26
+ margin: 0 0 (@line-height-computed / 2);
27
+ font-size: (@font-size-base - 1); // 14px to 13px
28
+ line-height: @line-height-base;
29
+ word-break: break-all;
30
+ word-wrap: break-word;
31
+ color: @pre-color;
32
+ background-color: @pre-bg;
33
+ border: 1px solid @pre-border-color;
34
+ border-radius: @border-radius-base;
35
+
36
+ // Make prettyprint styles more spaced out for readability
37
+ &.prettyprint {
38
+ margin-bottom: @line-height-computed;
39
+ }
40
+
41
+ // Account for some code outputs that place code tags in pre tags
42
+ code {
43
+ padding: 0;
44
+ font-size: inherit;
45
+ color: inherit;
46
+ white-space: pre-wrap;
47
+ background-color: transparent;
48
+ border: 0;
49
+ }
50
+ }
51
+
52
+ // Enable scrollable blocks of code
53
+ .pre-scrollable {
54
+ max-height: @pre-scrollable-max-height;
55
+ overflow-y: scroll;
56
+ }