- [Instructor] Adding the welcome message to layout.
In this video we'll be adding the welcome user
message to the layout.
We're going to be modifying the stylesheet as well
to format the welcome message.
And we'll test the layout to make sure
the message is displaying correctly.
So let's go and see how this is done in the application.
Okay, so let's do that really quick.
So that's going to be inside the layout,
and we'll do right here maybe below the navigation.
And we'll do the same thing.
If the session username
existed is logged in,
then I want to say maybe put a span tag here.
We'll put a class called user,
we'll do that in a minute,
just say "Welcome" and then the name,
so the session username, kay?
And then close that "if" block,
okay endif.
Okay, so we have a classical user so let's go to a CSS
and just add a CSS here called "user."
And I'm going to make it float to the right,
so float right.
Make it absolute, position absolute.
And then the font size,
we can pick something like 25 I guess,
and it's going to right so probably too far right.
I'm going to do a right side maybe like 10 em.
I'm just imagining in my head now.
The top will be maybe like three em,
something like that okay?
We'll fix it if it's not right.
Okay, let's save that and let's go
to the browser and refresh, and well it's right here.
It's the wrong place actually.
We want that to go over there to the right.
Okay, so let's go back and fix it one more time.
The user here, float right.
Position is absolute and then 15 font size,
right 10 and then three em.
Okay, well let's see here one more time.
I'm just going to put here.
If if doesn't look good you can play with it,
but I think that's what I want it though,
but it didn't show up the way I want it.
Okay there it is, so close enough, right?
That's see F12 and fix it real quick.
And so we want that to be maybe like,
yeah right there's good so we change that to two,
and then right side will be,
yeah we'll keep it 10.
So let's go back to the here and just put two
and then I think we're good here.
All right so that's it.
Very simple like that, it looks very simple.
As you can see if I log out, okay,
I'm back to where I was before.
If I try to enroll I can't do it.
And again if I go here, if I enroll again,
okay so very simple,
and that's how you do sessions.
And this end of this section actually.
With the next section we'll learn
how to create and test the REST APIs
using Chrome's ATP client called Postman.