Skip to content

Commit 60e8bfe

Browse files
committed
route login
1 parent 39fa245 commit 60e8bfe

File tree

8 files changed

+36
-16
lines changed

8 files changed

+36
-16
lines changed

app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ app.configure('development', function(){
2929

3030
app.get('/', routes.index);
3131
app.get('/users', user.list);
32+
app.get('/login', routes.login);
3233

3334
http.createServer(app).listen(app.get('port'), function(){
3435
console.log("Express server listening on port " + app.get('port'));

public/images/background.png

37.2 KB
Loading
2.4 KB
Loading

public/stylesheets/style.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
body {
2-
padding: 50px;
2+
padding-top:60px;
3+
padding-bottom:40px;
4+
background:url(images/background.png);
5+
overflow-y:scroll;
36
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
47
}
58

routes/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
/*
33
* GET home page.
44
*/
5-
65
exports.index = function(req, res){
7-
res.render('index', { title: 'Express' });
6+
res.render('index', { title: 'Learn Path' });
7+
};
8+
9+
/*
10+
* GET login page.
11+
*/
12+
exports.login = function(req, res){
13+
console.log('login');
14+
res.render('login',{ title: 'Login' });
815
};

views/bit/topbar.jade

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
div.navbar.navbar-fixed-top
2+
div.navbar-inner
3+
div.container
4+
a.brand(href = '/') Learn Path
5+
form.navbar-search.input-preend
6+
span.add-on
7+
span
8+
input.span6(name="query",type="text",placeholder = "search")
9+
i.icon-search.icon-white
10+
ul.nav.pull-right
11+
li
12+
a(href="/login") Login

views/layout.jade

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ html
55
link(rel='stylesheet', href='/stylesheets/style.css')
66
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
77
body
8-
div.navbar.navbar-fixed-top
9-
div.navbar-inner
10-
div.container
11-
a.brand(href = '/') Learn Path
12-
form.navbar-search.input-preend
13-
span.add-on
14-
span
15-
input.span6(name="query",type="text",placeholder = "search")
16-
i.icon-search.icon-white
17-
ul.nav.pull-right
18-
li
19-
a(href="/login") Login
20-
block content
8+
include bit/topbar
9+
div.container
10+
block content

views/login.jade

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends layout
2+
3+
block content
4+
h2 Login to continue
5+
div.span4
6+
a.btn(href = '/facebook_login_url')
7+
img(src='images/facebook-logo-large.png')

0 commit comments

Comments
 (0)