通过 Sulfur.wiki 可快速访问本维基!
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~
编辑帮助:目录 • BWIKI反馈留言板
通过 Sulfur.wiki 可快速访问本维基!
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~
模板:Navbox
This template is designed to set up navigational templates relatively quickly with one or more lists of links. We highly recommend using this template for standardizing navigational templates and ease of use, especially for mobile devices.
See the support wiki for more information, including installation steps and further examples.
Basic example
The following example demonstrates the core functionality of this template: the title text, one standard link group, and one link group that contains two sub-groups. The rows are striped for easier readability.
{{Navbox
| title = Items
| striped = even
| group1 = Consumables
| list1 =
* Health Potion
* Mana Potion
| group2 = Weapons
| group2.1 = Swords
| list2.1 =
* Wooden Sword
* Rusted Sword
* Steel Sword
| group2.2 = Bows
| list2.2 =
* Shortbow
* Crossbow
* Longbow
}}
Parameters
Main
The following parameters modify the navbox as a whole.
Parameter | Description |
---|---|
title
|
Text that appears at the top of the navbox. |
state collapsible
|
Controls if a navbox should be expanded or collapsed when the page loads. This only affects the whole navbox; if sections are used, they are treated differently.
Advanced users can modify this on a page-by-page basis; see § Snippets. |
editlinks
|
Controls if an edit icon should be displayed at the top-left of the navbox, making it easier for users to interact with the template itself.
|
above
|
Text that appears above all list groups, directly below the title. |
below
|
Text that appears below all list groups, at the bottom of the navbox. |
striped evenodd
|
Controls if the navbox rows should have zebra striping on even or odd rows, making it easier for users to distinguish two rows apart from each other. If sections are used, each section resets the even/odd counter.
|
Sections
The following parameters define sections within the navbox with their own titles.
Parameter | Description |
---|---|
headern
|
Text that appears at the top of the section, where n is any positive integer. If the value is set to two or more - (e.g. -- , ----- , etc.) the new section will have no header bar and cannot be collapsed.
All groups and lists that are n or higher will appear in this section unless there is a higher |
header_state staten
|
header_state controls if all sections, by default, should be expanded or collapsed when the page loads.
Advanced users can modify these on a page-by-page basis; see § Snippets. Both parameters have no effect on sections with headers set to two or more |
List groups
The following parameters define the list groups.
Parameter | Description |
---|---|
groupn
|
Text label for a list, which appears on the left on desktop or at the top on mobile, where n is any positive integer.
This parameter is optional; if a |
listn
|
A wikitext list, where n is any positive integer. |
groupn.x groupn.x.y etc. |
Text label for sub-lists that appear under groupn , groupn.x , etc.
|
listn.x listn.x.y etc. |
Wikitext sub-lists. |
Styling
The following parameters add inline styling or your custom CSS classes to specific elements of the navbox.
To assist with text alignment, three default classes are available: align-left
, align-center
, and align-right
.
In addition, two more default classes
Parameter | Description |
---|---|
navbox_style navbox_class
|
Modifies the parent navbox element; class can be used as a shorthand for navbox_class
Two default classes are available:
|
title_style title_class
|
Modifies the title bar |
above_style above_class
|
Modifies the above text row
|
below_style below_class
|
Modifies the below text row
|
header_style header_class
|
Modifies all section headers (not the title bar) |
headern_style headern_class
|
Modifies the specific section header n |
sectionn_style sectionn_class
|
Modifies the container holding the section defined by a matching headern
|
group_style group_class
|
Modifies all base groups (groupn ), but not any subgroups (groupn.x , etc.)
|
subgroup_style subgroup_class
|
Modifies all subgroups at all levels (groupn.x , groupn.x.y , etc.)
|
groupA_style groupA_class
|
Modifies the specific group A, where A is any n, n.x, n.x.y, etc. |
list_style list_class
|
Modifies all lists. Note, in this context, "list" refers to the container of a listn parameter, not a ul or ol element inside the parameter
|
listA_style listA_class
|
Modifies the specific list A, where A is any n, n.x, n.x.y, etc. |
所有模板列表