interim commit

This commit is contained in:
Julian Lam
2013-05-02 09:13:09 -04:00
parent a6cbed94fc
commit 3ca880d81e
2 changed files with 16 additions and 3 deletions

View File

@@ -109,6 +109,8 @@
#user_label img {
border: 1px solid #999;
margin-right: 8px;
margin-top: -2px;
float: left;
}
#user_label span {
@@ -135,7 +137,7 @@
<li><a href="/login">Login</a></li>
</ul>
<ul class="nav pull-right">
<li><p class="navbar-text" id="user_label"></p></li>
<li><a href="#" id="user_label"></a></li>
<li><a href="/logout">Log out</a></li>
</ul>
</div>

View File

@@ -65,6 +65,10 @@ var express = require('express'),
});
});
app.get('/403', function(req, res) {
res.send(templates['header'] + templates['403'] + templates['footer']);
});
// need a proper way to combine these two routes together
app.get('/topics/:topic_id', function(req, res) {
@@ -126,8 +130,15 @@ var express = require('express'),
res.send(templates['header'] + templates['account_settings'] + templates['footer']);
});
app.get('/403', function(req, res) {
res.send(templates['header'] + templates['403'] + templates['footer']);
app.get('/users', function(req, res) {
// Render user list
res.send('User list');
});
app.get('/users/:username', function(req, res) {
global.modules.user.get_uid_by_username(req.params.username, function(uid) {
res.send(templates['header'] + templates['user_profile'].parse({ uid: uid }) + templates['footer']);
});
});
}(WebServer));