Hoe wordt de hoofdmenu (hamburger) link/paneel gegenereerd?

The menu is appended to the document with Javascript when the button is clicked, so it won’t easily be converted to work on an HTML-only version of the site.

Here’s where the button is added, you can see it has an action named toggleHamburger:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/widgets/header.js#L246

The toggleHamburger action is defined later in the same file, here:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/widgets/header.js#L483

toggleHamburger changes the hamburgerVisible state, so the menu is ultimately added with panels.push(this.attach("hamburger-menu")); which you can see here:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/widgets/header.js#L379

1 like