背包乱斗WIKI
wiki.17173.com/backpackbattles
首页
游戏介绍
物品列表
物品合成表
游戏机制
角色
版本改动
首页
游戏介绍
物品列表
物品合成表
游戏机制
角色
版本改动
查看“模板:Navbox/doc”的源代码
WIKI功能
阅读
查看源代码
查看历史
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面已被保护以防止编辑或其他操作。
您可以查看和复制此页面的源代码。
The following documentation is copied from [https://dev.fandom.com/wiki/Global%20Lua%20Modules/Navbox https://dev.fandom.com/wiki/Global_Lua_Modules/Navbox]. == Parameters == Here is a list of all supported parameters. * <sub>(n)</sub> should be replaced by any valid number. * <u>Underlined</u> values are defaults. All parameters are optional. === Main Parameters === ;template :Name of the template, used for VDE (view/discuss/edit) links. Will be passed directly to {{t|vdelinks}} ;border/''unnamed parameter 1'' :Can be used to control the border of the navbox. Currently only supports the value "child", making the navbox a child navbox of another one. ;title :The main title of the box. ;above :Used to add a row that appears above all image, header and data rows. ;header<sub>(n)</sub> :Used to add subheaders to the navbox. Headers are hidden by default unless there are any list rows under them. ;show<sub>(n)</sub> = yes/no :Use this parameter to force show/hide a section. The number should correspond to the number of the header that started the section. ;showall = yes :Use this to force show all sections. Can be overridden with individual <code>show<sub>(n)</sub></code> parameters. ;group<sub>(n)</sub> :Contains the group label for a row. If not present, the corresponding list will expand to fill the gap. ;list<sub>(n)</sub> :The actual list for the row. ;below :Used to add a row that appears below all header and data rows. === Images === The navbox supports 2 images (one left and one right). Both images support full syntax (<code><nowiki>[[File:Name.ext|...]]</nowiki></code>) and filename (<code>File:Name.ext</code>). In case of the former, the respective width and link parameters will be ignored. ;image :Specify an image for the right side ;imagewidth = <u>100px</u> :If you didn't use the full syntax, use this to specify the width of the image ;imagelink :You can use this to link the image to a certain page. ;imageleft :Specify an image for the left side ;imageleftwidth = <u>100px</u> :Width for the left image ;imageleftlink :Link for the left image === Style Parameters === ;alternaterows = <u>yes</u>/no/swap :You can optionally add this to disable alternating row styles. If set to <code>swap</code>, the odd rows will be the alternate rows; otherwise the even rows are. ;bodystyle ;bodyclass :Classes and styles to add to the navbox itself ;titlestyle ;titleclass :Classes and styles to add to the title ;abovestyle ;aboveclass :Classes and styles to add to the above row ;imagestyle ;imageclass :Classes and styles to add to the image ;imageleftstyle ;imageleftclass :Classes and styles to add to the left image ;rowclass :Classes to add to all list rows ;altrowclass = <u>alt</u> :Classes to add to list rows with alternating styles ;groupstyle ;groupclass :Classes and styles to add to the groups ;altgroupstyle ;altgroupclass :Classes and styles to add to the groups in alternate rows (if enabled) ;liststyle ;listclass :Classes and styles to add to the lists ;altliststyle ;altlistclass :Classes and styles to add to the lists in alternate rows (if enabled) ;belowstyle ;belowclass :Classes and styles to add to the below row === Collapsing === The Navbox supports two forms of collapsing: for the navbox itself and for individual subsections. ;state = collapsed/<u>expanded</u>/plain :This parameter controls the collapsing of the navbox itself. If set to <code>collapsed</code>, the box will be collapsed by default. If set to <code>expanded</code>, the box can be collapsed, but will be open by default. If set to <code>plain</code>, the box can not be collapsed and no Show/Hide link will show. ;state<sub>(n)</sub> = collapsed/expanded/plain :Used to control the collapsing of a single section. A section goes from one header to the next. The number should thus correspond to the one of the header that is above the section to collapse. Options are the same as above. ;defaultstate = collapsed/expanded/<u>plain</u> :Sets the default collapse state for the subsections only. Can still be overridden by individual <code>state<sub>(n)</sub></code> parameters. ;collapsetext = Hide ;expandtext = Show :Custom text for the toggle labels of the navbox itself. ;collapsetext<sub>(n)</sub> = Hide ;expandtext<sub>(n)</sub> = Show :Custom text for the toggle labels of a single section. ;defaultcollapsetext ;defaultexpandtext :Sets the default toggle labels. Can be overridden by individual parameters. ==Examples== ===Simple Example=== <pre>{{Navbox |title = A simple navbox |template = Navbox <!-- Used for V D E links --> |above = Text to appear on top |group1 = First Group |list1 = * This * Is * An * Example * List |list2 = Second list without group (centered) |group3 = Third group without list (not shown) |group99999 = 99999th Group |list99999 = Any number works |below = Text to appear on bottom }}</pre> {{Navbox |title = A simple navbox |template = Navbox |above = Text to appear on top |group1 = First Group |list1 = * This * Is * An * Example * List |list2 = Second List without group (centered) |group3 = Third Group without list (not shown) |group99999 = 99999th Group |list99999 = Any number works |below = Text to appear on bottom }} ===Headers Example=== <pre>{{Navbox |title = Navbox with subheaders |group1 = First Group |list1 = This list is before the first header |header2 = Header for section 2 |group2 = Second Group |list2 = Second List (part of section 2) |group3 = Third Group |list3 = Third List (also part of section 2) |header4 = Header with no lists (Not shown) |header5 = Another Header |list5 = Another list (part of section 5) |header6 = Another header with no lists (force shown) |show6 = yes |header7 = A header with a list that is force hidden |list7 = Not shown either |show7 = no }}</pre> {{Navbox |title = Navbox with subheaders |group1 = First Group |list1 = This list is before the first header |header2 = Header for section 2 |group2 = Second Group |list2 = Second List (part of section 2) |group3 = Third Group |list3 = Third List (also part of section 2) |header4 = Header with no lists (Not shown) |header5 = Another Header |list5 = Another list (part of section 5) |header6 = Another header with no lists (force shown) |show6 = yes |header7 = A header with a list that is force hidden |list7 = Not shown either |show7 = no }} ===Images Example=== <pre>{{Navbox |title = Navbox with images |group1 = First Group |list1 = First List |header2 = Some Header |list2 = Some List |image = File:Example.jpg |imagewidth = 60px |imagelink = w: |imageleft = [[File:Example.jpg|50px]] |below = Below goes below images too }}</pre> {{Navbox |title = Navbox with images |group1 = First Group |list1 = First List |header2 = Some Header |list2 = Some List |image = File:Example.jpg |imagewidth = 60px |imagelink = w: |imageleft = [[File:Example.jpg|50px]] |below = Below goes below images too }} ===Collapsing Example=== <pre>{{Navbox |title = Navbox with collapsing |state = collapsed |header1 = First Header (Plain) |group1 = First Group |list1 = This list is before the first header |group2 = Second Group |list2 = Second List |header3 = Second Header (Expanded) |state3 = expanded |group3 = Third Group |list3 = Third List |group4 = Fourth Group |list4 = Fourth List |header5 = Third Header (Collapsed) |state5 = collapsed |group5 = Fifth Group |list5 = Fifth List |group6 = Sixth Group |list6 = Sixth List }}</pre> {{Navbox |title = Navbox with collapsing |state = collapsed |header1 = First Header (Plain) |group1 = First Group |list1 = This list is before the first header |group2 = Second Group |list2 = Second List |header3 = Second Header (Expanded) |state3 = expanded |group3 = Third Group |list3 = Third List |group4 = Fourth Group |list4 = Fourth List |header5 = Third Header (Collapsed) |state5 = collapsed |group5 = Fifth Group |list5 = Fifth List |group6 = Sixth Group |list6 = Sixth List }} ===Custom Styles Example=== Example using wikipedia style colors. The values represent CSS classes. Note: It is recommended to use the classes over the styles if possible. To view/edit the default styles, see [[MediaWiki:Common.css]] <pre>{{Navbox |title = .navbox-title |above = .navbox-above |header1 = .navbox-header |group1 = .navbox-row-group |list1 = .navbox-row-list |group2 = .alt .navbox-row-group |list2 = .alt .navbox-row-list |list3 = .navbox-list.no-group |below = .navbox-below |bodystyle = background: #fdfdfd; color: black; border: 1px solid #aaa; padding: 3px |titlestyle = background: #ccf; color: black |abovestyle = background: #ddf; color: black |headerstyle = background: #ddf; color: black |groupstyle = background: #ddf; border-right: 2px solid white; color: black; text-align: right; padding-right: 1em |liststyle = background: transparent; color: black |altliststyle = background: #f7f7f7; color: black |belowstyle = background: #ddf; color: black }}</pre> {{Navbox |title = .navbox-title |above = .navbox-above |header1 = .navbox-header |group1 = .navbox-group |list1 = .navbox-list |group2 = .alt .navbox-group |list2 = .alt .navbox-list |list3 = .navbox-list.no-group |below = .navbox-below |bodystyle = background: #fdfdfd; color: black; border: 1px solid #aaa; padding: 3px |titlestyle = background: #ccf; color: black |abovestyle = background: #ddf; color: black |headerstyle = background: #ddf; color: black |groupstyle = background: #ddf; border-right: 2px solid white; color: black; text-align: right; padding-right: 1em |liststyle = background: transparent; color: black |altliststyle = background: #f7f7f7; color: black |belowstyle = background: #ddf; color: black }} ===Subgroups Example=== <pre>{{Navbox |title = Navbox with subgroups |group1 = Normal group |list1 = Normal list |group2 = Subgrouped |list2 = {{Navbox|child |group1 = First subgroup |list1 = List goes here |group2 = Second... |list2 = Another list |group3 = Subgrouped |list3 = {{Navbox|child |group1 = Another subgroup |list1 = List here }} |image = [[File:Example.jpg|48px]] <!-- An image for this group --> |alternaterows = swap <!-- Makes box start with an alt row --> }} }}</pre> {{Navbox |title = Navbox with subgroups |group1 = Normal group |list1 = Normal list |group2 = Subgrouped |list2 = {{Navbox|child |group1 = First subgroup |list1 = List goes here |group2 = Second... |list2 = Another list |group3 = Subgrouped |list3 = {{Navbox|child |group1 = First subgroup |list1 = List here }} |image = [[File:Example.jpg|48px]] |alternaterows = swap }} }} <noinclude>[[Category:Template documentation]]</noinclude>
本页使用的模板:
模板:Navbox
(
查看源代码
)(受保护)
模板:T
(
查看源代码
)(受保护)
模板:Vdelinks
(
查看源代码
)(受保护)
模块:Navbox
(
查看源代码
)(受保护)
返回
模板:Navbox/doc
。