Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
Last active November 21, 2020 12:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carolineschnapp/bdf058fa94ecfab029d3 to your computer and use it in GitHub Desktop.
Save carolineschnapp/bdf058fa94ecfab029d3 to your computer and use it in GitHub Desktop.
Disable the 'hide behind hamburger icon' feature for the navigation when it contains too many links to fit on one line. #Brooklyn

Problem

You want to disable that “hide-behind-hamburger-icon” behavior in the large view:

Alt text

Solution

You can either reduce the amount of links in the Main Menu, or...

  1. Comment out theme.fitNav(); in theme.js.liquid. Direct link.
  2. Add .site-nav { white-space: normal; opacity: 1; } at the VERY BOTTOM of theme.scss.liquid. Direct link.
//theme.fitNav();
.site-nav {
white-space: normal;
opacity: 1;
}
@lloyd10
Copy link

lloyd10 commented Mar 23, 2016

Unable to locate:

  1. theme.fitNav();
    on line 1. I see window.theme = window.theme || {};
    want to disable hamburger menu in order to see menu across the page.
    Using Brooklin site name baggerx.com

@jessface
Copy link

Any chance someone could help me with the opposite in the Brooklyn Theme - so, only have the hamburger menu showing at all sizes on desktop and stop the navigation showing as text links across the top? :) Any help would be hugely appreciated!

@ecassidymitchell
Copy link

I took out and put in coding...no changes

@ecassidymitchell
Copy link

well a change but didnt remove burger

@Legwon
Copy link

Legwon commented Dec 14, 2019

Worked PERFECTLY!!!
NOTE!! there is MORE THAN ONE INSTANCE of theme.fitNav(); in theme.js.liquid

@onasipim
Copy link

onasipim commented Nov 21, 2020

Still works great with new Brooklyn version.

I had to add as well to theme.scss.liquid for showing the hamburger menu on mobile
.site-nav, .site-nav--open { opacity: 1; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment