Online store on Steemit blockchain| Step fifteen | Templates: NavBar | User Menu

in Steem Alliancelast year

Hello, friends!

Step 15.jpg

Now our profile looks like this. And it seems to me that there is quite a lot of excess. We need to remove this and add a touch of minimalism.

Screenshot_35.png

Let's put all the menu items we need in our custom menu that opens when you click on our avatar. Thus, we optimize our space.

Screenshot_36.png

We also need to divide this space into two positions. When you are an anonymous user and when you are already an authorized user.
In the first position, you will see the registration and authorization menu.
And in the second position, you will see directly your user menu.

Screenshot_40.png

Now I propose to register our css and html grid for an authorized user.

Screenshot_41.png

Since we have statics connected from the last time, we can add a variable to our avatar and each user will have their own avatar displayed.

How do we add an avatar?
First, we specify our model. Therefore, we show our views and after that we specify the field in the database. And since it should be a link, we specify the standard django .url function.

Screenshot_42.png

Now let's display our menu via universal links.
We will have it on the menu.
Profile
Settings
Add item
Exit
Screenshot_43.png

This is what our menu looks like now. And unfortunately, at the moment only the avatar and the profile settings button work. But in the next lessons we will correct this defect.

Our avatar. A little bit of playing around with the css will make it look better.

Screenshot_44.png

And if we click on our avatar. Then we will see such a user menu.

Screenshot_45.png

We also now have access to our profile settings. And we have the opportunity to change the avtar and change the form of ourselves.

Screenshot_46.png

Now let's get to the anonymous part of our navbar.

Screenshot_47.png

Everything is quite simple and we see an almost identical menu as that of authorized users.
Now let's see how the browser displays it to us. And the most important thing. Don't forget to log out of your profile in order to see what's being displayed by the anonymous user.

Screenshot_49.png

Great!
That's all for today! Next time we'll add a profile page. As well as adding our course through the user.

Thanks for supporting the project.

@rme , @rex-sumon , @shy-fox , @hungry-griffin, @pennsif

The project is being created in partnership with @steemit-market.

Above may be wrong. Since I wrote the code from memory and then corrected it. But git will have no errors.

Link to the git.

steem blockchain.jpg

You can get acquainted with the project here.

You can find all parts of the projects by the tag: #storeonsteemit

To be continued...

Sincerely, your HardPhotographer

Sort:  

Upvoted! Thank you for supporting witness @jswit.

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 63746.34
ETH 3048.25
USDT 1.00
SBD 3.97