After Rails Rumble I decided I wanted to code a plugin to make large menus easier to write. If this interests you, please check Semantic Menu on github.
There is 1 todo left: a default style sheet. That is not something I can do easily, so if you use this project and end up creating CSS for a menu, please share ![]()
10 comments ↓
Looks good.
1 question though:
why do you attach the menu_level_* class to the ?
You could easely attacht that to the that way you can still target the inner but its a lot less markup.
Thanks Justin. I’m not sure exactly what you’re asking. I thought menu_level_* would make it easier to style - if there’s a better way, let me know and I can change it.
This is exactly the kind of feedback I need
hmm, looks like my html was stripped out, here it is again:
Looks good.
1 question though:
why do you attach the menu_level_* class to the “li”
You could easely attacht that to the “ul” that way you can still target the inner “li” but its a lot less markup.
Ah, that makes sense; I’ve pushed the change. Thanks!
Very cool start… seems it might also be a good idea to allow you to pass :id or :class to both the top of the block to add it on the the primary ul or the added items to the list navigation. This way people can target specific items to have multiple menus and from a design perspective it would allow for doing things like CSS image replace over text links. Thoughts?
Tim - please show me what kind of interface / output you want. Link to gist / pastie as my blog install doesn’t play nice with code
Daniel - this isn’t the greatest of code snippets but it supports the areas of using CSS that I think would be important - such as id declarations and multi-classing. This is very similar to an actual menu I have in production.
http://www.pastie.org/private/z4qjpffpbqf26vbimvnna
Tim - Thanks for the request; I’ve changed the code and README in
http://github.com/danielharan/semantic-menu/commit/bca5c0991db0ee98474308015d97d21f7b055865
Very nice Daniel - I like this a lot! Give me some time to really get to use it and I’ll see about making you a default CSS file if you’d like.
Thanks Tim - for those, the best way to reach me is by sending me a pull request on github. A default CSS would be great!
Leave a Comment