Fandom Developers Wiki
Advertisement

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.

Installation

Lua installation

CSS installation

Parameters

Parameters to {{PortableNavbox}} 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)

{{PortableNavbox
| Scripts by category
| Discord integration
| [[DiscordIntegrator]] ! [[DiscordModule]] ! [[DiscordChat]]
| Countervandalism
| [[WHAM]] ! [[Nuke]] ! [[Rollback]] ! [[SOAPReport]]
}}

gives...

Expanded navbox (Collapsible)

Opened by Default

{{PortableNavbox
| collapse = no
| Scripts by category
| Discord integration
| [[DiscordIntegrator]] ! [[DiscordModule]] ! [[DiscordChat]]
| Countervandalism
| [[WHAM]] ! [[Nuke]] ! [[Rollback]] ! [[SOAPReport]]
}}

gives...

Closed by Default

{{PortableNavbox
| collapse = yes
| Scripts by category
| Discord integration
| [[DiscordIntegrator]] ! [[DiscordModule]] ! [[DiscordChat]]
| Countervandalism
| [[WHAM]] ! [[Nuke]] ! [[Rollback]] ! [[SOAPReport]]
}}

gives...

Stacked

{{PortableNavbox
| stacked = yes
| Scripts by category
| Discord integration
| [[DiscordIntegrator]] ! [[DiscordModule]] ! [[DiscordChat]]
| Countervandalism
| [[WHAM]] ! [[Nuke]] ! [[Rollback]] ! [[SOAPReport]]
}}

gives...

Custom color

{{PortableNavbox
| header-background = #69f
| header-text = rgb(0,0,0)
| Scripts by category
| Discord integration
| [[DiscordIntegrator]] ! [[DiscordModule]] ! [[DiscordChat]]
| Countervandalism
| [[WHAM]] ! [[Nuke]] ! [[Rollback]] ! [[SOAPReport]]
}}

gives...


Text above can be found here (edit)
Advertisement