ElkArte Community

Elk Development => Theme development => Topic started by: Wizard on October 11, 2015, 01:30:02 pm

Title: Menu listing
Post by: Wizard on October 11, 2015, 01:30:02 pm
I am a bit confused by the menu listing in ElkArte. Would be great if someone can explain it.
Title: Re: Menu listing
Post by: wintstar on October 11, 2015, 02:15:07 pm
Agree with you. It is not entirely to understood.



Title: Re: Menu listing
Post by: emanuele on October 11, 2015, 06:01:09 pm
Well, that's a rather generic question, I'm not entirely sure what you mean, sorry... :-[
Any specific question?
Title: Re: Menu listing
Post by: Wizard on October 11, 2015, 06:06:36 pm
Yes, generic. Could you please explain (when free ) how it is structured ?
Title: Re: Menu listing
Post by: emanuele on October 11, 2015, 06:12:13 pm
The problem is that on a generic question I could answer anything without giving you any useful information...
It's an ul list and each submenu is a nested ul.
It uses superfish and superclick.
Dunno what else add.
Title: Re: Menu listing
Post by: Wizard on October 11, 2015, 06:23:25 pm
Which classes are involved ?
Title: Re: Menu listing
Post by: Joshua Dickerson on October 11, 2015, 08:22:34 pm
Wizard, what browser are you using? I'm going to give you the tools to answer your own question.
Title: Re: Menu listing
Post by: Wizard on October 11, 2015, 08:35:55 pm
Firefox.  :)
Title: Re: Menu listing
Post by: Joshua Dickerson on October 11, 2015, 08:51:30 pm
You should already know this but here: https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_CSS
Title: Re: Menu listing
Post by: Wizard on October 11, 2015, 08:56:43 pm
Thanks @Joshua Dickerson
Title: Re: Menu listing
Post by: Wizard on October 11, 2015, 10:19:05 pm
Which all css files contains menu elements ? index.css says

Quote$MENUS...............Main and secondary menus.

Which are main and secondary menus ?
Title: Re: Menu listing
Post by: Spuds on October 12, 2015, 06:59:56 am
Not sure what you are asking either :(

The "code" is basically

menulevelX <- menulevel is the class applied to the UL that contains the menu items and X (1,2,3) is the level of nesting
listlevelX <- listlevel is the class applied to the LI's inside the menulevel, so inside a menulevel1 should reside listlevel1 items.

If a listlevel1 has its own sub menu then you add a ul menulevel2 in that list with its own set of listlevel2 items.  And if a drop down needs its own drop down (only admin area I think) then it gets a menulevel3 ul with listlevel3 li's inside.

I'm not sure there is s menulevel1 class or just a defined menu_whatever div to hold the various menus, like main, quick, etc since thats generally a custom positioning div, like allowing the admin side menus instead of top menu.

The menus work without JS enabled as well for those that do that, super fish + hover intent are used to remove some of the jittery aspects of css only menus to improve a11y access.
Title: Re: Menu listing
Post by: Wizard on October 12, 2015, 07:16:43 am
I saw many types of classes

main_menu, menu_nav, menu_sidebar
menulevel1,2,3
menu1,menu2,menu3
linklevel1,2,3
listlevel1,2,3

instead of 2 you mentioned above.

Also, which all files have menu's css ?
Title: Re: Menu listing
Post by: Spuds on October 12, 2015, 07:45:27 am
I'll let someone else try and explain it better, thats the best I can do :(
Title: Re: Menu listing
Post by: Wizard on October 12, 2015, 07:49:29 am
It's ok. Thanks for trying.
Title: Re: Menu listing
Post by: emanuele on October 14, 2015, 01:36:40 am
Quote from: Wizard – Which are main and secondary menus ?
Main is the one at the top of each page (home, admin, etc.).
Secondary are the ones present in some pages like the profile, admin area, moderation, pm area, etc.
Title: Re: Menu listing
Post by: Wizard on October 14, 2015, 04:31:42 am
Possible to have a structure of classes ?
Title: Re: Menu listing
Post by: emanuele on October 15, 2015, 02:03:28 am
It's what Spuds wrote at http://www.elkarte.net/community/index.php?topic=2995.msg20904#msg20904 really, there isn't much more than that (maybe an active class on the active button I guess).
IIRC Joshua suggested to use the browser tools to discover styles and classes of the markup, this is the best tool to use (much, much better than ask me that I'm theming-dumb and don't understand much of css and alike). ;D