tennpipes-su 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.rdoc +70 -0
  4. data/Rakefile +22 -0
  5. data/lib/tennpipes-su.rb +35 -0
  6. data/lib/tennpipes-su/access_control.rb +191 -0
  7. data/lib/tennpipes-su/bootstrap-less/alerts.less +67 -0
  8. data/lib/tennpipes-su/bootstrap-less/badges.less +55 -0
  9. data/lib/tennpipes-su/bootstrap-less/bootstrap.less +49 -0
  10. data/lib/tennpipes-su/bootstrap-less/breadcrumbs.less +26 -0
  11. data/lib/tennpipes-su/bootstrap-less/button-groups.less +226 -0
  12. data/lib/tennpipes-su/bootstrap-less/buttons.less +155 -0
  13. data/lib/tennpipes-su/bootstrap-less/carousel.less +232 -0
  14. data/lib/tennpipes-su/bootstrap-less/close.less +33 -0
  15. data/lib/tennpipes-su/bootstrap-less/code.less +63 -0
  16. data/lib/tennpipes-su/bootstrap-less/component-animations.less +29 -0
  17. data/lib/tennpipes-su/bootstrap-less/dropdowns.less +213 -0
  18. data/lib/tennpipes-su/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  19. data/lib/tennpipes-su/bootstrap-less/font-awesome/core.less +12 -0
  20. data/lib/tennpipes-su/bootstrap-less/font-awesome/fixed-width.less +6 -0
  21. data/lib/tennpipes-su/bootstrap-less/font-awesome/font-awesome.less +17 -0
  22. data/lib/tennpipes-su/bootstrap-less/font-awesome/icons.less +412 -0
  23. data/lib/tennpipes-su/bootstrap-less/font-awesome/larger.less +13 -0
  24. data/lib/tennpipes-su/bootstrap-less/font-awesome/list.less +19 -0
  25. data/lib/tennpipes-su/bootstrap-less/font-awesome/mixins.less +20 -0
  26. data/lib/tennpipes-su/bootstrap-less/font-awesome/path.less +14 -0
  27. data/lib/tennpipes-su/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  28. data/lib/tennpipes-su/bootstrap-less/font-awesome/spinning.less +30 -0
  29. data/lib/tennpipes-su/bootstrap-less/font-awesome/stacked.less +20 -0
  30. data/lib/tennpipes-su/bootstrap-less/font-awesome/variables.less +381 -0
  31. data/lib/tennpipes-su/bootstrap-less/forms.less +419 -0
  32. data/lib/tennpipes-su/bootstrap-less/glyphicons.less +233 -0
  33. data/lib/tennpipes-su/bootstrap-less/grid.less +100 -0
  34. data/lib/tennpipes-su/bootstrap-less/input-groups.less +157 -0
  35. data/lib/tennpipes-su/bootstrap-less/jumbotron.less +44 -0
  36. data/lib/tennpipes-su/bootstrap-less/labels.less +64 -0
  37. data/lib/tennpipes-su/bootstrap-less/list-group.less +110 -0
  38. data/lib/tennpipes-su/bootstrap-less/media.less +56 -0
  39. data/lib/tennpipes-su/bootstrap-less/mixins.less +926 -0
  40. data/lib/tennpipes-su/bootstrap-less/modals.less +138 -0
  41. data/lib/tennpipes-su/bootstrap-less/navbar.less +616 -0
  42. data/lib/tennpipes-su/bootstrap-less/navs.less +242 -0
  43. data/lib/tennpipes-su/bootstrap-less/normalize.less +423 -0
  44. data/lib/tennpipes-su/bootstrap-less/pager.less +55 -0
  45. data/lib/tennpipes-su/bootstrap-less/pagination.less +88 -0
  46. data/lib/tennpipes-su/bootstrap-less/panels.less +230 -0
  47. data/lib/tennpipes-su/bootstrap-less/popovers.less +133 -0
  48. data/lib/tennpipes-su/bootstrap-less/print.less +101 -0
  49. data/lib/tennpipes-su/bootstrap-less/progress-bars.less +80 -0
  50. data/lib/tennpipes-su/bootstrap-less/responsive-utilities.less +93 -0
  51. data/lib/tennpipes-su/bootstrap-less/scaffolding.less +134 -0
  52. data/lib/tennpipes-su/bootstrap-less/tables.less +233 -0
  53. data/lib/tennpipes-su/bootstrap-less/tennpipes-su.less +18 -0
  54. data/lib/tennpipes-su/bootstrap-less/theme.less +247 -0
  55. data/lib/tennpipes-su/bootstrap-less/thumbnails.less +36 -0
  56. data/lib/tennpipes-su/bootstrap-less/tooltip.less +95 -0
  57. data/lib/tennpipes-su/bootstrap-less/type.less +296 -0
  58. data/lib/tennpipes-su/bootstrap-less/utilities.less +56 -0
  59. data/lib/tennpipes-su/bootstrap-less/variables.less +827 -0
  60. data/lib/tennpipes-su/bootstrap-less/wells.less +29 -0
  61. data/lib/tennpipes-su/generators/actions.rb +78 -0
  62. data/lib/tennpipes-su/generators/admin_app.rb +169 -0
  63. data/lib/tennpipes-su/generators/admin_page.rb +68 -0
  64. data/lib/tennpipes-su/generators/orm.rb +172 -0
  65. data/lib/tennpipes-su/generators/templates/account/activerecord.rb.tt +41 -0
  66. data/lib/tennpipes-su/generators/templates/account/couchrest.rb.tt +67 -0
  67. data/lib/tennpipes-su/generators/templates/account/datamapper.rb.tt +56 -0
  68. data/lib/tennpipes-su/generators/templates/account/dynamoid.rb.tt +55 -0
  69. data/lib/tennpipes-su/generators/templates/account/minirecord.rb.tt +44 -0
  70. data/lib/tennpipes-su/generators/templates/account/mongoid.rb.tt +54 -0
  71. data/lib/tennpipes-su/generators/templates/account/mongomapper.rb.tt +47 -0
  72. data/lib/tennpipes-su/generators/templates/account/ohm.rb.tt +70 -0
  73. data/lib/tennpipes-su/generators/templates/account/seeds.rb.tt +29 -0
  74. data/lib/tennpipes-su/generators/templates/account/sequel.rb.tt +53 -0
  75. data/lib/tennpipes-su/generators/templates/app.rb.tt +42 -0
  76. data/lib/tennpipes-su/generators/templates/app/controllers/base.rb.tt +5 -0
  77. data/lib/tennpipes-su/generators/templates/app/controllers/sessions.rb.tt +29 -0
  78. data/lib/tennpipes-su/generators/templates/assets/images/favicon.ico +0 -0
  79. data/lib/tennpipes-su/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  80. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  81. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.svg +414 -0
  82. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  83. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  84. data/lib/tennpipes-su/generators/templates/assets/images/logo.png +0 -0
  85. data/lib/tennpipes-su/generators/templates/assets/javascripts/application.js +118 -0
  86. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/affix.js +137 -0
  87. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/alert.js +88 -0
  88. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
  89. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/button.js +107 -0
  90. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/carousel.js +205 -0
  91. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/collapse.js +170 -0
  92. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/dropdown.js +147 -0
  93. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  94. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/popover.js +110 -0
  95. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/scrollspy.js +153 -0
  96. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tab.js +125 -0
  97. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tooltip.js +399 -0
  98. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/transition.js +48 -0
  99. data/lib/tennpipes-su/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  100. data/lib/tennpipes-su/generators/templates/assets/stylesheets/application.css +353 -0
  101. data/lib/tennpipes-su/generators/templates/assets/stylesheets/bootstrap.css +4 -0
  102. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  103. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  104. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  105. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  106. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  107. data/lib/tennpipes-su/generators/templates/erb/app/base/index.erb.tt +15 -0
  108. data/lib/tennpipes-su/generators/templates/erb/app/errors/403.erb.tt +3 -0
  109. data/lib/tennpipes-su/generators/templates/erb/app/errors/404.erb.tt +3 -0
  110. data/lib/tennpipes-su/generators/templates/erb/app/errors/500.erb.tt +3 -0
  111. data/lib/tennpipes-su/generators/templates/erb/app/layouts/application.erb.tt +64 -0
  112. data/lib/tennpipes-su/generators/templates/erb/app/layouts/error.erb.tt +23 -0
  113. data/lib/tennpipes-su/generators/templates/erb/app/sessions/new.erb.tt +44 -0
  114. data/lib/tennpipes-su/generators/templates/erb/page/_form.erb.tt +18 -0
  115. data/lib/tennpipes-su/generators/templates/erb/page/edit.erb.tt +10 -0
  116. data/lib/tennpipes-su/generators/templates/erb/page/index.erb.tt +81 -0
  117. data/lib/tennpipes-su/generators/templates/erb/page/new.erb.tt +9 -0
  118. data/lib/tennpipes-su/generators/templates/haml/app/base/index.haml.tt +12 -0
  119. data/lib/tennpipes-su/generators/templates/haml/app/errors/403.haml.tt +3 -0
  120. data/lib/tennpipes-su/generators/templates/haml/app/errors/404.haml.tt +3 -0
  121. data/lib/tennpipes-su/generators/templates/haml/app/errors/500.haml.tt +3 -0
  122. data/lib/tennpipes-su/generators/templates/haml/app/layouts/application.haml.tt +49 -0
  123. data/lib/tennpipes-su/generators/templates/haml/app/layouts/error.haml.tt +18 -0
  124. data/lib/tennpipes-su/generators/templates/haml/app/sessions/new.haml.tt +38 -0
  125. data/lib/tennpipes-su/generators/templates/haml/page/_form.haml.tt +16 -0
  126. data/lib/tennpipes-su/generators/templates/haml/page/edit.haml.tt +8 -0
  127. data/lib/tennpipes-su/generators/templates/haml/page/index.haml.tt +58 -0
  128. data/lib/tennpipes-su/generators/templates/haml/page/new.haml.tt +7 -0
  129. data/lib/tennpipes-su/generators/templates/page/controller.rb.tt +92 -0
  130. data/lib/tennpipes-su/generators/templates/slim/app/base/index.slim.tt +12 -0
  131. data/lib/tennpipes-su/generators/templates/slim/app/errors/403.slim.tt +3 -0
  132. data/lib/tennpipes-su/generators/templates/slim/app/errors/404.slim.tt +3 -0
  133. data/lib/tennpipes-su/generators/templates/slim/app/errors/500.slim.tt +3 -0
  134. data/lib/tennpipes-su/generators/templates/slim/app/layouts/application.slim.tt +48 -0
  135. data/lib/tennpipes-su/generators/templates/slim/app/layouts/error.slim.tt +19 -0
  136. data/lib/tennpipes-su/generators/templates/slim/app/sessions/new.slim.tt +37 -0
  137. data/lib/tennpipes-su/generators/templates/slim/page/_form.slim.tt +16 -0
  138. data/lib/tennpipes-su/generators/templates/slim/page/edit.slim.tt +8 -0
  139. data/lib/tennpipes-su/generators/templates/slim/page/index.slim.tt +56 -0
  140. data/lib/tennpipes-su/generators/templates/slim/page/new.slim.tt +7 -0
  141. data/lib/tennpipes-su/helpers/authentication_helpers.rb +108 -0
  142. data/lib/tennpipes-su/helpers/view_helpers.rb +87 -0
  143. data/lib/tennpipes-su/locale/admin/cs.yml +56 -0
  144. data/lib/tennpipes-su/locale/admin/da.yml +56 -0
  145. data/lib/tennpipes-su/locale/admin/de.yml +56 -0
  146. data/lib/tennpipes-su/locale/admin/en.yml +56 -0
  147. data/lib/tennpipes-su/locale/admin/es.yml +56 -0
  148. data/lib/tennpipes-su/locale/admin/fr.yml +56 -0
  149. data/lib/tennpipes-su/locale/admin/hu.yml +56 -0
  150. data/lib/tennpipes-su/locale/admin/it.yml +56 -0
  151. data/lib/tennpipes-su/locale/admin/ja.yml +57 -0
  152. data/lib/tennpipes-su/locale/admin/lv.yml +56 -0
  153. data/lib/tennpipes-su/locale/admin/nl.yml +56 -0
  154. data/lib/tennpipes-su/locale/admin/no.yml +56 -0
  155. data/lib/tennpipes-su/locale/admin/pl.yml +56 -0
  156. data/lib/tennpipes-su/locale/admin/pt_br.yml +56 -0
  157. data/lib/tennpipes-su/locale/admin/ro.yml +56 -0
  158. data/lib/tennpipes-su/locale/admin/ru.yml +57 -0
  159. data/lib/tennpipes-su/locale/admin/sv.yml +56 -0
  160. data/lib/tennpipes-su/locale/admin/tr.yml +56 -0
  161. data/lib/tennpipes-su/locale/admin/uk.yml +56 -0
  162. data/lib/tennpipes-su/locale/admin/zh_cn.yml +56 -0
  163. data/lib/tennpipes-su/locale/admin/zh_tw.yml +56 -0
  164. data/lib/tennpipes-su/locale/orm/cs.yml +12 -0
  165. data/lib/tennpipes-su/locale/orm/da.yml +12 -0
  166. data/lib/tennpipes-su/locale/orm/de.yml +12 -0
  167. data/lib/tennpipes-su/locale/orm/en.yml +12 -0
  168. data/lib/tennpipes-su/locale/orm/es.yml +12 -0
  169. data/lib/tennpipes-su/locale/orm/fr.yml +12 -0
  170. data/lib/tennpipes-su/locale/orm/hu.yml +12 -0
  171. data/lib/tennpipes-su/locale/orm/it.yml +12 -0
  172. data/lib/tennpipes-su/locale/orm/ja.yml +12 -0
  173. data/lib/tennpipes-su/locale/orm/lv.yml +12 -0
  174. data/lib/tennpipes-su/locale/orm/nl.yml +12 -0
  175. data/lib/tennpipes-su/locale/orm/no.yml +12 -0
  176. data/lib/tennpipes-su/locale/orm/pl.yml +38 -0
  177. data/lib/tennpipes-su/locale/orm/pt_br.yml +12 -0
  178. data/lib/tennpipes-su/locale/orm/ro.yml +12 -0
  179. data/lib/tennpipes-su/locale/orm/ru.yml +12 -0
  180. data/lib/tennpipes-su/locale/orm/sv.yml +12 -0
  181. data/lib/tennpipes-su/locale/orm/tr.yml +12 -0
  182. data/lib/tennpipes-su/locale/orm/uk.yml +12 -0
  183. data/lib/tennpipes-su/locale/orm/zh_cn.yml +12 -0
  184. data/lib/tennpipes-su/locale/orm/zh_tw.yml +12 -0
  185. data/test/fixtures/sequel.rb +72 -0
  186. data/test/generators/test_account_model_generator.rb +108 -0
  187. data/test/generators/test_admin_app_generator.rb +218 -0
  188. data/test/generators/test_admin_page_generator.rb +140 -0
  189. data/test/helper.rb +47 -0
  190. data/test/test_admin_application.rb +271 -0
  191. data/test/test_locale.rb +25 -0
  192. metadata +298 -0
@@ -0,0 +1,232 @@
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
+ outline: none;
95
+ color: @carousel-control-color;
96
+ text-decoration: none;
97
+ .opacity(.9);
98
+ }
99
+
100
+ // Toggles
101
+ .icon-prev,
102
+ .icon-next,
103
+ .glyphicon-chevron-left,
104
+ .glyphicon-chevron-right {
105
+ position: absolute;
106
+ top: 50%;
107
+ z-index: 5;
108
+ display: inline-block;
109
+ }
110
+ .icon-prev,
111
+ .glyphicon-chevron-left {
112
+ left: 50%;
113
+ }
114
+ .icon-next,
115
+ .glyphicon-chevron-right {
116
+ right: 50%;
117
+ }
118
+ .icon-prev,
119
+ .icon-next {
120
+ width: 20px;
121
+ height: 20px;
122
+ margin-top: -10px;
123
+ margin-left: -10px;
124
+ font-family: serif;
125
+ }
126
+
127
+ .icon-prev {
128
+ &:before {
129
+ content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
130
+ }
131
+ }
132
+ .icon-next {
133
+ &:before {
134
+ content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
135
+ }
136
+ }
137
+ }
138
+
139
+ // Optional indicator pips
140
+ //
141
+ // Add an unordered list with the following class and add a list item for each
142
+ // slide your carousel holds.
143
+
144
+ .carousel-indicators {
145
+ position: absolute;
146
+ bottom: 10px;
147
+ left: 50%;
148
+ z-index: 15;
149
+ width: 60%;
150
+ margin-left: -30%;
151
+ padding-left: 0;
152
+ list-style: none;
153
+ text-align: center;
154
+
155
+ li {
156
+ display: inline-block;
157
+ width: 10px;
158
+ height: 10px;
159
+ margin: 1px;
160
+ text-indent: -999px;
161
+ border: 1px solid @carousel-indicator-border-color;
162
+ border-radius: 10px;
163
+ cursor: pointer;
164
+
165
+ // IE8-9 hack for event handling
166
+ //
167
+ // Internet Explorer 8-9 does not support clicks on elements without a set
168
+ // `background-color`. We cannot use `filter` since that's not viewed as a
169
+ // background color by the browser. Thus, a hack is needed.
170
+ //
171
+ // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
172
+ // set alpha transparency for the best results possible.
173
+ background-color: #000 \9; // IE8
174
+ background-color: rgba(0,0,0,0); // IE9
175
+ }
176
+ .active {
177
+ margin: 0;
178
+ width: 12px;
179
+ height: 12px;
180
+ background-color: @carousel-indicator-active-bg;
181
+ }
182
+ }
183
+
184
+ // Optional captions
185
+ // -----------------------------
186
+ // Hidden by default for smaller viewports
187
+ .carousel-caption {
188
+ position: absolute;
189
+ left: 15%;
190
+ right: 15%;
191
+ bottom: 20px;
192
+ z-index: 10;
193
+ padding-top: 20px;
194
+ padding-bottom: 20px;
195
+ color: @carousel-caption-color;
196
+ text-align: center;
197
+ text-shadow: @carousel-text-shadow;
198
+ & .btn {
199
+ text-shadow: none; // No shadow for button elements in carousel-caption
200
+ }
201
+ }
202
+
203
+
204
+ // Scale up controls for tablets and up
205
+ @media screen and (min-width: @screen-sm-min) {
206
+
207
+ // Scale up the controls a smidge
208
+ .carousel-control {
209
+ .glyphicons-chevron-left,
210
+ .glyphicons-chevron-right,
211
+ .icon-prev,
212
+ .icon-next {
213
+ width: 30px;
214
+ height: 30px;
215
+ margin-top: -15px;
216
+ margin-left: -15px;
217
+ font-size: 30px;
218
+ }
219
+ }
220
+
221
+ // Show and left align the captions
222
+ .carousel-caption {
223
+ left: 20%;
224
+ right: 20%;
225
+ padding-bottom: 30px;
226
+ }
227
+
228
+ // Move up the indicators
229
+ .carousel-indicators {
230
+ bottom: 20px;
231
+ }
232
+ }
@@ -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,63 @@
1
+ //
2
+ // Code (inline and block)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ kbd,
9
+ pre,
10
+ samp {
11
+ font-family: @font-family-monospace;
12
+ }
13
+
14
+ // Inline code
15
+ code {
16
+ padding: 2px 4px;
17
+ font-size: 90%;
18
+ color: @code-color;
19
+ background-color: @code-bg;
20
+ white-space: nowrap;
21
+ border-radius: @border-radius-base;
22
+ }
23
+
24
+ // User input typically entered via keyboard
25
+ kbd {
26
+ padding: 2px 4px;
27
+ font-size: 90%;
28
+ color: @kbd-color;
29
+ background-color: @kbd-bg;
30
+ border-radius: @border-radius-small;
31
+ box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
32
+ }
33
+
34
+ // Blocks of code
35
+ pre {
36
+ display: block;
37
+ padding: ((@line-height-computed - 1) / 2);
38
+ margin: 0 0 (@line-height-computed / 2);
39
+ font-size: (@font-size-base - 1); // 14px to 13px
40
+ line-height: @line-height-base;
41
+ word-break: break-all;
42
+ word-wrap: break-word;
43
+ color: @pre-color;
44
+ background-color: @pre-bg;
45
+ border: 1px solid @pre-border-color;
46
+ border-radius: @border-radius-base;
47
+
48
+ // Account for some code outputs that place code tags in pre tags
49
+ code {
50
+ padding: 0;
51
+ font-size: inherit;
52
+ color: inherit;
53
+ white-space: pre-wrap;
54
+ background-color: transparent;
55
+ border-radius: 0;
56
+ }
57
+ }
58
+
59
+ // Enable scrollable blocks of code
60
+ .pre-scrollable {
61
+ max-height: @pre-scrollable-max-height;
62
+ overflow-y: scroll;
63
+ }
@@ -0,0 +1,29 @@
1
+ //
2
+ // Component animations
3
+ // --------------------------------------------------
4
+
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
9
+
10
+ .fade {
11
+ opacity: 0;
12
+ .transition(opacity .15s linear);
13
+ &.in {
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ .collapse {
19
+ display: none;
20
+ &.in {
21
+ display: block;
22
+ }
23
+ }
24
+ .collapsing {
25
+ position: relative;
26
+ height: 0;
27
+ overflow: hidden;
28
+ .transition(height .35s ease);
29
+ }
@@ -0,0 +1,213 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Dropdown arrow/caret
7
+ .caret {
8
+ display: inline-block;
9
+ width: 0;
10
+ height: 0;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: @caret-width-base solid;
14
+ border-right: @caret-width-base solid transparent;
15
+ border-left: @caret-width-base solid transparent;
16
+ }
17
+
18
+ // The dropdown wrapper (div)
19
+ .dropdown {
20
+ position: relative;
21
+ }
22
+
23
+ // Prevent the focus on the dropdown toggle when closing dropdowns
24
+ .dropdown-toggle:focus {
25
+ outline: 0;
26
+ }
27
+
28
+ // The dropdown menu (ul)
29
+ .dropdown-menu {
30
+ position: absolute;
31
+ top: 100%;
32
+ left: 0;
33
+ z-index: @zindex-dropdown;
34
+ display: none; // none by default, but block on "open" of the menu
35
+ float: left;
36
+ min-width: 160px;
37
+ padding: 5px 0;
38
+ margin: 2px 0 0; // override default ul
39
+ list-style: none;
40
+ font-size: @font-size-base;
41
+ background-color: @dropdown-bg;
42
+ border: 1px solid @dropdown-fallback-border; // IE8 fallback
43
+ border: 1px solid @dropdown-border;
44
+ border-radius: @border-radius-base;
45
+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
46
+ background-clip: padding-box;
47
+
48
+ // Aligns the dropdown menu to right
49
+ //
50
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
51
+ &.pull-right {
52
+ right: 0;
53
+ left: auto;
54
+ }
55
+
56
+ // Dividers (basically an hr) within the dropdown
57
+ .divider {
58
+ .nav-divider(@dropdown-divider-bg);
59
+ }
60
+
61
+ // Links within the dropdown menu
62
+ > li > a {
63
+ display: block;
64
+ padding: 3px 20px;
65
+ clear: both;
66
+ font-weight: normal;
67
+ line-height: @line-height-base;
68
+ color: @dropdown-link-color;
69
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
70
+ }
71
+ }
72
+
73
+ // Hover/Focus state
74
+ .dropdown-menu > li > a {
75
+ &:hover,
76
+ &:focus {
77
+ text-decoration: none;
78
+ color: @dropdown-link-hover-color;
79
+ background-color: @dropdown-link-hover-bg;
80
+ }
81
+ }
82
+
83
+ // Active state
84
+ .dropdown-menu > .active > a {
85
+ &,
86
+ &:hover,
87
+ &:focus {
88
+ color: @dropdown-link-active-color;
89
+ text-decoration: none;
90
+ outline: 0;
91
+ background-color: @dropdown-link-active-bg;
92
+ }
93
+ }
94
+
95
+ // Disabled state
96
+ //
97
+ // Gray out text and ensure the hover/focus state remains gray
98
+
99
+ .dropdown-menu > .disabled > a {
100
+ &,
101
+ &:hover,
102
+ &:focus {
103
+ color: @dropdown-link-disabled-color;
104
+ }
105
+ }
106
+ // Nuke hover/focus effects
107
+ .dropdown-menu > .disabled > a {
108
+ &:hover,
109
+ &:focus {
110
+ text-decoration: none;
111
+ background-color: transparent;
112
+ background-image: none; // Remove CSS gradient
113
+ .reset-filter();
114
+ cursor: not-allowed;
115
+ }
116
+ }
117
+
118
+ // Open state for the dropdown
119
+ .open {
120
+ // Show the menu
121
+ > .dropdown-menu {
122
+ display: block;
123
+ }
124
+
125
+ // Remove the outline when :focus is triggered
126
+ > a {
127
+ outline: 0;
128
+ }
129
+ }
130
+
131
+ // Menu positioning
132
+ //
133
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
134
+ // menu with the parent.
135
+ .dropdown-menu-right {
136
+ left: auto; // Reset the default from `.dropdown-menu`
137
+ right: 0;
138
+ }
139
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
140
+ // aligned nav component. To enable the undoing of that, we provide an override
141
+ // to restore the default dropdown menu alignment.
142
+ //
143
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
144
+ // `.pull-right` nav component.
145
+ .dropdown-menu-left {
146
+ left: 0;
147
+ right: auto;
148
+ }
149
+
150
+ // Dropdown section headers
151
+ .dropdown-header {
152
+ display: block;
153
+ padding: 3px 20px;
154
+ font-size: @font-size-small;
155
+ line-height: @line-height-base;
156
+ color: @dropdown-header-color;
157
+ }
158
+
159
+ // Backdrop to catch body clicks on mobile, etc.
160
+ .dropdown-backdrop {
161
+ position: fixed;
162
+ left: 0;
163
+ right: 0;
164
+ bottom: 0;
165
+ top: 0;
166
+ z-index: (@zindex-dropdown - 10);
167
+ }
168
+
169
+ // Right aligned dropdowns
170
+ .pull-right > .dropdown-menu {
171
+ right: 0;
172
+ left: auto;
173
+ }
174
+
175
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
176
+ //
177
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
178
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
179
+
180
+ .dropup,
181
+ .navbar-fixed-bottom .dropdown {
182
+ // Reverse the caret
183
+ .caret {
184
+ border-top: 0;
185
+ border-bottom: @caret-width-base solid;
186
+ content: "";
187
+ }
188
+ // Different positioning for bottom up menu
189
+ .dropdown-menu {
190
+ top: auto;
191
+ bottom: 100%;
192
+ margin-bottom: 1px;
193
+ }
194
+ }
195
+
196
+
197
+ // Component alignment
198
+ //
199
+ // Reiterate per navbar.less and the modified component alignment there.
200
+
201
+ @media (min-width: @grid-float-breakpoint) {
202
+ .navbar-right {
203
+ .dropdown-menu {
204
+ .dropdown-menu-right();
205
+ }
206
+ // Necessary for overrides of the default right aligned menu.
207
+ // Will remove come v4 in all likelihood.
208
+ .dropdown-menu-left {
209
+ .dropdown-menu-left();
210
+ }
211
+ }
212
+ }
213
+