Fandom Developers Wiki

This page, or parts of it, are still untranslated. Please translate it to the appropriate language (中文(简体)).

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:

  • 第1个参数是导航框的标题;
  • 第2、4、6……个参数是导航框的小标题;
  • 第3、5、7……个参数是导航框的内容;
    • 在导航框的内容中,叹号 ! 会被置换为圆点
  • theme parameter changes the theme class of the portable infobox creating the navbox.
  • 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参数:
    • 若参数没有值(或异于yesno),导航框将默认打开,且折叠按钮不存在;
    • 若参数为yes,导航框将默认折叠,且折叠按钮存在;
    • 若参数为no,导航框将默认展开,且折叠按钮存在。
  • 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...