Permalink
Browse files

Added Stylus instead of Less

  • Loading branch information...
1 parent 2a8725f commit 0a70e40cafd982c1f2421ecf16caa887fc49ae39 Alex Young committed Feb 14, 2011
Showing with 241 additions and 256 deletions.
  1. +1 −0 README.textile
  2. +5 −2 app.js
  3. +4 −1 models.js
  4. +1 −1 package.json
  5. +12 −16 public/stylesheets/style.css
  6. +0 −235 public/stylesheets/style.less
  7. +217 −0 public/stylesheets/style.styl
  8. +1 −1 views/sessions/new.jade
View
@@ -49,6 +49,7 @@ node app.js
h3. Contributions
* "luebken":https://github.com/luebken
+* "eirikurn":https://github.com/eirikurn
h3. License (GPL)
View
@@ -1,9 +1,10 @@
-var express = require('express@1.0.0'),
+var express = require('express@1.0.7'),
connect = require('connect@0.5.1'),
jade = require('jade@0.6.0'),
app = module.exports = express.createServer(),
mongoose = require('mongoose@1.0.7'),
mongoStore = require('connect-mongodb@0.1.1'),
+ stylus = require('stylus'),
markdown = require('markdown').markdown,
sys = require('sys'),
models = require('./models'),
@@ -37,7 +38,7 @@ app.configure(function() {
app.use(express.session({ store: mongoStore(app.set('db-uri')), secret: 'topsecret' }));
app.use(express.logger({ format: '\x1b[1m:method\x1b[0m \x1b[33m:url\x1b[0m :response-time ms' }))
app.use(express.methodOverride());
- app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] }));
+ app.use(stylus.middleware({ src: __dirname + '/public' }));
app.use(express.staticProvider(__dirname + '/public'));
});
@@ -126,6 +127,7 @@ app.error(function(err, req, res, next) {
}
});
+/*
app.error(function(err, req, res) {
res.render('500.jade', {
status: 500,
@@ -134,6 +136,7 @@ app.error(function(err, req, res) {
}
});
});
+*/
// Document list
app.get('/documents.:format?', loadUser, function(req, res) {
View
@@ -86,7 +86,10 @@ function defineModels(mongoose, fn) {
LoginToken.pre('save', function(next) {
// Automatically create the tokens
this.token = this.randomToken();
- this.series = this.randomToken();
+
+ if (this.isNew)
+ this.series = this.randomToken();
+
next();
});
View
@@ -10,7 +10,7 @@
"node": ">= 0.2.0"
},
"dependencies": {
- "express": "1.0.0",
+ "express": "1.0.7",
"mongoose": "1.0.7",
"connect": "0.5.1",
"connect-mongodb": "0.1.1",
@@ -23,7 +23,7 @@ form {
list-style-type: none;
margin: 0;
padding: 0;
- background: #f6f6f6 url('/images/gradient.gif') repeat-x 50% 50%;
+ background: #f6f6f6 url("/images/gradient.gif") repeat-x 50% 50%;
border-bottom: 1px solid #999;
}
#header ul {
@@ -68,7 +68,7 @@ form {
.outline-view ul li.selected a {
color: #fff;
font-weight: bold;
- text-shadow: #666666 0 1px 1px;
+ text-shadow: #666 0 1px 1px;
}
.outline-view ul .selected {
font-weight: bold;
@@ -77,7 +77,7 @@ form {
background: -webkit-gradient(linear, left top, left bottom, from(#b2bed7), to(#8897ba));
background: -moz-linear-gradient(top, #b2bed7, #8897ba);
}
-.outline-view a:hover {
+.outline-view ahover {
background-color: #f0f0f0 !important;
}
.outline-view a {
@@ -105,7 +105,7 @@ ul.toolbar {
list-style-type: none;
margin: 0;
padding: 0;
- background: #f6f6f6 url('/images/glass.png') repeat-x 50% 50%;
+ background: #f6f6f6 url("/images/glass.png") repeat-x 50% 50%;
height: 30px;
border-top: 1px solid #c5c5c5;
position: absolute;
@@ -124,18 +124,14 @@ ul.toolbar a {
display: block;
padding: 6px 10px;
font-size: 14px;
- border: 1px solid #F5F4F5;
- color: #5A5A5A;
+ border: 1px solid #f5f4f5;
+ color: #666;
font-weight: bold !important;
width: 14px;
text-align: center;
font-size: 15px;
line-height: 16px;
}
-ul.toolbar a:active {
- background-color: #9c9c9c;
- border-color: #9c9c9c;
-}
ul.toolbar a {
text-shadow: #fff 0 1px 0;
text-decoration: none;
@@ -156,7 +152,7 @@ ul.toolbar a {
bottom: 0;
height: 30px;
border-top: 1px solid #c5c5c5;
- background: #f6f6f6 url('/images/glass.png') repeat-x 50% 50%;
+ background: #f6f6f6 url("/images/glass.png") repeat-x 50% 50%;
}
#controls a {
font-size: 13px;
@@ -165,7 +161,7 @@ ul.toolbar a {
#html-container {
padding: 10px;
border-bottom: 2px solid #c5c5c5;
- background-color: #F6F6F6;
+ background-color: #f6f6f6;
margin-bottom: 10px;
}
#html-container p {
@@ -194,15 +190,15 @@ ul.toolbar a {
}
.flash span {
float: left;
- margin-right: .7em;
+ margin-right: 0.7em;
}
.flash .ui-corner-all {
width: 300px;
margin: 50px auto 0 auto;
padding: 0 5px;
opacity: 0.9;
font-weight: bold;
- -moz-box-shadow: 0 0 8px #111;
- -webkit-box-shadow: 0 0 8px #111;
- box-shadow: 0 0 8px #111;
+ -moz-box-shadow: 0 0 8px #f6f6f6;
+ -webkit-box-shadow: 0 0 8px #f6f6f6;
+ box-shadow: 0 0 8px #f6f6f6;
}
@@ -1,235 +0,0 @@
-body {
- padding: 0;
- margin: 0;
- font: 14px "Lucida Grande", "Helvetica Nueue", Arial, sans-serif;
-}
-
-h1, h2, h3, h4, h5, h6, p, ul, li, div, form { margin: 0; padding: 0 }
-
-#header {
- width: 100%;
- height: 35px;
- list-style-type: none;
- margin: 0;
- padding: 0;
- background: #f6f6f6 url('/images/gradient.gif') repeat-x 50% 50%;
- border-bottom: 1px solid #999;
-}
-
-#header ul {
- list-style-type: none;
- padding: 8px;
-}
-
-#header h1 a {
- font-size: 18px
-}
-
-#header ul li {
- float: left;
-}
-
-#header ul li.right {
- float: right;
-}
-
-#header a {
- font-size: 13px;
- font-weight: bold;
- text-decoration: none;
- color: #333;
- text-shadow: #f0f0f0 0 1px 0;
-}
-
-#container {
-}
-
-.outline-view {
- position: absolute;
- width: 250px;
- background-color: #dfe3ea;
-}
-
-#DocumentTitles {
- overflow: auto;
-}
-
-.outline-view ul li {
- margin: 0;
- padding: 0;
-}
-
-.outline-view ul a {
- font-size: 13px;
- color: #000;
- text-decoration: none;
- display: block;
- padding: 7px 10px
-}
-
-.outline-view ul li.selected a {
- color: #fff;
- font-weight: bold;
- text-shadow: #666 0 1px 1px
-}
-
-.outline-view ul .selected {
- font-weight: bold;
- color: #fff;
- background-color: #8897ba;
- background: -webkit-gradient(linear, left top, left bottom, from(#b2bed7), to(#8897ba));
- background: -moz-linear-gradient(top, #b2bed7, #8897ba);
-}
-
-.outline-view a:hover {
- background-color: #f0f0f0 !important;
-}
-
-.outline-view a {
- outline: none
-}
-
-.content-divider {
- position: absolute;
- left: 250px;
- background-color: #999;
- width: 2px;
- margin: 0;
- padding: 0;
- cursor: e-resize;
- cursor: col-resize;
-}
-
-.content {
- position: absolute;
- left: 251px;
- margin: 0;
- padding: 0;
- overflow: auto;
- overflow-x: hidden
-}
-
-ul.toolbar {
- list-style-type: none;
- margin: 0;
- padding: 0;
- background: #f6f6f6 url('/images/glass.png') repeat-x 50% 50%;
- height: 30px;
- border-top: 1px solid #c5c5c5;
- position: absolute;
- left: 0;
- bottom: 0
-}
-
-ul.toolbar li {
- float: left;
- border-right: 1px solid #c5c5c5
-}
-
-ul.toolbar li.right {
- float: right;
- border-left: 1px solid #c5c5c5
-}
-
-ul.toolbar a {
- display: block;
- padding: 6px 10px;
- font-size: 14px;
- border: 1px solid #F5F4F5;
- color: #5A5A5A;
- font-weight: bold !important;
- width: 14px;
- text-align: center;
- font-size: 15px;
- line-height: 16px;
-}
-
-ul.toolbar a:active {
- background-color: #9c9c9c;
- border-color: #9c9c9c
-}
-
-ul.toolbar a {
- text-shadow: #fff 0 1px 0;
- text-decoration: none;
-}
-
-#editor-container {
- float: right;
- width: 100%;
-}
-
-#editor {
- border: none;
- outline: none;
- font-size: 108%;
- float: right;
-}
-
-#controls {
- position: absolute;
- left: 252px;
- bottom: 0;
- height: 30px;
- border-top: 1px solid #c5c5c5;
- background: #f6f6f6 url('/images/glass.png') repeat-x 50% 50%;
-}
-
-#controls a {
- font-size: 13px;
- width: 44px
-}
-
-#html-container {
- padding: 10px;
- border-bottom: 2px solid #c5c5c5;
- background-color: #F6F6F6;
- margin-bottom: 10px;
-}
-
-#html-container p {
- margin: 10px 0;
-}
-
-#html-button.active {
- background-color: #dfe3ea;
-}
-
-.page {
- padding: 10px;
-}
-
-.page h2 {
- margin-bottom: 10px;
-}
-
-.page p {
- margin: 10px 0;
-}
-
-.flash {
- position: absolute;
- top: 0;
- bottom: 0;
- z-index: 1001;
- width: 100%;
- opacity: 0.75;
- background-color: #111;
-}
-
-.flash span {
- float: left;
- margin-right: .7em;
-}
-
-.flash .ui-corner-all {
- width: 300px;
- margin: 50px auto 0 auto;
- padding: 0 5px;
- opacity: 0.9;
- font-weight: bold;
- -moz-box-shadow: 0 0 8px #111;
- -webkit-box-shadow: 0 0 8px #111;
- box-shadow: 0 0 8px #111;
-}
-
Oops, something went wrong.

0 comments on commit 0a70e40

Please sign in to comment.