Skip to content

Commit f7ed507

Browse files
author
Giancarlo
committed
the integration with fb did not work, all alterations became in comment
1 parent f034d13 commit f7ed507

File tree

11 files changed

+117
-41
lines changed

11 files changed

+117
-41
lines changed

app/controllers/auth_controller.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var actions = {};
2+
actions.index = function(request,response){
3+
req.autenticate(["facebook"], function(error,autenticated){
4+
console.log(autenticated);
5+
})
6+
};
7+
8+
module.exports = actions;

app/views/index.jade

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
!!! 5
2+
html
3+
head
4+
title The TV Herald
5+
link(rel='stylesheet', href='/stylesheets/style.css')
6+
7+
body
8+
#all
9+
#top
10+
#logo1
11+
img(src='/images/logo.png', title='The TV Herald', name='logo')
12+
#menu
13+
tr(cellspacing='20px')
14+
td menu1
15+
a.menu(href='/app/views/index.jade', title='Home') HOME
16+
td menu2
17+
a.menu(href='http://teste.thetvherald.nodejitsu.com/signin', title='Login') LOGIN
18+
#content
19+
#center
20+
h1 Series
21+
p
22+
#bottom
23+
p Created by | #F4b

app/views/layout.jade

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ html
1010
#logo1
1111
img(src='/images/mainlogo.png', title='The TV Herald', name='logo')
1212
#menu
13-
h1 Watch LESS television watching RIGHT television!
14-
p The TV Herald suggests an alternative way to reducing hours spent watching television: watch only the TV series that interest you. Just make login and look for some series that you might like to get synopses, exhibition dates and more.
13+
h2 Watch LESS television watching RIGHT television!
14+
p TV Herald suggests an alternative way to reduce the time you spend watching poor television. It's an app that allows you to search the series you're interested in. (Don't waste more time!)
15+
p Just log in (through Facebook) and look for the series you would like to get synopses, exhibition dates and more.
1516
#links
1617
a.menu(href='/app/views/index.jade', title='Home') HOME
17-
#content
18-
#center
19-
h1 Series
18+
a.menu(href='http://teste.thetvherald.nodejitsu.com/signin', title='Login') LOGIN
19+
#content
20+
#center
21+
h1 Series
22+
p
2023
#bottom
21-
p abcdef
24+
p Created by | #F4b
2225

2326

app/views/redirect.jade

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
!!! 5
22
html
33
head
4-
title= The TV Herald
5-
link(rel='stylesheet', href='/public/stylesheets/style.css'))
4+
title The TV Herald
5+
link(rel='stylesheet', href='/stylesheets/style.css')
66

77
body
88
#all
99
#top
1010
#logo1
1111
img(src='/images/logo.png', title='The TV Herald', name='logo')
1212
#menu
13-
#content
14-
#center
15-
h1 Series
13+
tr(cellspacing='5')
14+
td menu1
15+
a.menu(href='/app/views/index.jade', title='Home') HOME
16+
td menu2
17+
a.menu(href='http://teste.thetvherald.nodejitsu.com/signin', title='Login') LOGIN
18+
#content
19+
#center
20+
h1 Series
21+
p
1622
#bottom
17-
p2 abcdef
23+
p Created by | #F4b

lib/routes.js

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/*
2-
TODO: This is quick and dirty, should obviously refactor the hell out of this
2+
TODO: This is quick and dirty, should obviously refactor the hell out of this
33
*/
44

55
var match = function(url,handler,method){
66
handler = handler || "site#index";
7-
7+
88
var parts = handler.split(/\#/),
9-
util = require("./util"),
10-
controller = parts.shift(),
11-
action = parts.shift(),
12-
sys = require('sys'),
13-
method = method || "get";
9+
util = require("./util"),
10+
controller = parts.shift(),
11+
action = parts.shift(),
12+
sys = require('sys'),
13+
method = method || "get";
1414

1515
//sys.puts(sys.inspect(controller));
16-
16+
1717
if(!controller.match(/_controller$/)){
1818
if (controller == 'site') {
19-
controller = 'Index';
19+
controller = 'Index';
2020
}
2121
controller = controller + "Controller";
2222
}
23-
23+
2424
sys.puts(sys.inspect(Server.controllers.controller_objects));
2525
sys.puts(sys.inspect(controller));
2626

2727
var controller_id = util.camelize(controller),
28-
action_handler = Server.controllers.controller_objects[controller][ action ];
29-
28+
action_handler = Server.controllers.controller_objects[controller][ action ];
29+
3030
//add the handler for the url
3131
if(url && action_handler){
3232
app[method](url,action_handler);
@@ -38,5 +38,6 @@ var resource = function(resource_name){
3838
};
3939

4040
module.exports.draw = function(app){
41-
match("/")
41+
match("/");
42+
//match("/signin","Auth#index");
4243
};

lib/setup.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
var keys = require("appkeys")
12
module.exports.setup = function(o){
23
var sys = require("sys"),
34
app = o.app,
@@ -8,7 +9,7 @@ module.exports.setup = function(o){
89

910
global.db = mongoose.connect("mongodb://localhost/tv");
1011

11-
require("./models.js").autoload(db);
12+
require("./models.js").autoload(db);
1213
require("./controllers.js").autoload(app);
1314
require("./routes.js").draw(app);
1415

@@ -19,6 +20,10 @@ module.exports.setup = function(o){
1920
app.use(express.methodOverride());
2021
app.use(app.router);
2122
app.use(express.static(__dirname + '/../public'));
23+
/*app.use(auth( [
24+
auth.Facebook({appId : keys.fbId, appSecret: keys.fbSecret, scope: "email", callback: "http://teste.thetvherald.nodejitsu.com/signin"})
25+
]) );*/
26+
2227
});
2328
app.configure('development', function(){
2429
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
@@ -27,6 +32,5 @@ module.exports.setup = function(o){
2732
app.configure('production', function(){
2833
app.use(express.errorHandler());
2934
});
30-
3135
app.listen(8080);
32-
};
36+
}

public/images/hover.png

3.11 KB
Loading

public/images/hover_01.png

4.44 KB
Loading

public/images/hover_04.png

4.46 KB
Loading

public/images/image.png

6.35 KB
Loading

public/stylesheets/style.css

+44-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ body {
22
margin:50px 50px 50px 50px;
33
padding: 20px;
44
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
5-
background-color: #bab595;
5+
background-color: #bab595;;
6+
background: -moz-linear-gradient(top, #bab595, #aaa585);
7+
background: -webkit-gradient(linear, left top, left bottom, from(#bab595), to(#aaa585));
68
height: 100%;
79
}
810

@@ -12,7 +14,7 @@ div#all {min-height: 100%;
1214
div#logo1 { float: left;
1315
}
1416

15-
div#top { height:300px
17+
div#top { height:300px;
1618
}
1719

1820
div#menu { margin-left: 290px;
@@ -25,9 +27,11 @@ div#menu { margin-left: 290px;
2527
border-radius: 10px;
2628
}
2729

28-
div#links {
29-
text-align:center;
30+
hr { color: #4158f3;
31+
box-shadow: 5px 5px 5px #000;
32+
height: 1px
3033
}
34+
3135
h1 {
3236
font-family: "Arial Black";
3337
font-size: 24pt;
@@ -42,28 +46,56 @@ h2 {
4246
text-shadow: 0.1em 0.1em 0.2em black;
4347
}
4448

45-
a.menu:link {font-size: 18px;
49+
div#teste2 { float:center}
50+
51+
div#links {
52+
height: 30px;
53+
position: relative;
54+
box-shadow: 6px 6px 6px #3a3939;
55+
background: #6d79ca;
56+
background: -moz-linear-gradient(top, #6d79ca, #1d31b9);
57+
background: -webkit-gradient(linear, left top, left bottom, from(#6d79ca), to(#1d31b9));
58+
-moz-border-radius: 5px;
59+
-webkit-border-radius: 5px;
60+
border-radius: 5px;
61+
box-shadow: 6px 6px 6px #3a3939;
62+
}
63+
64+
a.menu { margin-left: 20px;
65+
}
66+
67+
a.menu:link {font-size: 18px;
4668
font-family: "Arial Black";
4769
text-shadow: 0.1em 0.1em 0.2em black;
4870
text-decoration: none;
4971
color: #000000;
72+
position:absolute;
5073
}
51-
a.menu:visited {text-decoration: none;
74+
75+
a.menu:visited {text-decoration: none;
76+
font-size: 18px;
77+
font-family: "Arial Black";
78+
text-shadow: 0.1em 0.1em 0.2em black;
79+
text-decoration: none;
5280
color: #000000;
5381
}
54-
a.menu:hover {text-decoration: none;
82+
83+
a.menu:hover {text-decoration: none;
84+
font-size: 18px;
85+
font-family: "Arial Black";
86+
text-shadow: 0.1em 0.1em 0.2em black;
87+
text-decoration: none;
5588
color: #000000;
56-
background-image:url('/images/hover.png');
57-
box-shadow: 2px 2px 2px #000;
5889
}
59-
a.menu:active {text-decoration: none;
90+
91+
a.menu:active {text-decoration: none;
6092
}
6193

6294
div#center {
6395
font-family: Arial;
6496
background-color: white;
6597
box-shadow: 5px 5px 5px #000;
66-
border: solid 1px;
98+
border: solid 1px #ffffff;
6799
background: #FFFFFF;
68100
background: -moz-linear-gradient(top, #FFFFFF, #d3d3d3);
69101
background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#d3d3d3));
@@ -72,7 +104,6 @@ div#center {
72104
border-radius: 10px;
73105
}
74106

75-
76107
div#bottom {
77108
float: bottom;
78109
margin: 15px;
@@ -88,4 +119,4 @@ div#bottom {
88119
border-radius: 5px;
89120
-moz-border-radius: 5px;
90121
-webkit-border-radius: 5px;
91-
}
122+
}

0 commit comments

Comments
 (0)