How to Hide Hamburger button in Boost before log in

How to Hide Hamburger button in Boost before log in

by Xavier Pejo -
Number of replies: 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.

Average of ratings: -
In reply to Xavier Pejo

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

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of 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

Average of ratings: Useful (1)
In reply to Mary Evans

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

by Milán Váróczi -

Hi,


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

Please, help me!


In reply to Milán Váróczi

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

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The CSS  is the same but without .notloggedin 

In reply to Mary Evans

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

by Milán Váróczi -

Hy Mary,


Thank You! Perfect! smile


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


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

Attachment moodle_menu.JPG
In reply to Milán Váróczi

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

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of 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

In reply to Mary Evans

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

by 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

In reply to Mary Evans

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

by 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

In reply to Ray Pierce

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

by Jean-Roch Meurisse -
Picture of Core developers Picture of Plugin developers Picture of 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

In reply to Jean-Roch Meurisse

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

by 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
In reply to Ray Pierce

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

by Jean-Roch Meurisse -
Picture of Core developers Picture of Plugin developers Picture of 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