How to Hide Hamburger button in Boost before log in

How to Hide Hamburger button in Boost before log in

par Xavier Pejo,
Nombre de réponses : 12


We are using Moodle 3.2.1 with the Boost theme. I'm looking to hide the hambuger button in Boost theme before log in. 

Any help would be appreciated, thanks.

Moyenne des évaluations: -
En réponse à Xavier Pejo

Re: How to Hide Hamburger button in Boost before log in

par Mary Evans,
Avatar Core developers Avatar Documentation writers Avatar Peer reviewers Avatar Plugin developers Avatar Testers

Hi,

You could try this in the Sit Administration > Appeaance >  Boost >  Advance settings > Raw SCSS(2nd box)

.notloggedin .container-fluid.navbar-nav > div { display: none; }

I have increased the font size so you can see that this SCSS uses lots of dots that need to be as you see them.

Hope this helps?

Mary

Moyenne des évaluations:Useful (1)
En réponse à Mary Evans

Re: How to Hide Hamburger button in Boost before log in

par Milán Váróczi,

Hi,


I would like to Hide Hamburger button in Boost, after log in.

Please, help me!


En réponse à Milán Váróczi

Re: How to Hide Hamburger button in Boost before log in

par Mary Evans,
Avatar Core developers Avatar Documentation writers Avatar Peer reviewers Avatar Plugin developers Avatar Testers

The CSS  is the same but without .notloggedin 

En réponse à Mary Evans

Re: How to Hide Hamburger button in Boost before log in

par Milán Váróczi,

Hy Mary,


Thank You! Perfect! sourire


But, I've one (or two) other problem. triste


I'd like to customize the Stundent's Administration tree, 


There is a picture. This Stundent not enrolled to any courses. On the Adtministration menu tree has a Grades and a Badget link.


I'd like to remove (hide, delete, ... ) these links, because this Student hasn't got a course. (Badges not in used, so it's unnecessary)


But, when another Student will enroll an Exam course, he will can view the Grades.


Can I set this menu tree to this option?


I think, maybe this is a More style...


Thank You!


By: Milan

Annexe moodle_menu.JPG
En réponse à Milán Váróczi

Re: How to Hide Hamburger button in Boost before log in

par Mary Evans,
Avatar Core developers Avatar Documentation writers Avatar Peer reviewers Avatar Plugin developers Avatar Testers

Sorry, but I am confused now.

This discussion is about the Hamburger icon in the Boost theme. This is NOT about all the links in the Administration block in the More theme.

If you need help with that block then ask a question in the Blocks Forum

Same too for Mobile problems ask for help in the Mobile Forum.

Thanks

Mary

En réponse à Mary Evans

Re: How to Hide Hamburger button in Boost before log in

par Milán Váróczi,

Hy Mary,


the hamburger button is visible, when i visit the page via mobile. I changed the theme to More. Can I remove the hamburger button?


Thx!


Milan

En réponse à Mary Evans

Re: How to Hide Hamburger button in Boost before log in

par Ray Pierce,

Mary,


This worked great to remove the Hamburger button. However, when I run this code the Log In/Log out link link and dropdown for changing roles is also removed. Is there a workaround to this?


Ray

En réponse à Ray Pierce

Re: How to Hide Hamburger button in Boost before log in

par Jean-Roch Meurisse,
Avatar Core developers Avatar Plugin developers Avatar Testers

Hi Ray,

Do you want to remove the nav-drawer after login as well? In this case, try this (otherwise write .notloggedin before the rest 

[data-region="drawer-toggle"] button {
    display:none;
}

Be careful though. If the drawer has been used before, people having left it open on last logout will see the drawer on their next login and won't be able to hide it !
I you want to completely remove the nav-drawer from your moodle instance you'll have to reset to false "drawer-open-nav" user preference in your database for all user.

Cheers

En réponse à Jean-Roch Meurisse

Re: How to Hide Hamburger button in Boost before log in

par Ray Pierce,
Hi Jean-Roch,



I want to keep the nav drawer open permanently and eliminate the Hamburger button. It is confusing to many. The code that Mary provided does the trick with one exception, it also eliminates the Log In/Log Out link at the top right and also the drop down menu that allows me to change roles.



Is there a way to:



1. Remove the hamburger button yet keep the Nav Drawer open

2. Do that without losing the Log In/Log Out Link and drop down menu
En réponse à Ray Pierce

Re: How to Hide Hamburger button in Boost before log in

par Jean-Roch Meurisse,
Avatar Core developers Avatar Plugin developers Avatar Testers

Hi Ray,


To keep the nav-drawer open permanently:

  1. Use the css code from my previous post (that css rule will target the hamburger button only and so will keep log in log out links and dropdown menu
  2. Set "drawer-open-nav" user preference to "true" for all users in your database, so that people having hidden the nav-drawer before will have it displayed again (otherwise, such users will never be able to make it appear again)

Cheers