scales-monitor 0.0.1.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +6 -0
  3. data/LICENSE +22 -0
  4. data/Rakefile +8 -0
  5. data/bin/scales-monitor +8 -0
  6. data/lib/scales-monitor.rb +11 -0
  7. data/lib/scales-monitor/app/Gemfile +3 -0
  8. data/lib/scales-monitor/app/Rakefile +0 -0
  9. data/lib/scales-monitor/app/app/assets/images/.gitignore +0 -0
  10. data/lib/scales-monitor/app/app/assets/images/glyphicons-halflings-white.png +0 -0
  11. data/lib/scales-monitor/app/app/assets/images/glyphicons-halflings.png +0 -0
  12. data/lib/scales-monitor/app/app/assets/javascripts/app/config/config.js.coffee +8 -0
  13. data/lib/scales-monitor/app/app/assets/javascripts/app/config/routes.js.coffee +15 -0
  14. data/lib/scales-monitor/app/app/assets/javascripts/app/controllers/.gitignore +0 -0
  15. data/lib/scales-monitor/app/app/assets/javascripts/app/controllers/log.jst.coffee +58 -0
  16. data/lib/scales-monitor/app/app/assets/javascripts/app/controllers/machines.js.coffee +60 -0
  17. data/lib/scales-monitor/app/app/assets/javascripts/app/controllers/queues.js.coffee +55 -0
  18. data/lib/scales-monitor/app/app/assets/javascripts/app/controllers/resources.js.coffee +128 -0
  19. data/lib/scales-monitor/app/app/assets/javascripts/app/index.js.coffee +8 -0
  20. data/lib/scales-monitor/app/app/assets/javascripts/app/models/.gitignore +0 -0
  21. data/lib/scales-monitor/app/app/assets/javascripts/app/models/socket.js.coffee +9 -0
  22. data/lib/scales-monitor/app/app/assets/javascripts/app/views/.gitignore +0 -0
  23. data/lib/scales-monitor/app/app/assets/javascripts/app/views/_format_bar.jst.eco +10 -0
  24. data/lib/scales-monitor/app/app/assets/javascripts/app/views/_machine.jst.eco +11 -0
  25. data/lib/scales-monitor/app/app/assets/javascripts/app/views/_queue_item.jst.eco +10 -0
  26. data/lib/scales-monitor/app/app/assets/javascripts/app/views/_resource.jst.eco +5 -0
  27. data/lib/scales-monitor/app/app/assets/javascripts/app/views/_top.jst.eco +1 -0
  28. data/lib/scales-monitor/app/app/assets/javascripts/app/views/log.jst.eco +11 -0
  29. data/lib/scales-monitor/app/app/assets/javascripts/app/views/machines.jst.eco +33 -0
  30. data/lib/scales-monitor/app/app/assets/javascripts/app/views/queues.jst.eco +33 -0
  31. data/lib/scales-monitor/app/app/assets/javascripts/app/views/resources.jst.eco +31 -0
  32. data/lib/scales-monitor/app/app/assets/javascripts/application.js.coffee +16 -0
  33. data/lib/scales-monitor/app/app/assets/javascripts/lib/bootstrap.js +1825 -0
  34. data/lib/scales-monitor/app/app/assets/javascripts/lib/jquery.js +4 -0
  35. data/lib/scales-monitor/app/app/assets/javascripts/lib/jquery.timeago.js +152 -0
  36. data/lib/scales-monitor/app/app/assets/javascripts/lib/json2.js +485 -0
  37. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/ajax.coffee +208 -0
  38. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/list.coffee +43 -0
  39. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/local.coffee +16 -0
  40. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/manager.coffee +83 -0
  41. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/relation.coffee +144 -0
  42. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/route.coffee +145 -0
  43. data/lib/scales-monitor/app/app/assets/javascripts/lib/spine/spine.coffee +537 -0
  44. data/lib/scales-monitor/app/app/assets/stylesheets/application.css.scss +58 -0
  45. data/lib/scales-monitor/app/app/assets/stylesheets/bootstrap-docs.css +845 -0
  46. data/lib/scales-monitor/app/app/assets/stylesheets/bootstrap-responsive.css +815 -0
  47. data/lib/scales-monitor/app/app/assets/stylesheets/bootstrap.css +4983 -0
  48. data/lib/scales-monitor/app/app/views/index.html.erb +45 -0
  49. data/lib/scales-monitor/app/config.ru +3 -0
  50. data/lib/scales-monitor/app/config/config.rb +17 -0
  51. data/lib/scales-monitor/app/config/routes.rb +13 -0
  52. data/lib/scales-monitor/app/public/assets/.gitignore +0 -0
  53. data/lib/scales-monitor/app/public/assets/application.css +6709 -0
  54. data/lib/scales-monitor/app/public/assets/application.js +5563 -0
  55. data/lib/scales-monitor/app/public/assets/glyphicons-halflings-white.png +0 -0
  56. data/lib/scales-monitor/app/public/assets/glyphicons-halflings.png +0 -0
  57. data/lib/scales-monitor/app/public/index.html +45 -0
  58. data/lib/scales-monitor/base.rb +17 -0
  59. data/lib/scales-monitor/boot/autoload.rb +5 -0
  60. data/lib/scales-monitor/boot/initializers/goliath.rb +3 -0
  61. data/lib/scales-monitor/monitor.rb +33 -0
  62. data/lib/scales-monitor/version.rb +5 -0
  63. data/lib/scales-monitor/web_socket.rb +180 -0
  64. data/scales-monitor.gemspec +24 -0
  65. data/spec/gem_spec.rb +7 -0
  66. data/spec/helper.rb +50 -0
  67. data/spec/monitor_spec.rb +50 -0
  68. data/spec/web_socket_spec.rb +103 -0
  69. metadata +174 -0
@@ -0,0 +1,58 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require bootstrap
13
+ *= require bootstrap-responsive
14
+ *= require bootstrap-docs
15
+ *= require_tree .
16
+ */
17
+
18
+ .stack > *:not(.active) { display: none; }
19
+
20
+ p.machine{ margin-bottom:0; margin-top: 10px}
21
+ .well.dark-grey{ background-color: rgb(100, 100, 100); }
22
+ h2.white{ color:#FFFFFF; }
23
+
24
+ .block, .block a, .block a:hover, .block a:visited{
25
+ color: #5A5A5A;
26
+ text-decoration: none;
27
+ }
28
+
29
+ .progress.color{
30
+ height: 60px;
31
+ }
32
+
33
+ .progress .bar.color{
34
+ background-image: none;
35
+ height: 60px;
36
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
37
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
38
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
39
+ }
40
+
41
+ .progress .overlay{
42
+ color: #5A5A5A;
43
+ margin-left: 0;
44
+ float: left;
45
+ line-height: 60px;
46
+ }
47
+
48
+ .log.well{
49
+ background-color: rgb(30, 30, 30);
50
+ color: rgb(0, 158, 242);
51
+ font-family: 'Monaco', monospace;
52
+ height: 400px;
53
+ overflow-y: scroll;
54
+ font-size: 11px;
55
+ }
56
+
57
+ .log span.date{ font-weight:bold; }
58
+ .log span.event{ font-weight:bold; color: #91FF00; }
@@ -0,0 +1,845 @@
1
+ /* Add additional stylesheets below
2
+ -------------------------------------------------- */
3
+ /*
4
+ Bootstrap's documentation styles
5
+ Special styles for presenting Bootstrap's documentation and examples
6
+ */
7
+
8
+
9
+ /* Body and structure
10
+ -------------------------------------------------- */
11
+ body {
12
+ position: relative;
13
+ padding-top: 90px;
14
+ background-color: #fff;
15
+ background-repeat: repeat-x;
16
+ background-position: 0 40px;
17
+ }
18
+
19
+
20
+ /* Tweak navbar brand link to be super sleek
21
+ -------------------------------------------------- */
22
+ .navbar-fixed-top .brand {
23
+ padding-right: 0;
24
+ padding-left: 0;
25
+ margin-left: 20px;
26
+ float: right;
27
+ font-weight: bold;
28
+ color: #000;
29
+ text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125);
30
+ -webkit-transition: all .2s linear;
31
+ -moz-transition: all .2s linear;
32
+ transition: all .2s linear;
33
+ }
34
+ .navbar-fixed-top .brand:hover {
35
+ text-decoration: none;
36
+ }
37
+
38
+
39
+ /* Space out sub-sections more
40
+ -------------------------------------------------- */
41
+ section {
42
+ padding-top: 60px;
43
+ }
44
+
45
+ /* Faded out hr */
46
+ hr.soften {
47
+ height: 1px;
48
+ margin: 54px 0;
49
+ background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
50
+ background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
51
+ background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
52
+ background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
53
+ border: 0;
54
+ }
55
+
56
+
57
+ /* Jumbotrons
58
+ -------------------------------------------------- */
59
+ .jumbotron {
60
+ position: relative;
61
+ }
62
+ .jumbotron h1 {
63
+ margin-bottom: 9px;
64
+ font-size: 81px;
65
+ font-weight: bold;
66
+ letter-spacing: -1px;
67
+ line-height: 1;
68
+ }
69
+ .jumbotron p {
70
+ margin-bottom: 18px;
71
+ font-weight: 300;
72
+ }
73
+ .jumbotron .btn-large {
74
+ font-size: 20px;
75
+ font-weight: normal;
76
+ padding: 14px 24px;
77
+ margin-right: 10px;
78
+ -webkit-border-radius: 6px;
79
+ -moz-border-radius: 6px;
80
+ border-radius: 6px;
81
+ }
82
+ .jumbotron .btn-large small {
83
+ font-size: 14px;
84
+ }
85
+
86
+ /* Masthead (docs home) */
87
+ .masthead {
88
+ padding-top: 36px;
89
+ margin-bottom: 72px;
90
+ }
91
+ .masthead h1,
92
+ .masthead p {
93
+ text-align: center;
94
+ }
95
+ .masthead h1 {
96
+ margin-bottom: 18px;
97
+ }
98
+ .masthead p {
99
+ margin-left: 5%;
100
+ margin-right: 5%;
101
+ font-size: 30px;
102
+ line-height: 36px;
103
+ }
104
+
105
+
106
+ /* Specific jumbotrons
107
+ ------------------------- */
108
+ /* supporting docs pages */
109
+ .subhead {
110
+ padding-bottom: 0;
111
+ margin-bottom: 9px;
112
+ }
113
+ .subhead h1 {
114
+ font-size: 54px;
115
+ }
116
+
117
+ /* Subnav */
118
+ .subnav {
119
+ width: 100%;
120
+ height: 36px;
121
+ background-color: #eeeeee; /* Old browsers */
122
+ background-repeat: repeat-x; /* Repeat the gradient */
123
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
124
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
125
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */
126
+ background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
127
+ background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
128
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
129
+ background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
130
+ border: 1px solid #e5e5e5;
131
+ -webkit-border-radius: 4px;
132
+ -moz-border-radius: 4px;
133
+ border-radius: 4px;
134
+ }
135
+ .subnav .nav {
136
+ margin-bottom: 0;
137
+ }
138
+ .subnav .nav > li > a {
139
+ margin: 0;
140
+ padding-top: 11px;
141
+ padding-bottom: 11px;
142
+ border-left: 1px solid #f5f5f5;
143
+ border-right: 1px solid #e5e5e5;
144
+ -webkit-border-radius: 0;
145
+ -moz-border-radius: 0;
146
+ border-radius: 0;
147
+ }
148
+ .subnav .nav > .active > a,
149
+ .subnav .nav > .active > a:hover {
150
+ padding-left: 13px;
151
+ color: #777;
152
+ background-color: #e9e9e9;
153
+ border-right-color: #ddd;
154
+ border-left: 0;
155
+ -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
156
+ -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
157
+ box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
158
+ }
159
+ .subnav .nav > .active > a .caret,
160
+ .subnav .nav > .active > a:hover .caret {
161
+ border-top-color: #777;
162
+ }
163
+ .subnav .nav > li:first-child > a,
164
+ .subnav .nav > li:first-child > a:hover {
165
+ border-left: 0;
166
+ padding-left: 12px;
167
+ -webkit-border-radius: 4px 0 0 4px;
168
+ -moz-border-radius: 4px 0 0 4px;
169
+ border-radius: 4px 0 0 4px;
170
+ }
171
+ .subnav .nav > li:last-child > a {
172
+ border-right: 0;
173
+ }
174
+ .subnav .dropdown-menu {
175
+ -webkit-border-radius: 0 0 4px 4px;
176
+ -moz-border-radius: 0 0 4px 4px;
177
+ border-radius: 0 0 4px 4px;
178
+ }
179
+
180
+ /* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */
181
+ @media (min-width: 980px) {
182
+ .subnav-fixed {
183
+ position: fixed;
184
+ top: 40px;
185
+ left: 0;
186
+ right: 0;
187
+ z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
188
+ border-color: #d5d5d5;
189
+ border-width: 0 0 1px; /* drop the border on the fixed edges */
190
+ -webkit-border-radius: 0;
191
+ -moz-border-radius: 0;
192
+ border-radius: 0;
193
+ -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
194
+ -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
195
+ box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
196
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
197
+ }
198
+ .subnav-fixed .nav {
199
+ width: 938px;
200
+ margin: 0 auto;
201
+ padding: 0 1px;
202
+ }
203
+ .subnav .nav > li:first-child > a,
204
+ .subnav .nav > li:first-child > a:hover {
205
+ -webkit-border-radius: 0;
206
+ -moz-border-radius: 0;
207
+ border-radius: 0;
208
+ }
209
+ }
210
+
211
+
212
+ /* Quick links
213
+ -------------------------------------------------- */
214
+ .bs-links {
215
+ margin: 36px 0;
216
+ }
217
+ .quick-links {
218
+ min-height: 30px;
219
+ margin: 0;
220
+ padding: 5px 20px;
221
+ list-style: none;
222
+ text-align: center;
223
+ overflow: hidden;
224
+ }
225
+ .quick-links:first-child {
226
+ min-height: 0;
227
+ }
228
+ .quick-links li {
229
+ display: inline;
230
+ margin: 0 8px;
231
+ color: #999;
232
+ }
233
+ .quick-links .github-btn,
234
+ .quick-links .tweet-btn,
235
+ .quick-links .follow-btn {
236
+ position: relative;
237
+ top: 5px;
238
+ }
239
+
240
+
241
+ /* Marketing section of Overview
242
+ -------------------------------------------------- */
243
+ .marketing .row {
244
+ margin-bottom: 9px;
245
+ }
246
+ .marketing h1 {
247
+ margin: 36px 0 27px;
248
+ font-size: 40px;
249
+ font-weight: 300;
250
+ text-align: center;
251
+ }
252
+ .marketing h2,
253
+ .marketing h3 {
254
+ font-weight: 300;
255
+ }
256
+ .marketing h2 {
257
+ font-size: 22px;
258
+ }
259
+ .marketing p {
260
+ margin-right: 10px;
261
+ }
262
+ .marketing .bs-icon {
263
+ float: left;
264
+ margin: 7px 10px 0 0;
265
+ opacity: .8;
266
+ }
267
+ .marketing .small-bs-icon {
268
+ float: left;
269
+ margin: 4px 5px 0 0;
270
+ }
271
+
272
+
273
+
274
+ /* Footer
275
+ -------------------------------------------------- */
276
+ .footer {
277
+ margin-top: 45px;
278
+ padding: 35px 0 36px;
279
+ border-top: 1px solid #e5e5e5;
280
+ }
281
+ .footer p {
282
+ margin-bottom: 0;
283
+ color: #555;
284
+ }
285
+
286
+
287
+
288
+ /* Special grid styles
289
+ -------------------------------------------------- */
290
+ .show-grid {
291
+ margin-top: 10px;
292
+ margin-bottom: 20px;
293
+ }
294
+ .show-grid [class*="span"] {
295
+ background-color: #eee;
296
+ text-align: center;
297
+ -webkit-border-radius: 3px;
298
+ -moz-border-radius: 3px;
299
+ border-radius: 3px;
300
+ min-height: 30px;
301
+ line-height: 30px;
302
+ }
303
+ .show-grid:hover [class*="span"] {
304
+ background: #ddd;
305
+ }
306
+ .show-grid .show-grid {
307
+ margin-top: 0;
308
+ margin-bottom: 0;
309
+ }
310
+ .show-grid .show-grid [class*="span"] {
311
+ background-color: #ccc;
312
+ }
313
+
314
+
315
+ /* Render mini layout previews
316
+ -------------------------------------------------- */
317
+ .mini-layout {
318
+ border: 1px solid #ddd;
319
+ -webkit-border-radius: 6px;
320
+ -moz-border-radius: 6px;
321
+ border-radius: 6px;
322
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075);
323
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.075);
324
+ box-shadow: 0 1px 2px rgba(0,0,0,.075);
325
+ }
326
+ .mini-layout {
327
+ height: 240px;
328
+ margin-bottom: 20px;
329
+ padding: 9px;
330
+ }
331
+ .mini-layout div {
332
+ -webkit-border-radius: 3px;
333
+ -moz-border-radius: 3px;
334
+ border-radius: 3px;
335
+ }
336
+ .mini-layout .mini-layout-body {
337
+ background-color: #dceaf4;
338
+ margin: 0 auto;
339
+ width: 70%;
340
+ height: 240px;
341
+ }
342
+ .mini-layout.fluid .mini-layout-sidebar,
343
+ .mini-layout.fluid .mini-layout-header,
344
+ .mini-layout.fluid .mini-layout-body {
345
+ float: left;
346
+ }
347
+ .mini-layout.fluid .mini-layout-sidebar {
348
+ background-color: #bbd8e9;
349
+ width: 20%;
350
+ height: 240px;
351
+ }
352
+ .mini-layout.fluid .mini-layout-body {
353
+ width: 77.5%;
354
+ margin-left: 2.5%;
355
+ }
356
+
357
+
358
+ /* Popover docs
359
+ -------------------------------------------------- */
360
+ .popover-well {
361
+ min-height: 160px;
362
+ }
363
+ .popover-well .popover {
364
+ display: block;
365
+ }
366
+ .popover-well .popover-wrapper {
367
+ width: 50%;
368
+ height: 160px;
369
+ float: left;
370
+ margin-left: 55px;
371
+ position: relative;
372
+ }
373
+ .popover-well .popover-menu-wrapper {
374
+ height: 80px;
375
+ }
376
+ .large-bird {
377
+ margin: 5px 0 0 310px;
378
+ opacity: .1;
379
+ }
380
+
381
+
382
+ /* Download page
383
+ -------------------------------------------------- */
384
+ .download .page-header {
385
+ margin-top: 36px;
386
+ }
387
+ .page-header .toggle-all {
388
+ margin-top: 5px;
389
+ }
390
+
391
+ /* Space out h3s when following a section */
392
+ .download h3 {
393
+ margin-bottom: 5px;
394
+ }
395
+ .download-builder input + h3,
396
+ .download-builder .checkbox + h3 {
397
+ margin-top: 9px;
398
+ }
399
+
400
+ /* Fields for variables */
401
+ .download-builder input[type=text] {
402
+ margin-bottom: 9px;
403
+ font-family: Menlo, Monaco, "Courier New", monospace;
404
+ font-size: 12px;
405
+ color: #d14;
406
+ }
407
+ .download-builder input[type=text]:focus {
408
+ background-color: #fff;
409
+ }
410
+
411
+ /* Custom, larger checkbox labels */
412
+ .download .checkbox {
413
+ padding: 6px 10px 6px 25px;
414
+ color: #555;
415
+ background-color: #f9f9f9;
416
+ -webkit-border-radius: 3px;
417
+ -moz-border-radius: 3px;
418
+ border-radius: 3px;
419
+ cursor: pointer;
420
+ }
421
+ .download .checkbox:hover {
422
+ color: #333;
423
+ background-color: #f5f5f5;
424
+ }
425
+ .download .checkbox small {
426
+ font-size: 12px;
427
+ color: #777;
428
+ }
429
+
430
+ /* Variables section */
431
+ #variables label {
432
+ margin-bottom: 0;
433
+ }
434
+
435
+ /* Giant download button */
436
+ .download-btn {
437
+ margin: 36px 0 108px;
438
+ }
439
+ #download p,
440
+ #download h4 {
441
+ max-width: 50%;
442
+ margin: 0 auto;
443
+ color: #999;
444
+ text-align: center;
445
+ }
446
+ #download h4 {
447
+ margin-bottom: 0;
448
+ }
449
+ #download p {
450
+ margin-bottom: 18px;
451
+ }
452
+ .download-btn .btn {
453
+ display: block;
454
+ width: auto;
455
+ padding: 19px 24px;
456
+ margin-bottom: 27px;
457
+ font-size: 30px;
458
+ line-height: 1;
459
+ text-align: center;
460
+ -webkit-border-radius: 6px;
461
+ -moz-border-radius: 6px;
462
+ border-radius: 6px;
463
+ }
464
+
465
+
466
+
467
+ /* Color swatches on LESS docs page
468
+ -------------------------------------------------- */
469
+ /* Sets the width of the td */
470
+ .swatch-col {
471
+ width: 30px;
472
+ }
473
+ /* Le swatch */
474
+ .swatch {
475
+ display: inline-block;
476
+ width: 30px;
477
+ height: 20px;
478
+ margin: -6px 0;
479
+ -webkit-border-radius: 3px;
480
+ -moz-border-radius: 3px;
481
+ border-radius: 3px;
482
+ }
483
+ /* For white swatches, give a border */
484
+ .swatch-bordered {
485
+ width: 28px;
486
+ height: 18px;
487
+ border: 1px solid #eee;
488
+ }
489
+
490
+
491
+ /* Misc
492
+ -------------------------------------------------- */
493
+
494
+ /* Make tables spaced out a bit more */
495
+ h2 + table,
496
+ h3 + table,
497
+ h4 + table,
498
+ h2 + .row {
499
+ margin-top: 5px;
500
+ }
501
+
502
+ /* Example sites showcase */
503
+ .example-sites img {
504
+ max-width: 100%;
505
+ margin: 0 auto;
506
+ }
507
+ .marketing-byline {
508
+ margin: -18px 0 27px;
509
+ font-size: 18px;
510
+ font-weight: 300;
511
+ line-height: 24px;
512
+ color: #999;
513
+ text-align: center;
514
+ }
515
+
516
+ .scrollspy-example {
517
+ height: 200px;
518
+ overflow: auto;
519
+ position: relative;
520
+ }
521
+
522
+ /* Remove bottom margin on example forms in wells */
523
+ form.well {
524
+ padding: 14px;
525
+ }
526
+
527
+ /* Tighten up spacing */
528
+ .well hr {
529
+ margin: 18px 0;
530
+ }
531
+
532
+ /* Fake the :focus state to demo it */
533
+ .focused {
534
+ border-color: rgba(82,168,236,.8);
535
+ -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
536
+ -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
537
+ box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
538
+ outline: 0;
539
+ }
540
+
541
+ /* For input sizes, make them display block */
542
+ .docs-input-sizes select,
543
+ .docs-input-sizes input[type=text] {
544
+ display: block;
545
+ margin-bottom: 9px;
546
+ }
547
+
548
+ /* Icons
549
+ ------------------------- */
550
+ .the-icons {
551
+ margin-left: 0;
552
+ list-style: none;
553
+ }
554
+ .the-icons i:hover {
555
+ background-color: rgba(255,0,0,.25);
556
+ }
557
+
558
+ /* Eaxmples page
559
+ ------------------------- */
560
+ .bootstrap-examples .thumbnail {
561
+ margin-bottom: 9px;
562
+ background-color: #fff;
563
+ }
564
+
565
+ /* Responsive table
566
+ ------------------------- */
567
+ .responsive-utilities th small {
568
+ display: block;
569
+ font-weight: normal;
570
+ color: #999;
571
+ }
572
+ .responsive-utilities tbody th {
573
+ font-weight: normal;
574
+ }
575
+ .responsive-utilities td {
576
+ text-align: center;
577
+ }
578
+ .responsive-utilities td.is-visible {
579
+ color: #468847;
580
+ background-color: #dff0d8 !important;
581
+ }
582
+ .responsive-utilities td.is-hidden {
583
+ color: #ccc;
584
+ background-color: #f9f9f9 !important;
585
+ }
586
+
587
+ /* Responsive tests
588
+ ------------------------- */
589
+ .responsive-utilities-test {
590
+ margin-top: 5px;
591
+ margin-left: 0;
592
+ list-style: none;
593
+ overflow: hidden; /* clear floats */
594
+ }
595
+ .responsive-utilities-test li {
596
+ position: relative;
597
+ float: left;
598
+ width: 25%;
599
+ height: 43px;
600
+ font-size: 14px;
601
+ font-weight: bold;
602
+ line-height: 43px;
603
+ color: #999;
604
+ text-align: center;
605
+ border: 1px solid #ddd;
606
+ -webkit-border-radius: 4px;
607
+ -moz-border-radius: 4px;
608
+ border-radius: 4px;
609
+ }
610
+ .responsive-utilities-test li + li {
611
+ margin-left: 10px;
612
+ }
613
+ .responsive-utilities-test span {
614
+ position: absolute;
615
+ top: -1px;
616
+ left: -1px;
617
+ right: -1px;
618
+ bottom: -1px;
619
+ -webkit-border-radius: 4px;
620
+ -moz-border-radius: 4px;
621
+ border-radius: 4px;
622
+ }
623
+ .responsive-utilities-test span {
624
+ color: #468847;
625
+ background-color: #dff0d8;
626
+ border: 1px solid #d6e9c6;
627
+ }
628
+
629
+
630
+ /* Responsive Docs
631
+ -------------------------------------------------- */
632
+ @media (max-width: 480px) {
633
+
634
+ /* Reduce padding above jumbotron */
635
+ body {
636
+ padding-top: 70px;
637
+ }
638
+
639
+ /* Change up some type stuff */
640
+ h2 {
641
+ margin-top: 27px;
642
+ }
643
+ h2 small {
644
+ display: block;
645
+ line-height: 18px;
646
+ }
647
+ h3 {
648
+ margin-top: 18px;
649
+ }
650
+
651
+ /* icons */
652
+ .marketing .bs-icon {
653
+ margin: 0;
654
+ }
655
+
656
+ /* Adjust the jumbotron */
657
+ .jumbotron h1,
658
+ .jumbotron p {
659
+ text-align: center;
660
+ margin-right: 0;
661
+ }
662
+ .jumbotron h1 {
663
+ font-size: 45px;
664
+ margin-right: 0;
665
+ }
666
+ .jumbotron p {
667
+ margin-right: 0;
668
+ margin-left: 0;
669
+ font-size: 18px;
670
+ line-height: 24px;
671
+ }
672
+ .jumbotron .btn {
673
+ display: block;
674
+ font-size: 18px;
675
+ padding: 10px 14px;
676
+ margin: 0 auto 10px;
677
+ }
678
+ /* Masthead (home page jumbotron) */
679
+ .masthead {
680
+ padding-top: 0;
681
+ }
682
+
683
+ /* Don't space out quick links so much */
684
+ .quick-links {
685
+ margin: 40px 0 0;
686
+ }
687
+ /* hide the bullets on mobile since our horizontal space is limited */
688
+ .quick-links .divider {
689
+ display: none;
690
+ }
691
+
692
+ /* center example sites */
693
+ .example-sites {
694
+ margin-left: 0;
695
+ }
696
+ .example-sites > li {
697
+ float: none;
698
+ display: block;
699
+ max-width: 280px;
700
+ margin: 0 auto 18px;
701
+ text-align: center;
702
+ }
703
+ .example-sites .thumbnail > img {
704
+ max-width: 270px;
705
+ }
706
+
707
+ table code {
708
+ white-space: normal;
709
+ word-wrap: break-word;
710
+ word-break: break-all;
711
+ }
712
+
713
+ /* Modal example */
714
+ .modal-example .modal {
715
+ position: relative;
716
+ top: auto;
717
+ right: auto;
718
+ bottom: auto;
719
+ left: auto;
720
+ }
721
+
722
+ }
723
+
724
+
725
+ @media (max-width: 768px) {
726
+
727
+ /* Remove any padding from the body */
728
+ body {
729
+ padding-top: 0;
730
+ }
731
+
732
+ /* Jumbotron buttons */
733
+ .jumbotron .btn {
734
+ margin-bottom: 10px;
735
+ }
736
+
737
+ /* Subnav */
738
+ .subnav {
739
+ position: static;
740
+ top: auto;
741
+ z-index: auto;
742
+ width: auto;
743
+ height: auto;
744
+ background: #fff; /* whole background property since we use a background-image for gradient */
745
+ -webkit-box-shadow: none;
746
+ -moz-box-shadow: none;
747
+ box-shadow: none;
748
+ }
749
+ .subnav .nav > li {
750
+ float: none;
751
+ }
752
+ .subnav .nav > li > a {
753
+ border: 0;
754
+ }
755
+ .subnav .nav > li + li > a {
756
+ border-top: 1px solid #e5e5e5;
757
+ }
758
+ .subnav .nav > li:first-child > a,
759
+ .subnav .nav > li:first-child > a:hover {
760
+ -webkit-border-radius: 4px 4px 0 0;
761
+ -moz-border-radius: 4px 4px 0 0;
762
+ border-radius: 4px 4px 0 0;
763
+ }
764
+
765
+ /* Popovers */
766
+ .large-bird {
767
+ display: none;
768
+ }
769
+ .popover-well .popover-wrapper {
770
+ margin-left: 0;
771
+ }
772
+
773
+ /* Space out the show-grid examples */
774
+ .show-grid [class*="span"] {
775
+ margin-bottom: 5px;
776
+ }
777
+
778
+ /* Unfloat the back to top link in footer */
779
+ .footer .pull-right {
780
+ float: none;
781
+ }
782
+ .footer p {
783
+ margin-bottom: 9px;
784
+ }
785
+
786
+ }
787
+
788
+
789
+ @media (min-width: 480px) and (max-width: 768px) {
790
+
791
+ /* Scale down the jumbotron content */
792
+ .jumbotron h1 {
793
+ font-size: 54px;
794
+ }
795
+ .jumbotron p {
796
+ margin-right: 0;
797
+ margin-left: 0;
798
+ }
799
+
800
+ }
801
+
802
+
803
+ @media (min-width: 768px) and (max-width: 980px) {
804
+
805
+ /* Remove any padding from the body */
806
+ body {
807
+ padding-top: 0;
808
+ }
809
+
810
+ /* Scale down the jumbotron content */
811
+ .jumbotron h1 {
812
+ font-size: 72px;
813
+ }
814
+
815
+ }
816
+
817
+
818
+ @media (max-width: 980px) {
819
+
820
+ /* Unfloat brand */
821
+ .navbar-fixed-top .brand {
822
+ float: left;
823
+ margin-left: 0;
824
+ padding-left: 10px;
825
+ padding-right: 10px;
826
+ }
827
+
828
+ /* Inline-block quick links for more spacing */
829
+ .quick-links li {
830
+ display: inline-block;
831
+ margin: 5px;
832
+ }
833
+
834
+ }
835
+
836
+
837
+ /* LARGE DESKTOP SCREENS */
838
+ @media (min-width: 1210px) {
839
+
840
+ /* Update subnav container */
841
+ .subnav-fixed .nav {
842
+ width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */
843
+ }
844
+
845
+ }