diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 1acf85c..d6279b2 100755 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1204,4 +1204,12 @@ span#register-amt{ p#reg{ font-size:16px; color: #5F666D; -} \ No newline at end of file +} +h3#profile { + position: absolute; + right: 0; + margin-right: 20px; + margin-top: 100px; +} + + diff --git a/routes/untitled b/routes/untitled deleted file mode 100644 index e69de29..0000000 diff --git a/routes/users.js b/routes/users.js index 47882ea..d62dae2 100644 --- a/routes/users.js +++ b/routes/users.js @@ -129,7 +129,7 @@ router.post('/register', function (req,res) { router.get('/profile', (req, res) => { - console.log(req.session.user + ' USEERRR') + console.log(req.session.userid + ' USEERRR') if(req.session.user == null){ res.redirect('/') } else { diff --git a/views/content.pug b/views/content.pug index 1d86443..a70f4d2 100644 --- a/views/content.pug +++ b/views/content.pug @@ -1,4 +1,3 @@ -s section#intro.intro-2(data-parallax="scroll" data-image-src="assets/images/computer-code.jpg") .content#mouse-parallax .container diff --git a/views/login.pug b/views/login.pug index b696d7b..70b03d1 100644 --- a/views/login.pug +++ b/views/login.pug @@ -15,7 +15,6 @@ section.event-single form(action='login' method='post') .col-sm-8 h2 Login - form(action="/login" method="post") input.reg-input.scroll-reveal(type='text' placeholder='username' name='username') input.reg-input.scroll-reveal(type='text' placeholder='password' name='password') label.chk-label.scroll-reveal diff --git a/views/profile.pug b/views/profile.pug index 6388c21..4c802c7 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -1,9 +1,9 @@ include header - h1 #{user.username} - - if user.orders.length > 0 +.container + h3#profile Hello #{user.username} + if user.order > 0 + console.log('this is the order' + user.order) each order in user.orders - p= order.product - else - p we dont have any orders - + p= orders.products.id + else + p You dont have any orders