Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated to newest express and bootstrap

  • Loading branch information...
commit 3fe6b20c324b647f90745afa853247d1f1afe652 1 parent d575cf1
Mike Valstar authored October 16, 2012

Showing 80 changed files with 14,489 additions and 3,760 deletions. Show diff stats Hide diff stats

  1. 83  app.js
  2. 15  package.json
  3. 10  {style → public/css/bootstrap}/accordion.less
  4. 37  {style → public/css/bootstrap}/alerts.less
  5. 4  {style → public/css/bootstrap}/bootstrap.less
  6. 24  public/css/bootstrap/breadcrumbs.less
  7. 245  public/css/bootstrap/button-groups.less
  8. 231  public/css/bootstrap/buttons.less
  9. 16  {style → public/css/bootstrap}/carousel.less
  10. 31  public/css/bootstrap/close.less
  11. 32  {style → public/css/bootstrap}/code.less
  12. 22  public/css/bootstrap/component-animations.less
  13. 210  public/css/bootstrap/dropdowns.less
  14. 650  public/css/bootstrap/forms.less
  15. 21  public/css/bootstrap/grid.less
  16. 10  {style → public/css/bootstrap}/hero-unit.less
  17. 72  public/css/bootstrap/labels-badges.less
  18. 5  {style → public/css/bootstrap}/layouts.less
  19. 681  public/css/bootstrap/mixins.less
  20. 40  {style → public/css/bootstrap}/modals.less
  21. 475  public/css/bootstrap/navbar.less
  22. 172  {style → public/css/bootstrap}/navs.less
  23. 22  {style → public/css/bootstrap}/pager.less
  24. 37  {style → public/css/bootstrap}/pagination.less
  25. 117  public/css/bootstrap/popovers.less
  26. 122  public/css/bootstrap/progress-bars.less
  27. 25  {style → public/css/bootstrap}/reset.less
  28. 28  public/css/bootstrap/responsive-1200px-min.less
  29. 174  public/css/bootstrap/responsive-767px-max.less
  30. 19  public/css/bootstrap/responsive-768px-979px.less
  31. 177  public/css/bootstrap/responsive-navbar.less
  32. 43  public/css/bootstrap/responsive-utilities.less
  33. 48  public/css/bootstrap/responsive.less
  34. 52  public/css/bootstrap/scaffolding.less
  35. 75  {style → public/css/bootstrap}/sprites.less
  36. 245  public/css/bootstrap/tables.less
  37. 52  public/css/bootstrap/thumbnails.less
  38. 70  public/css/bootstrap/tooltip.less
  39. 194  {style → public/css/bootstrap}/type.less
  40. 11  {style → public/css/bootstrap}/utilities.less
  41. 279  public/css/bootstrap/variables.less
  42. 29  public/css/bootstrap/wells.less
  43. 8,862  public/css/gp.css
  44. 3  style/g-p.less → public/css/gp.less
  45. 104  public/js/bootstrap-affix.js
  46. 57  public/js/bootstrap-alert.js
  47. 66  public/js/bootstrap-button.js
  48. 66  public/js/bootstrap-carousel.js
  49. 78  public/js/bootstrap-collapse.js
  50. 96  public/js/bootstrap-dropdown.js
  51. 199  public/js/bootstrap-modal.js
  52. 30  public/js/bootstrap-popover.js
  53. 74  public/js/bootstrap-scrollspy.js
  54. 21  public/js/bootstrap-tab.js
  55. 83  public/js/bootstrap-tooltip.js
  56. 51  public/js/bootstrap-transition.js
  57. 117  public/js/bootstrap-typeahead.js
  58. 2  public/js/gp.js
  59. 22  style/breadcrumbs.less
  60. 147  style/button-groups.less
  61. 165  style/buttons.less
  62. 18  style/close.less
  63. 18  style/component-animations.less
  64. 131  style/dropdowns.less
  65. 515  style/forms.less
  66. 8  style/grid.less
  67. 16  style/labels.less
  68. 537  style/mixins.less
  69. 292  style/navbar.less
  70. 49  style/popovers.less
  71. 95  style/progress-bars.less
  72. 323  style/responsive.less
  73. 29  style/scaffolding.less
  74. 139  style/tables.less
  75. 35  style/thumbnails.less
  76. 35  style/tooltip.less
  77. 99  style/variables.less
  78. 17  style/wells.less
  79. 679  views/index.jade
  80. 66  views/layout.jade
83  app.js
@@ -3,85 +3,34 @@
3 3
  * Module dependencies.
4 4
  */
5 5
 
6  
-var	express = require('express')
7  
-	routes = require('./routes'),
8  
-	less = require('less'),
9  
-	path = require('path'),
10  
-	fs = require('fs'),
11  
-	sys = require('util');
  6
+var express = require('express')
  7
+  , routes = require('./routes')
  8
+  , http = require('http')
  9
+  , path = require('path');
12 10
 
13  
-var app = module.exports = express.createServer();
14  
-
15  
-// Configuration
  11
+var app = express();
16 12
 
17 13
 app.configure(function(){
  14
+  app.set('port', process.env.PORT || 4128);
18 15
   app.set('views', __dirname + '/views');
19 16
   app.set('view engine', 'jade');
  17
+  app.use(express.favicon());
  18
+  app.use(express.logger('dev'));
20 19
   app.use(express.bodyParser());
21 20
   app.use(express.methodOverride());
  21
+  app.use(express.cookieParser('TCLsecret'));
  22
+  app.use(express.session());
22 23
   app.use(app.router);
23  
-  app.use(express.static(__dirname + '/public'));
  24
+  app.use(require('less-middleware')({ src: __dirname + '/public' }));
  25
+  app.use(express.static(path.join(__dirname, 'public')));
24 26
 });
25 27
 
26 28
 app.configure('development', function(){
27  
-  app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); 
28  
-});
29  
-
30  
-app.configure('production', function(){
31  
-  app.use(express.errorHandler()); 
  29
+  app.use(express.errorHandler());
32 30
 });
33 31
 
34  
-// Build (Stylesheets)
35  
-var lessBootstrapFile = path.join(__dirname, 'style/bootstrap.less');
36  
-var cssBootstrapFile = path.join(__dirname, 'public/css/bootstrap.css');
37  
-var parseBootstrapLess = function(curr, prev){
38  
-	if(typeof(curr) == 'undefined' || curr.mtime.getTime() != prev.mtime.getTime()){
39  
-			
40  
-		var lessParser = new(less.Parser)({
41  
-		    paths: ['.', './style'], // Specify search paths for @import directives
42  
-		});
43  
-		
44  
-		fs.readFile(lessBootstrapFile, 'utf8', function (e, data) {
45  
-			lessParser.parse(data, function (e, tree) {
46  
-			    //tree.toCSS({ compress: true }); // Minify CSS output
47  
-			    fs.writeFile(cssBootstrapFile, tree.toCSS(), function (err) {
48  
-					if (err) throw err;
49  
-					console.log(cssBootstrapFile + ' Written to disk!');
50  
-				});
51  
-			});
52  
-		});
53  
-	}
54  
-};
55  
-
56  
-var lessGPFile = path.join(__dirname, 'style/g-p.less');
57  
-var cssGPFile = path.join(__dirname, 'public/css/css.css');
58  
-var parseGPLess = function(curr, prev){
59  
-	if(typeof(curr) == 'undefined' || curr.mtime.getTime() != prev.mtime.getTime()){
60  
-
61  
-		var lessParser = new(less.Parser)({
62  
-		    paths: ['.', './style'], // Specify search paths for @import directives
63  
-		});
64  
-		
65  
-		fs.readFile(lessGPFile, 'utf8', function (e, data) {
66  
-			lessParser.parse(data, function (e, tree) {
67  
-			    //tree.toCSS({ compress: true }); // Minify CSS output
68  
-			    fs.writeFile(cssGPFile, tree.toCSS(), function (err) {
69  
-					if (err) throw err;
70  
-					console.log(cssGPFile + ' Written to disk!');
71  
-				});
72  
-			});
73  
-		});
74  
-	}
75  
-};
76  
-
77  
-parseBootstrapLess();
78  
-parseGPLess();
79  
-
80  
-fs.watchFile(path.join(__dirname, 'style/variables.less'), parseBootstrapLess);
81  
-fs.watchFile(lessGPFile, parseGPLess);
82  
-
83  
-// Routes
84 32
 app.get('/', routes.index);
85 33
 
86  
-app.listen(3030);
87  
-console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
  34
+http.createServer(app).listen(app.get('port'), function(){
  35
+  console.log("Express server listening on port " + app.get('port'));
  36
+});
15  package.json
... ...
@@ -1,13 +1,14 @@
1 1
 {
2 2
     "name": "gentoo_portage_com_website"
3  
-  , "version": "3.0.1_pre"
  3
+  , "version": "3.0.1pre"
4 4
   , "private": true
  5
+  , "scripts": {
  6
+    "start": "node app"
  7
+  }
5 8
   , "dependencies": {
6  
-      "express": ">= 2.5.0"
7  
-    , "jade": ">= 0.0.1"
8  
-    , "markdown-js": ">= 0.0.1"
9  
-    , "mongoose": ">= 2.4.0"
10  
-    , "session-mongoose": ">= 0.0.1"
11  
-    , "less": ">= 0.0.1"
  9
+    "express": "3.x",
  10
+    "jade": "*",
  11
+    "less-middleware": "*",
  12
+    "markdown-js": "*"
12 13
   }
13 14
 }
10  style/accordion.less → public/css/bootstrap/accordion.less
... ...
@@ -1,5 +1,6 @@
1  
-// ACCORDION
2  
-// ---------
  1
+//
  2
+// Accordion
  3
+// --------------------------------------------------
3 4
 
4 5
 
5 6
 // Parent container
@@ -21,6 +22,11 @@
21 22
   padding: 8px 15px;
22 23
 }
23 24
 
  25
+// General toggle styles
  26
+.accordion-toggle {
  27
+  cursor: pointer;
  28
+}
  29
+
24 30
 // Inner needs the styles because you can't animate properly with any styles on the element
25 31
 .accordion-inner {
26 32
   padding: 9px 15px;
37  style/alerts.less → public/css/bootstrap/alerts.less
... ...
@@ -1,7 +1,11 @@
1  
-// ALERT STYLES
2  
-// ------------
  1
+//
  2
+// Alerts
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+// Base styles
  7
+// -------------------------
3 8
 
4  
-// Base alert styles
5 9
 .alert {
6 10
   padding: 8px 35px 8px 14px;
7 11
   margin-bottom: @baseLineHeight;
@@ -9,54 +13,45 @@
9 13
   background-color: @warningBackground;
10 14
   border: 1px solid @warningBorder;
11 15
   .border-radius(4px);
12  
-}
13  
-.alert,
14  
-.alert-heading {
15 16
   color: @warningText;
16 17
 }
  18
+.alert h4 {
  19
+  margin: 0;
  20
+}
17 21
 
18 22
 // Adjust close link position
19 23
 .alert .close {
20 24
   position: relative;
21 25
   top: -2px;
22 26
   right: -21px;
23  
-  line-height: 18px;
  27
+  line-height: @baseLineHeight;
24 28
 }
25 29
 
  30
+
26 31
 // Alternate styles
27  
-// ----------------
  32
+// -------------------------
28 33
 
29 34
 .alert-success {
30 35
   background-color: @successBackground;
31  
-  border-color: @successBorder;  
32  
-}
33  
-.alert-success,
34  
-.alert-success .alert-heading {
  36
+  border-color: @successBorder;
35 37
   color: @successText;
36 38
 }
37 39
 .alert-danger,
38 40
 .alert-error {
39 41
   background-color: @errorBackground;
40 42
   border-color: @errorBorder;
41  
-}
42  
-.alert-danger,
43  
-.alert-error,
44  
-.alert-danger .alert-heading,
45  
-.alert-error .alert-heading {
46 43
   color: @errorText;
47 44
 }
48 45
 .alert-info {
49 46
   background-color: @infoBackground;
50 47
   border-color: @infoBorder;
51  
-}
52  
-.alert-info,
53  
-.alert-info .alert-heading {
54 48
   color: @infoText;
55 49
 }
56 50
 
57 51
 
58 52
 // Block alerts
59  
-// ------------------------
  53
+// -------------------------
  54
+
60 55
 .alert-block {
61 56
   padding-top: 14px;
62 57
   padding-bottom: 14px;
4  style/bootstrap.less → public/css/bootstrap/bootstrap.less
... ...
@@ -1,5 +1,5 @@
1 1
 /*!
2  
- * Bootstrap v2.0.0
  2
+ * Bootstrap v2.1.1
3 3
  *
4 4
  * Copyright 2012 Twitter, Inc
5 5
  * Licensed under the Apache License v2.0
@@ -52,7 +52,7 @@
52 52
 
53 53
 // Components: Misc
54 54
 @import "thumbnails.less";
55  
-@import "labels.less";
  55
+@import "labels-badges.less";
56 56
 @import "progress-bars.less";
57 57
 @import "accordion.less";
58 58
 @import "carousel.less";
24  public/css/bootstrap/breadcrumbs.less
... ...
@@ -0,0 +1,24 @@
  1
+//
  2
+// Breadcrumbs
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+.breadcrumb {
  7
+  padding: 8px 15px;
  8
+  margin: 0 0 @baseLineHeight;
  9
+  list-style: none;
  10
+  background-color: #f5f5f5;
  11
+  .border-radius(4px);
  12
+  li {
  13
+    display: inline-block;
  14
+    .ie7-inline-block();
  15
+    text-shadow: 0 1px 0 @white;
  16
+  }
  17
+  .divider {
  18
+    padding: 0 5px;
  19
+    color: #ccc;
  20
+  }
  21
+  .active {
  22
+    color: @grayLight;
  23
+  }
  24
+}
245  public/css/bootstrap/button-groups.less
... ...
@@ -0,0 +1,245 @@
  1
+//
  2
+// Button groups
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+// Make the div behave like a button
  7
+.btn-group {
  8
+  position: relative;
  9
+  font-size: 0; // remove as part 1 of font-size inline-block hack
  10
+  vertical-align: middle; // match .btn alignment given font-size hack above
  11
+  white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
  12
+  .ie7-restore-left-whitespace();
  13
+}
  14
+
  15
+// Space out series of button groups
  16
+.btn-group + .btn-group {
  17
+  margin-left: 5px;
  18
+}
  19
+
  20
+// Optional: Group multiple button groups together for a toolbar
  21
+.btn-toolbar {
  22
+  font-size: 0; // Hack to remove whitespace that results from using inline-block
  23
+  margin-top: @baseLineHeight / 2;
  24
+  margin-bottom: @baseLineHeight / 2;
  25
+  .btn-group {
  26
+    display: inline-block;
  27
+    .ie7-inline-block();
  28
+  }
  29
+  .btn + .btn,
  30
+  .btn-group + .btn,
  31
+  .btn + .btn-group {
  32
+    margin-left: 5px;
  33
+  }
  34
+}
  35
+
  36
+// Float them, remove border radius, then re-add to first and last elements
  37
+.btn-group > .btn {
  38
+  position: relative;
  39
+  .border-radius(0);
  40
+}
  41
+.btn-group > .btn + .btn {
  42
+  margin-left: -1px;
  43
+}
  44
+.btn-group > .btn,
  45
+.btn-group > .dropdown-menu {
  46
+  font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
  47
+}
  48
+
  49
+// Reset fonts for other sizes
  50
+.btn-group > .btn-mini {
  51
+  font-size: 11px;
  52
+}
  53
+.btn-group > .btn-small {
  54
+  font-size: 12px;
  55
+}
  56
+.btn-group > .btn-large {
  57
+  font-size: 16px;
  58
+}
  59
+
  60
+// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
  61
+.btn-group > .btn:first-child {
  62
+  margin-left: 0;
  63
+     -webkit-border-top-left-radius: 4px;
  64
+         -moz-border-radius-topleft: 4px;
  65
+             border-top-left-radius: 4px;
  66
+  -webkit-border-bottom-left-radius: 4px;
  67
+      -moz-border-radius-bottomleft: 4px;
  68
+          border-bottom-left-radius: 4px;
  69
+}
  70
+// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
  71
+.btn-group > .btn:last-child,
  72
+.btn-group > .dropdown-toggle {
  73
+     -webkit-border-top-right-radius: 4px;
  74
+         -moz-border-radius-topright: 4px;
  75
+             border-top-right-radius: 4px;
  76
+  -webkit-border-bottom-right-radius: 4px;
  77
+      -moz-border-radius-bottomright: 4px;
  78
+          border-bottom-right-radius: 4px;
  79
+}
  80
+// Reset corners for large buttons
  81
+.btn-group > .btn.large:first-child {
  82
+  margin-left: 0;
  83
+     -webkit-border-top-left-radius: 6px;
  84
+         -moz-border-radius-topleft: 6px;
  85
+             border-top-left-radius: 6px;
  86
+  -webkit-border-bottom-left-radius: 6px;
  87
+      -moz-border-radius-bottomleft: 6px;
  88
+          border-bottom-left-radius: 6px;
  89
+}
  90
+.btn-group > .btn.large:last-child,
  91
+.btn-group > .large.dropdown-toggle {
  92
+     -webkit-border-top-right-radius: 6px;
  93
+         -moz-border-radius-topright: 6px;
  94
+             border-top-right-radius: 6px;
  95
+  -webkit-border-bottom-right-radius: 6px;
  96
+      -moz-border-radius-bottomright: 6px;
  97
+          border-bottom-right-radius: 6px;
  98
+}
  99
+
  100
+// On hover/focus/active, bring the proper btn to front
  101
+.btn-group > .btn:hover,
  102
+.btn-group > .btn:focus,
  103
+.btn-group > .btn:active,
  104
+.btn-group > .btn.active {
  105
+  z-index: 2;
  106
+}
  107
+
  108
+// On active and open, don't show outline
  109
+.btn-group .dropdown-toggle:active,
  110
+.btn-group.open .dropdown-toggle {
  111
+  outline: 0;
  112
+}
  113
+
  114
+
  115
+
  116
+// Split button dropdowns
  117
+// ----------------------
  118
+
  119
+// Give the line between buttons some depth
  120
+.btn-group > .btn + .dropdown-toggle {
  121
+  padding-left: 8px;
  122
+  padding-right: 8px;
  123
+  .box-shadow(inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
  124
+  *padding-top: 5px;
  125
+  *padding-bottom: 5px;
  126
+}
  127
+.btn-group > .btn-mini + .dropdown-toggle {
  128
+  padding-left: 5px;
  129
+  padding-right: 5px;
  130
+  *padding-top: 2px;
  131
+  *padding-bottom: 2px;
  132
+}
  133
+.btn-group > .btn-small + .dropdown-toggle {
  134
+  *padding-top: 5px;
  135
+  *padding-bottom: 4px;
  136
+}
  137
+.btn-group > .btn-large + .dropdown-toggle {
  138
+  padding-left: 12px;
  139
+  padding-right: 12px;
  140
+  *padding-top: 7px;
  141
+  *padding-bottom: 7px;
  142
+}
  143
+
  144
+.btn-group.open {
  145
+
  146
+  // The clickable button for toggling the menu
  147
+  // Remove the gradient and set the same inset shadow as the :active state
  148
+  .dropdown-toggle {
  149
+    background-image: none;
  150
+    .box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
  151
+  }
  152
+
  153
+  // Keep the hover's background when dropdown is open
  154
+  .btn.dropdown-toggle {
  155
+    background-color: @btnBackgroundHighlight;
  156
+  }
  157
+  .btn-primary.dropdown-toggle {
  158
+    background-color: @btnPrimaryBackgroundHighlight;
  159
+  }
  160
+  .btn-warning.dropdown-toggle {
  161
+    background-color: @btnWarningBackgroundHighlight;
  162
+  }
  163
+  .btn-danger.dropdown-toggle {
  164
+    background-color: @btnDangerBackgroundHighlight;
  165
+  }
  166
+  .btn-success.dropdown-toggle {
  167
+    background-color: @btnSuccessBackgroundHighlight;
  168
+  }
  169
+  .btn-info.dropdown-toggle {
  170
+    background-color: @btnInfoBackgroundHighlight;
  171
+  }
  172
+  .btn-inverse.dropdown-toggle {
  173
+    background-color: @btnInverseBackgroundHighlight;
  174
+  }
  175
+}
  176
+
  177
+
  178
+// Reposition the caret
  179
+.btn .caret {
  180
+  margin-top: 8px;
  181
+  margin-left: 0;
  182
+}
  183
+// Carets in other button sizes
  184
+.btn-mini .caret,
  185
+.btn-small .caret,
  186
+.btn-large .caret {
  187
+  margin-top: 6px;
  188
+}
  189
+.btn-large .caret {
  190
+  border-left-width:  5px;
  191
+  border-right-width: 5px;
  192
+  border-top-width:   5px;
  193
+}
  194
+// Upside down carets for .dropup
  195
+.dropup .btn-large .caret {
  196
+  border-bottom: 5px solid @black;
  197
+  border-top: 0;
  198
+}
  199
+
  200
+
  201
+
  202
+// Account for other colors
  203
+.btn-primary,
  204
+.btn-warning,
  205
+.btn-danger,
  206
+.btn-info,
  207
+.btn-success,
  208
+.btn-inverse {
  209
+  .caret {
  210
+    border-top-color: @white;
  211
+    border-bottom-color: @white;
  212
+  }
  213
+}
  214
+
  215
+
  216
+
  217
+// Vertical button groups
  218
+// ----------------------
  219
+
  220
+.btn-group-vertical {
  221
+  display: inline-block; // makes buttons only take up the width they need
  222
+  .ie7-inline-block();
  223
+}
  224
+.btn-group-vertical .btn {
  225
+  display: block;
  226
+  float: none;
  227
+  width: 100%;
  228
+  .border-radius(0);
  229
+}
  230
+.btn-group-vertical .btn + .btn {
  231
+  margin-left: 0;
  232
+  margin-top: -1px;
  233
+}
  234
+.btn-group-vertical .btn:first-child {
  235
+  .border-radius(4px 4px 0 0);
  236
+}
  237
+.btn-group-vertical .btn:last-child {
  238
+  .border-radius(0 0 4px 4px);
  239
+}
  240
+.btn-group-vertical .btn-large:first-child {
  241
+  .border-radius(6px 6px 0 0);
  242
+}
  243
+.btn-group-vertical .btn-large:last-child {
  244
+  .border-radius(0 0 6px 6px);
  245
+}
231  public/css/bootstrap/buttons.less
... ...
@@ -0,0 +1,231 @@
  1
+//
  2
+// Buttons
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+// Base styles
  7
+// --------------------------------------------------
  8
+
  9
+// Core
  10
+.btn {
  11
+  display: inline-block;
  12
+  .ie7-inline-block();
  13
+  padding: 4px 14px;
  14
+  margin-bottom: 0; // For input.btn
  15
+  font-size: @baseFontSize;
  16
+  line-height: @baseLineHeight;
  17
+  *line-height: @baseLineHeight;
  18
+  text-align: center;
  19
+  vertical-align: middle;
  20
+  cursor: pointer;
  21
+  .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
  22
+  border: 1px solid @btnBorder;
  23
+  *border: 0; // Remove the border to prevent IE7's black border on input:focus
  24
+  border-bottom-color: darken(@btnBorder, 10%);
  25
+  .border-radius(4px);
  26
+  .ie7-restore-left-whitespace(); // Give IE7 some love
  27
+  .box-shadow(inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
  28
+
  29
+  // Hover state
  30
+  &:hover {
  31
+    color: @grayDark;
  32
+    text-decoration: none;
  33
+    background-color: darken(@white, 10%);
  34
+    *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
  35
+    background-position: 0 -15px;
  36
+
  37
+    // transition is only when going to hover, otherwise the background
  38
+    // behind the gradient (there for IE<=9 fallback) gets mismatched
  39
+    .transition(background-position .1s linear);
  40
+  }
  41
+
  42
+  // Focus state for keyboard and accessibility
  43
+  &:focus {
  44
+    .tab-focus();
  45
+  }
  46
+
  47
+  // Active state
  48
+  &.active,
  49
+  &:active {
  50
+    background-color: darken(@white, 10%);
  51
+    background-color: darken(@white, 15%) e("\9");
  52
+    background-image: none;
  53
+    outline: 0;
  54
+    .box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
  55
+  }
  56
+
  57
+  // Disabled state
  58
+  &.disabled,
  59
+  &[disabled] {
  60
+    cursor: default;
  61
+    background-color: darken(@white, 10%);
  62
+    background-image: none;
  63
+    .opacity(65);
  64
+    .box-shadow(none);
  65
+  }
  66
+
  67
+}
  68
+
  69
+
  70
+
  71
+// Button Sizes
  72
+// --------------------------------------------------
  73
+
  74
+// Large
  75
+.btn-large {
  76
+  padding: 9px 14px;
  77
+  font-size: @baseFontSize + 2px;
  78
+  line-height: normal;
  79
+  .border-radius(5px);
  80
+}
  81
+.btn-large [class^="icon-"] {
  82
+  margin-top: 2px;
  83
+}
  84
+
  85
+// Small
  86
+.btn-small {
  87
+  padding: 3px 9px;
  88
+  font-size: @baseFontSize - 2px;
  89
+  line-height: @baseLineHeight - 2px;
  90
+}
  91
+.btn-small [class^="icon-"] {
  92
+  margin-top: 0;
  93
+}
  94
+
  95
+// Mini
  96
+.btn-mini {
  97
+  padding: 2px 6px;
  98
+  font-size: @baseFontSize - 3px;
  99
+  line-height: @baseLineHeight - 3px;
  100
+}
  101
+
  102
+
  103
+// Block button
  104
+// -------------------------
  105
+
  106
+.btn-block {
  107
+  display: block;
  108
+  width: 100%;
  109
+  padding-left: 0;
  110
+  padding-right: 0;
  111
+  .box-sizing(border-box);
  112
+}
  113
+
  114
+// Vertically space out multiple block buttons
  115
+.btn-block + .btn-block {
  116
+  margin-top: 5px;
  117
+}
  118
+
  119
+// Specificity overrides
  120
+input[type="submit"],
  121
+input[type="reset"],
  122
+input[type="button"] {
  123
+  &.btn-block {
  124
+    width: 100%;
  125
+  }
  126
+}
  127
+
  128
+
  129
+
  130
+// Alternate buttons
  131
+// --------------------------------------------------
  132
+
  133
+// Provide *some* extra contrast for those who can get it
  134
+.btn-primary.active,
  135
+.btn-warning.active,
  136
+.btn-danger.active,
  137
+.btn-success.active,
  138
+.btn-info.active,
  139
+.btn-inverse.active {
  140
+  color: rgba(255,255,255,.75);
  141
+}
  142
+
  143
+// Set the backgrounds
  144
+// -------------------------
  145
+.btn {
  146
+  // reset here as of 2.0.3 due to Recess property order
  147
+  border-color: #c5c5c5;
  148
+  border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
  149
+}
  150
+.btn-primary {
  151
+  .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
  152
+}
  153
+// Warning appears are orange
  154
+.btn-warning {
  155
+  .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
  156
+}
  157
+// Danger and error appear as red
  158
+.btn-danger {
  159
+  .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
  160
+}
  161
+// Success appears as green
  162
+.btn-success {
  163
+  .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
  164
+}
  165
+// Info appears as a neutral blue
  166
+.btn-info {
  167
+  .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
  168
+}
  169
+// Inverse appears as dark gray
  170
+.btn-inverse {
  171
+  .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
  172
+}
  173
+
  174
+
  175
+// Cross-browser Jank
  176
+// --------------------------------------------------
  177
+
  178
+button.btn,
  179
+input[type="submit"].btn {
  180
+
  181
+  // Firefox 3.6 only I believe
  182
+  &::-moz-focus-inner {
  183
+    padding: 0;
  184
+    border: 0;
  185
+  }
  186
+
  187
+  // IE7 has some default padding on button controls
  188
+  *padding-top: 3px;
  189
+  *padding-bottom: 3px;
  190
+
  191
+  &.btn-large {
  192
+    *padding-top: 7px;
  193
+    *padding-bottom: 7px;
  194
+  }
  195
+  &.btn-small {
  196
+    *padding-top: 3px;
  197
+    *padding-bottom: 3px;
  198
+  }
  199
+  &.btn-mini {
  200
+    *padding-top: 1px;
  201
+    *padding-bottom: 1px;
  202
+  }
  203
+}
  204
+
  205
+
  206
+// Link buttons
  207
+// --------------------------------------------------
  208
+
  209
+// Make a button look and behave like a link
  210
+.btn-link,
  211
+.btn-link:active,
  212
+.btn-link[disabled] {
  213
+  background-color: transparent;
  214
+  background-image: none;
  215
+  .box-shadow(none);
  216
+}
  217
+.btn-link {
  218
+  border-color: transparent;
  219
+  cursor: pointer;
  220
+  color: @linkColor;
  221
+  .border-radius(0);
  222
+}
  223
+.btn-link:hover {
  224
+  color: @linkColorHover;
  225
+  text-decoration: underline;
  226
+  background-color: transparent;
  227
+}
  228
+.btn-link[disabled]:hover {
  229
+  color: @grayDark;
  230
+  text-decoration: none;
  231
+}
16  style/carousel.less → public/css/bootstrap/carousel.less
... ...
@@ -1,5 +1,7 @@
@@ -103,6 +105,7 @@
@@ -111,11 +114,18 @@
31  public/css/bootstrap/close.less
... ...
@@ -0,0 +1,31 @@
  1
+//
  2
+// Close icons
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+.close {
  7
+  float: right;
  8
+  font-size: 20px;
  9
+  font-weight: bold;
  10
+  line-height: @baseLineHeight;
  11
+  color: @black;
  12
+  text-shadow: 0 1px 0 rgba(255,255,255,1);
  13
+  .opacity(20);
  14
+  &:hover {
  15
+    color: @black;
  16
+    text-decoration: none;
  17
+    cursor: pointer;
  18
+    .opacity(40);
  19
+  }
  20
+}
  21
+
  22
+// Additional properties for button version
  23
+// iOS requires the button element instead of an anchor tag.
  24
+// If you want the anchor version, it requires `href="#"`.
  25
+button.close {
  26
+  padding: 0;
  27
+  cursor: pointer;
  28
+  background: transparent;
  29
+  border: 0;
  30
+  -webkit-appearance: none;
  31
+}
32  style/code.less → public/css/bootstrap/code.less
... ...
@@ -1,35 +1,41 @@
1  
-// Code.less
2  
-// Code typography styles for the <code> and <pre> elements
3  
-// --------------------------------------------------------
  1
+//
  2
+// Code (inline and blocK)
  3
+// --------------------------------------------------
  4
+
4 5
 
5 6
 // Inline and block code styles
6 7
 code,
7 8
 pre {
8 9
   padding: 0 3px 2px;
9 10
   #font > #family > .monospace;
10  
-  font-size: @baseFontSize - 1;
  11
+  font-size: @baseFontSize - 2;
11 12
   color: @grayDark;
12 13
   .border-radius(3px);
13 14
 }
  15
+
  16
+// Inline code
14 17
 code {
15  
-  padding: 3px 4px;
  18
+  padding: 2px 4px;
16 19
   color: #d14;
17 20
   background-color: #f7f7f9;
18 21
   border: 1px solid #e1e1e8;
19 22
 }
  23
+
  24
+// Blocks of code
20 25
 pre {
21 26
   display: block;
22 27
   padding: (@baseLineHeight - 1) / 2;
23 28
   margin: 0 0 @baseLineHeight / 2;
24  
-  font-size: 12px;
  29
+  font-size: @baseFontSize - 1; // 14px to 13px
25 30
   line-height: @baseLineHeight;
  31
+  word-break: break-all;
  32
+  word-wrap: break-word;
  33
+  white-space: pre;
  34
+  white-space: pre-wrap;
26 35
   background-color: #f5f5f5;
27 36
   border: 1px solid #ccc; // fallback for IE7-8
28 37
   border: 1px solid rgba(0,0,0,.15);
29 38
   .border-radius(4px);
30  
-  white-space: pre;
31  
-  white-space: pre-wrap;
32  
-  word-break: break-all;
33 39
 
34 40
   // Make prettyprint styles more spaced out for readability
35 41
   &.prettyprint {
@@ -39,6 +45,14 @@ pre {
39 45
   // Account for some code outputs that place code tags in pre tags
40 46
   code {
41 47
     padding: 0;
  48
+    color: inherit;
42 49
     background-color: transparent;
  50
+    border: 0;
43 51
   }
44 52
 }
  53
+
  54
+// Enable scrollable blocks of code
  55
+.pre-scrollable {
  56
+  max-height: 340px;
  57
+  overflow-y: scroll;
  58
+}
22  public/css/bootstrap/component-animations.less
... ...
@@ -0,0 +1,22 @@
  1
+//
  2
+// Component animations
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+.fade {
  7
+  opacity: 0;
  8
+  .transition(opacity .15s linear);
  9
+  &.in {
  10
+    opacity: 1;
  11
+  }
  12
+}
  13
+
  14
+.collapse {
  15
+  position: relative;
  16
+  height: 0;
  17
+  overflow: hidden;
  18
+  .transition(height .35s ease);
  19
+  &.in {
  20
+    height: auto;
  21
+  }
  22
+}
210  public/css/bootstrap/dropdowns.less
... ...
@@ -0,0 +1,210 @@
  1
+//
  2
+// Dropdown menus
  3
+// --------------------------------------------------
  4
+
  5
+
  6
+// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
  7
+.dropup,
  8
+.dropdown {
  9
+  position: relative;
  10
+}
  11
+.dropdown-toggle {
  12
+  // The caret makes the toggle a bit too tall in IE7
  13
+  *margin-bottom: -3px;
  14
+}
  15
+.dropdown-toggle:active,
  16
+.open .dropdown-toggle {
  17
+  outline: 0;
  18
+}
  19
+
  20
+// Dropdown arrow/caret
  21
+// --------------------
  22
+.caret {
  23
+  display: inline-block;
  24
+  width: 0;
  25
+  height: 0;
  26
+  vertical-align: top;
  27
+  border-top:   4px solid @black;
  28
+  border-right: 4px solid transparent;
  29
+  border-left:  4px solid transparent;
  30
+  content: "";
  31
+}
  32
+
  33
+// Place the caret
  34
+.dropdown .caret {
  35
+  margin-top: 8px;
  36
+  margin-left: 2px;
  37
+}
  38
+
  39
+// The dropdown menu (ul)
  40
+// ----------------------
  41
+.dropdown-menu {
  42
+  position: absolute;
  43
+  top: 100%;
  44
+  left: 0;
  45
+  z-index: @zindexDropdown;
  46
+  display: none; // none by default, but block on "open" of the menu
  47
+  float: left;
  48
+  min-width: 160px;
  49
+  padding: 5px 0;
  50
+  margin: 2px 0 0; // override default ul
  51
+  list-style: none;
  52
+  background-color: @dropdownBackground;
  53
+  border: 1px solid #ccc; // Fallback for IE7-8
  54
+  border: 1px solid @dropdownBorder;
  55
+  *border-right-width: 2px;
  56
+  *border-bottom-width: 2px;
  57
+  .border-radius(6px);
  58
+  .box-shadow(0 5px 10px rgba(0,0,0,.2));
  59
+  -webkit-background-clip: padding-box;
  60
+     -moz-background-clip: padding;
  61
+          background-clip: padding-box;
  62
+
  63
+  // Aligns the dropdown menu to right
  64
+  &.pull-right {
  65
+    right: 0;
  66
+    left: auto;
  67
+  }
  68
+
  69
+  // Dividers (basically an hr) within the dropdown
  70
+  .divider {
  71
+    .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
  72
+  }
  73
+
  74
+  // Links within the dropdown menu
  75
+  a {
  76
+    display: block;
  77
+    padding: 3px 20px;
  78
+    clear: both;
  79
+    font-weight: normal;
  80
+    line-height: @baseLineHeight;
  81
+    color: @dropdownLinkColor;
  82
+    white-space: nowrap;
  83
+  }
  84
+}
  85
+
  86
+// Hover state
  87
+// -----------
  88
+.dropdown-menu li > a:hover,
  89
+.dropdown-menu li > a:focus,
  90
+.dropdown-submenu:hover > a {
  91
+  text-decoration: none;
  92
+  color: @dropdownLinkColorHover;
  93
+  background-color: @dropdownLinkBackgroundHover;
  94
+  #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
  95
+}
  96
+
  97
+// Active state
  98
+// ------------
  99
+.dropdown-menu .active > a,
  100
+.dropdown-menu .active > a:hover {
  101
+  color: @dropdownLinkColorHover;
  102
+  text-decoration: none;
  103
+  outline: 0;
  104
+  background-color: @dropdownLinkBackgroundActive;
  105
+  #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%));
  106
+}
  107
+
  108
+// Disabled state
  109
+// --------------
  110
+// Gray out text and ensure the hover state remains gray
  111
+.dropdown-menu .disabled > a,
  112
+.dropdown-menu .disabled > a:hover {
  113
+  color: @grayLight;
  114
+}
  115
+// Nuke hover effects
  116
+.dropdown-menu .disabled > a:hover {
  117
+  text-decoration: none;
  118
+  background-color: transparent;
  119
+  cursor: default;
  120
+}
  121
+
  122
+// Open state for the dropdown
  123
+// ---------------------------
  124
+.open {
  125
+  // IE7's z-index only goes to the nearest positioned ancestor, which would
  126
+  // make the menu appear below buttons that appeared later on the page
  127
+  *z-index: @zindexDropdown;
  128
+
  129
+  & > .dropdown-menu {
  130
+    display: block;
  131
+  }
  132
+}
  133
+
  134
+// Right aligned dropdowns
  135
+// ---------------------------
  136
+.pull-right > .dropdown-menu {
  137
+  right: 0;
  138
+  left: auto;
  139
+}
  140
+
  141
+// Allow for dropdowns to go bottom up (aka, dropup-menu)
  142
+// ------------------------------------------------------
  143
+// Just add .dropup after the standard .dropdown class and you're set, bro.
  144
+// TODO: abstract this so that the navbar fixed styles are not placed here?
  145
+.dropup,
  146
+.navbar-fixed-bottom .dropdown {
  147
+  // Reverse the caret
  148
+  .caret {
  149
+    border-top: 0;
  150
+    border-bottom: 4px solid @black;
  151
+    content: "";
  152
+  }
  153
+  // Different positioning for bottom up menu
  154
+  .dropdown-menu {
  155
+    top: auto;
  156
+    bottom: 100%;
  157
+    margin-bottom: 1px;
  158
+  }
  159
+}
  160
+
  161
+// Sub menus
  162
+// ---------------------------
  163
+.dropdown-submenu {
  164
+  position: relative;
  165
+}
  166
+.dropdown-submenu > .dropdown-menu {
  167
+  top: 0;
  168
+  left: 100%;
  169
+  margin-top: -6px;
  170
+  margin-left: -1px;
  171
+  -webkit-border-radius: 0 6px 6px 6px;
  172
+     -moz-border-radius: 0 6px 6px 6px;
  173
+          border-radius: 0 6px 6px 6px;
  174
+}
  175
+.dropdown-submenu:hover > .dropdown-menu {
  176
+  display: block;
  177
+}
  178
+
  179
+.dropdown-submenu > a:after {
  180
+  display: block;
  181
+  content: " ";
  182
+  float: right;
  <