Monday, 5 June 2017

node/passportjs how to update homepage with welcome user, after logging in and redirect

So after landing on the home page, click to sign in, redirect home and at the top I want it to now show the 'welcome [user]'. How do i do that? Basically change from 'login here' to 'welcome user and sign out' after logging in. I want to add this:

h1.text-center.login-title Welcome #{user.firstName}.

To my current html/jade after logging in:

 extends layout
    block content



    body(style='background-color:black')
   p
    a.fade(href="#")
     img.fade(src='http://data.whicdn.com/images/18140107/large.jpg', 
  height='150', width='200')

  p 
    ul.centered
      li.none
      li Chapter 1 
      li Chapter 2
      li Chapter 3
      li Chapter 4
      li Chapter 5
      li Chapter 6
      li Chapter 7
      li Chapter 8
      li Chapter 9
      li Chapter 10



via kappaflow

No comments:

Post a Comment