psychobunny 12 years ago
commit abf4be488a

@ -23,7 +23,8 @@
"passport-twitter": "0.1.4", "passport-twitter": "0.1.4",
"passport-google-oauth": "0.1.5", "passport-google-oauth": "0.1.5",
"passport-facebook": "0.1.5", "passport-facebook": "0.1.5",
"less-middleware": "0.1.11" "less-middleware": "0.1.11",
"marked": "0.2.8"
}, },
"devDependencies": {}, "devDependencies": {},
"optionalDependencies": {}, "optionalDependencies": {},

@ -24,7 +24,7 @@ body {
} }
.none { .none {
display: none; display: none !important;
} }
.block { .block {

@ -1,5 +1,6 @@
var RDB = require('./redis.js'), var RDB = require('./redis.js'),
utils = require('./utils.js'); utils = require('./utils.js'),
marked = require('marked');
(function(Posts) { (function(Posts) {
//data structure //data structure
@ -41,7 +42,7 @@ var RDB = require('./redis.js'),
var posts = []; var posts = [];
for (var i=0, ii=content.length; i<ii; i++) { for (var i=0, ii=content.length; i<ii; i++) {
posts.push({ posts.push({
'content' : content[i], 'content' : marked(content[i]),
'uid' : uid[i], 'uid' : uid[i],
'timestamp' : timestamp[i], 'timestamp' : timestamp[i],
'relativeTime': utils.relativeTime(timestamp[i]) 'relativeTime': utils.relativeTime(timestamp[i])

@ -26,7 +26,7 @@ var RDB = require('./redis.js'),
posts.get(function(data) { posts.get(function(data) {
topic_body = topic_body.parse(data); topic_body = topic_body.parse(data);
callback(topic_body); callback(topic_body);
}, tid, start, end) }, tid, start, end);
}; };
// this needs to move into forum.js // this needs to move into forum.js

@ -270,7 +270,7 @@ passport.deserializeUser(function(uid, done) {
app.get('/users/:username', function(req, res) { app.get('/users/:username', function(req, res) {
global.modules.user.get_uid_by_username(req.params.username, function(uid) { global.modules.user.get_uid_by_username(req.params.username, function(uid) {
res.send(templates['header'] + templates['user_profile'].parse({ uid: uid }) + templates['footer']); res.send('User profile for uid: ' + uid);
}); });
}); });
}(WebServer)); }(WebServer));

Loading…
Cancel
Save