Template:Navbox: Difference between revisions
From Destinypedia, the Destiny wiki
No edit summary |
mNo edit summary |
||
(38 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/> | <includeonly>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/> | ||
{{{!}} class="navbox" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}" | {{{!}} class="navbox {{#if:{{{style|}}}||default}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}" | ||
{{!}}- | {{!}}- | ||
{{!}} style="padding:2px | {{!}} style="padding:2px" {{!}} }} | ||
{{{!}} cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=mw-collapsible mw- | {{{!}} cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|open|show=mw-collapsible|auto|autocollapse=mw-collapsible autocollapse|#default=mw-collapsible mw-collapsed}}}} {{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}}" <!-- | ||
--- Title and navbar --- | --- Title and navbar --- | ||
-->{{#if:{{{title|}}}|<nowiki/> | -->{{#if:{{{title|}}}|<nowiki/> | ||
{{!}}- {{#if:{{{titlegroup|}}}|<nowiki/> | {{!}}- {{#if:{{{titlegroup|}}}|<nowiki/> | ||
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}" {{!}} {{{titlegroup|}}} | {{!}} class="navbox-group {{#if:{{{groupstyle|}}}||default}}" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}" {{!}} {{{titlegroup|}}} | ||
! style="border-left:2px solid | ! style="border-left:2px solid transparent;width:100%;|<nowiki/> | ||
! style="}}{{{basestyle|}}};{{{titlestyle|}}}" colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} class="navbox-title {{#if:{{{ | ! style="}}{{{basestyle|}}};{{{titlestyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}}" class="navbox-title {{#if:{{{titlestyle|}}}||default}}" {{!}} {{#if:{{#switch:{{{navbar|}}}|plain|off=1}} {{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}| {{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div class="nophone navspace-big" style="width:6em;float:right"> </div>}}| {{#ifeq:{{{state|}}}|plain||<div class="nophone navspace-big" style="width:6em;float:left;text-align:left"> </div>}}}}| <div class="nophone navspace-big" style="width:6em;float:left;text-align:left;line-height:2.2"> {{tnavbar|{{{name}}}|mini=1}} </div>{{#ifeq:{{{state|}}}|plain|<div class="nophone navspace-big" style="width:6em;float:right"> </div>|<div class="nophone navspace-small" style="width:2.35em;float:right"> </div>}}}} <span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%"> {{{title}}}</span> }}<!-- | ||
--- Above --- | --- Above --- | ||
-->{{#if:{{{above|}}}| {{#if:{{{title|}}}|<nowiki/> | -->{{#if:{{{above|}}}| {{#if:{{{title|}}}|<nowiki/> | ||
{{!}}- style="height:2px | {{!}}- style="height:2px" | ||
{{!}} }} | {{!}} }} | ||
{{!}}- | {{!}}- | ||
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{above}}} }}<!-- | {{!}} class="navbox-abovebelow {{#if:{{{abovestyle|}}}||default}}" style="{{{basestyle|}}};{{{abovestyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{above}}} }}<!-- | ||
--- First group/list and images --- | --- First group/list and images --- | ||
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<nowiki/> | -->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<nowiki/> | ||
{{!}}- style="height:2px | {{!}}- style="height:2px" | ||
{{!}} }} | {{!}} }} | ||
{{!}}-<!-- | {{!}}-<!-- | ||
-->{{#if:{{{imageleft|}}}|<nowiki/> | -->{{#if:{{{imageleft|}}}|<nowiki/> | ||
{{!}} style="width:0%;padding: | {{!}} style="width:0%;padding:0 2px 0 0;{{{imageleftstyle|}}}" rowspan={{#expr:1{{#forargs:list|key|value|{{#ifeq:{{#expr:{{#len:{{#var:key}}}}<5}}|1|{{#ifeq:{{#var:key}}|1||{{#if:{{{list{{#var:key}}|}}}|+2}}}}}}}}}} {{!}} {{{imageleft|}}} }}<!-- | ||
-->{{#if:{{{group1|}}}|<nowiki/> | -->{{#if:{{{group1|}}}|<nowiki/> | ||
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group1style|}}}" {{!}} {{{group1}}} | {{!}} class="navbox-group {{#if:{{{groupstyle|}}}||default}}" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group1style|}}}" {{!}} <div style="padding:{{{group1padding|{{{grouppadding|1px 0 0}}}}}}">{{{group1}}}</div> | ||
{{!}} style="text-align:left;border-left:2px solid | {{!}} style="text-align:left;border-left:2px solid transparent;|<nowiki/> | ||
{{!}} colspan=2 style="}} width:100%;padding: | {{!}} colspan="2" style="}} width:100%;padding:0;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" class="navbox-list {{#if:{{{liststyle|}}}||default}} navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{list1padding|{{{listpadding|1px 3px 0}}}}}}"> | ||
{{{list1|}}}</div><!-- | |||
-->{{#if:{{{image|}}}|<nowiki/> | -->{{#if:{{{image|}}}|<nowiki/> | ||
{{!}} style="width:0%;padding: | {{!}} style="width:0%;padding:0 0 0 2px;{{{imagestyle|}}}" rowspan={{#expr:1{{#forargs:list|key|value|{{#ifeq:{{#expr:{{#len:{{#var:key}}}}<5}}|1|{{#ifeq:{{#var:key}}|1||{{#if:{{{list{{#var:key}}|}}}|+2}}}}}}}}}} {{!}} {{{image|}}} }} }}<!-- | ||
--- Remaining groups/lists --- | --- Remaining groups/lists --- | ||
-->{{#forargs:list|key|value|{{#ifeq:{{#expr:{{#len:{{#var:key}}}}<5}}|1|{{#ifeq:{{#var:key}}|1||{{#if:{{#var:value}}| {{#if:{{{title|}}}{{{above|}}}{{{list{{#expr:{{#var:key}}-1}}|}}}|<nowiki/> | -->{{#forargs:list|key|value|{{#ifeq:{{#expr:{{#len:{{#var:key}}}}<5}}|1|{{#ifeq:{{#var:key}}|1||{{#if:{{#var:value}}| {{#if:{{{title|}}}{{{above|}}}{{{list{{#expr:{{#var:key}}-1}}|}}}|<nowiki/> | ||
Line 34: | Line 35: | ||
{{!}} }} | {{!}} }} | ||
{{!}}- {{#if:{{{group{{#var:key}}|}}}|<nowiki/> | {{!}}- {{#if:{{{group{{#var:key}}|}}}|<nowiki/> | ||
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group{{#var:key}}style|}}}" {{!}} {{{group{{#var:key}}}}} | {{!}} class="navbox-group {{#if:{{{groupstyle|}}}||default}}" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group{{#var:key}}style|}}}" {{!}} <div style="padding:{{{grouppadding|1px 0 0}}}">{{{group{{#var:key}}}}}</div> | ||
{{!}} style="text-align:left;border-left:2px solid | {{!}} style="text-align:left;border-left:2px solid transparent;|<nowiki/> | ||
{{!}} colspan=2 style="}} width:100%;padding: | {{!}} colspan="2" style="}} width:100%;padding:0;{{{liststyle|}}};{{{evenstyle|}}};{{{list{{#var:key}}style|}}}" class="navbox-list {{#if:{{{liststyle|}}}||default}} navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|1px 3px 0}}}"> | ||
{{#var:value}}}}</div>}}}}}}<!-- | |||
--- Below --- | --- Below --- | ||
-->{{#if:{{{below|}}}|<!-- | -->{{#if:{{{below|}}}|<!-- | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<nowiki/> | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<nowiki/> | ||
{{!}}- style="height:2px | {{!}}- style="height:2px" | ||
{{!}} }} | {{!}} }} | ||
{{!}}- | {{!}}- | ||
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{below}}} }} | {{!}} class="navbox-abovebelow {{#if:{{{belowstyle|}}}||default}}" style="{{{basestyle|}}};{{{belowstyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{below}}} }} | ||
{{!}}}{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/> | {{!}}}{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/> | ||
{{!}}} }}<noinclude> | {{!}}} }}</includeonly><noinclude> | ||
== State usage == | == State usage == | ||
These are guidelines for the <code>state</code> parameter | These are guidelines for the <code>state</code> parameter: | ||
* | * <code>|state='''collapsed'''</code> - The table is collapsible and collapsed (default). | ||
* <code>|state=''' | * <code>|state='''open'''</code> - The table is collapsible and not collapsed. | ||
* <code>|state='''auto'''</code> - The table is collapsible and will collapse if multiple boxes are present. | |||
* <code>|state='''plain'''</code> - The table is not collapsible. | * <code>|state='''plain'''</code> - The table is not collapsible. | ||
[[Category:Parent templates]]</noinclude> | [[Category:Parent templates]]</noinclude> |
Latest revision as of 20:22, December 16, 2024
State usage
These are guidelines for the state
parameter:
|state=collapsed
- The table is collapsible and collapsed (default).|state=open
- The table is collapsible and not collapsed.|state=auto
- The table is collapsible and will collapse if multiple boxes are present.|state=plain
- The table is not collapsible.