Global Lua Modules/PortableNavbox

PortableNavbox is a module for creating simple navigation boxes using portable infobox markup.
Warning: Portable Infoboxes will jump to the top of the FandomMobile view if there is no other primary portable infobox.
== ==
== ==
Parameters to are as follows:
* First parameter is the title of the navbox.
* Even-numbered parameters are titles of the navbox sections.
* Odd-numbered parameters (except for first parameter) are contents of the navbox sections.
** Navbox section contents get ! characters in them replaced by • .
* theme parameter changes the theme class of the portable infobox creating the navbox. If not specified, the navbox has the class pi-theme-navbox by default.
* type parameter changes the type class of the portable navbox.
* header-background and header-text parameters change the colors of the navbox's headers. Currently has support for Hex, RGB and HSL color codes.
** Due to how portable infobox works, transparency from the colors (in RGBA or HSLA color codes) will be stripped off. Using names for colors ("red", "silver", "azure",...) also does not work. In these cases, use CSS to stylize the navbox instead.
* collapse parameter:
** For no option: The navbox will be opened and collapsible.
** For yes option: The navbox will be collapsed and collapsible.
** If this parameter is skipped (either yes or no), the navbox will be opened permanently and NOT to be collapsible.
* stacked parameter, when set to yes, has the same effect as layout="stacked" would on portable infoboxes.
== Sample usage ==
=== Simple navbox (Uncollapsible) ===
gives...
=== Expanded navbox (Collapsible) ===
==== Opened by Default ====
gives...
==== Closed by Default ====
gives...
==== Stacked ====
gives...
==== Custom color ====
gives...