diff options
Diffstat (limited to '')
-rw-r--r-- | router.js | 15 | ||||
-rw-r--r-- | views/dashboard.ejs | 37 |
2 files changed, 47 insertions, 5 deletions
@@ -56,15 +56,20 @@ module.exports = function(app) { } else { console.log('jeg er inne i elsen'); AM.autoLogin(req.cookies.user, req.cookies.pass, function(o) { - req.session.user = o; - console.log('DAFUQ SKJEDDE NĂ…'); - res.render('index', { title: 'Autologin' }); + if (o != null) { + req.session.user = o; + res.redirect('/IJUSTAUTOLOGGEDDEGINN'); + } else { + res.redirect('/'); + } }); - res.redirect('/IJUSTAUTOLOGGEDDEGINN'); } // res.redirect('/HAHAHAHAHAHA'); } else { - res.render('index', { title: 'kanin' }); + res.render('dashboard', { + title: 'kanin', + loggedin: true + }); } }); diff --git a/views/dashboard.ejs b/views/dashboard.ejs new file mode 100644 index 0000000..fe29166 --- /dev/null +++ b/views/dashboard.ejs @@ -0,0 +1,37 @@ +<% include header %> +</head> +<body> + <% include navbar %> + + <!-- Wrapper + ================================================== --> + <div class="container" id="wrapper"> + <div class="row-fluid row" style="background-color: #f99"> + + <div class="span5" style="background-color: #99f"> + <h1>Prosjekter</h1> + <section class="projects"> + <section class="project"> + <h1>Hyttetur</h1> + Dennis, Robert, Turid-Laila + </section> + <section class="project"> + </section> + <section class="project"> + </section> + </section> + </div><!-- /div.span5 --> + <div class="span7"> + HER KOMMER EN GRAF + </div><!-- /div.span7 --> + + + + + + + + </div><!-- /div.row --> + </div><!-- /div.#wrapper --> + +<% include footer %> |