pmoreno-rodriguez / grav-theme-future2021

Future Imperfect theme by HTML5UP ported from scratch to Grav. Version 2021
Other
20 stars 10 forks source link

Remove the menu 'hamburger' from the top bar #57

Open l0rddarkf0rce opened 2 months ago

l0rddarkf0rce commented 2 months ago

I have looked everywhere in the settings and cannot find anyway to completely remove the menu from displaying. I am not using and it shows as empty, but I want to completely remove it. Is this possible?

pmoreno-rodriguez commented 2 months ago

Hello. The hamburger menu is designed for mobile devices. It displays all the menu items that appear on the desktop and other plugins such as taxonomy, archives, etc. If you do not use any of them, it may be necessary to adjust a variable that indicates that this menu is not displayed, otherwise it makes no sense to hide it.

l0rddarkf0rce commented 4 weeks ago

If you do not use any of them, it may be necessary to adjust a variable that indicates that this menu is not displayed, otherwise it makes no sense to hide it.

Which variable should I need to hide it? Many thanks

pmoreno-rodriguez commented 3 weeks ago

In blueprints.yaml (theme root folder), you may add this:

show_hamburguer_menu:
          type: toggle
          label: Show hamburguer menu
          highlight: 1
          default: 1
          options:
            1: PLUGIN_ADMIN.ENABLED
            0: PLUGIN_ADMIN.DISABLED
          validate:
            type: bool

Then, in partials\header.html.twig near from line 40, you need to add something like this:

{% if theme_var('show_hamburguer_menu')|defined(true) %}
        <li class="menu">
          <a class="fa-bars" href="#menu">Menu</a>
        </li>
{% endif %}