Closed Android63 closed 6 years ago
If a submenu panel exists, it takes up 3/4 of the page, leaving 1/4 for the submenu items which are themselves split into 2 columns.
If there is no subpanel, the submenu columns take up the full page width.
The submenu items are distributed evenly across the 2 columns based on the number of items. The algorithm for this can cope with a different number of columns so that if, for example, it was decided that full width submenus should have 3 or 4 columns, that will be a simple change.
With submenu panel:
Without panel:
@cehwitham could you take a look at this when you get a chance please?
Markup is now clean and we can now add primary and secondary buttons as shown in this screenshot:
I have updated the wiki to reflect these changes.
@cehwitham could you please review?
I can confirm that valid HTML is generated under the following conditions:
The only way I was able to break this was by having panel elements (such as description, buttons, etc.) without a panel header. This breaks the layout because the header is used to open the panel and so, without it, it doesn't get closed and the elements that should be in it are left stranded.
Fix error when subnav lacks a panel.
Now, when a subnav has a panel, it looks like this:
And without a panel, it looks like this: