Closed sebpca closed 7 years ago
Good point. These secondary menus aren't — as of this moment — an officially blessed pattern.
They evolved as right-sidebar navigation wasn't very effective, nor did it help indicate the breadcrumb structure.
So, a couple things: 1) Need to revisit this and distill a pattern 2) Make usage rules (when to have horiz at top of page vs right sidebar vertical)
We discuss the menu patterns a little at https://ebiwd.github.io/EBI-Pattern-library/meta-patterns/page-structure/, but it really is quite lacking.
But, to your comment, the .leaf
class isn't necessary, that's a class that Drupal is injecting by default. Key bit of code/structure is in ebi-global.css@481:
ul.menu.secondary-menu li,
.secondary-menu ul.menu li {
display: inline-block; }
In the Drupal scenario, we have .secondary-menu
on a parent div, as it's the best way for drupal. But the most semantically correct way would be to add it on the ul.menu
.
This is now documented: http://www.ebi.ac.uk/style-lab/websites/patterns/menu.html
Refrence: /meta-patterns/page-structure/
It would be nice to have an example code for the secondary menu as we don't really know which css classes to keep/remove from the main EBI template example link (e.g. is leaf class needed for li elements?):