Difference between revisions of "Template:Navbox"

From Machina Main Cluster Official Wiki
Jump to: navigation, search
m (Reverted edits by CorruptedX (talk) to last revision by [[User:test>Porplemontage|test>Porplemontage]])
Tag: Rollback
Line 10: Line 10:
 
! style="border-left:2px solid #fdfdfd;width:100%;|<nowiki/>
 
! style="border-left:2px solid #fdfdfd;width:100%;|<nowiki/>
 
! style="}}{{{basestyle|}}};{{{titlestyle|}}}" colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} class="navbox-title {{#if:{{{titleclass|}}}|{{{titleclass}}}}}" {{!}} {{#if:{{#switch:{{{navbar|}}}|plain|off=1}} {{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}| {{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div class="nomobile navspace-big" style="float:right;width:6em">&nbsp;</div>}}| {{#ifeq:{{{state|}}}|plain||<div class="nomobile navspace-big" style="float:left;width:6em;text-align:left">&nbsp;</div>}}}}| <div class="nomobile navspace-big" style="float:left;width:6em;text-align:left"> {{Tnavbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}} </div>{{#ifeq:{{{state|}}}|plain|<div class="nomobile navspace-big" style="float:right;width:6em">&nbsp;</div>|<div class="nomobile navspace-small" style="float:right;width:2.35em">&nbsp;</div>}}}} <span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%"> {{{title}}}</span> }}<!--
 
! style="}}{{{basestyle|}}};{{{titlestyle|}}}" colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} class="navbox-title {{#if:{{{titleclass|}}}|{{{titleclass}}}}}" {{!}} {{#if:{{#switch:{{{navbar|}}}|plain|off=1}} {{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}| {{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div class="nomobile navspace-big" style="float:right;width:6em">&nbsp;</div>}}| {{#ifeq:{{{state|}}}|plain||<div class="nomobile navspace-big" style="float:left;width:6em;text-align:left">&nbsp;</div>}}}}| <div class="nomobile navspace-big" style="float:left;width:6em;text-align:left"> {{Tnavbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}} </div>{{#ifeq:{{{state|}}}|plain|<div class="nomobile navspace-big" style="float:right;width:6em">&nbsp;</div>|<div class="nomobile navspace-small" style="float:right;width:2.35em">&nbsp;</div>}}}} <span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%"> {{{title}}}</span> }}<!--
--- Above ---
+
 
-->{{#if:{{{above|}}}| {{#if:{{{title|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}-
 
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{above}}} }}<!--
 
--- First group/list and images ---
 
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}-<!--
 
-->{{#if:{{{imageleft|}}}|<nowiki/>
 
{{!}} style="width:0%;padding:0px 2px 0px 0px;{{{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/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group1style|}}}" {{!}} {{{group1}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}}">{{{list1|}}}</div><!--
 
-->{{#if:{{{image|}}}|<nowiki/>
 
{{!}} style="width:0%;padding:0px 0px 0px 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 ---
 
-->{{#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/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group{{#var:key}}|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group{{#var:key}}style|}}}" {{!}} {{{group{{#var:key}}}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list{{#var:key}}style|}}}" class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">{{#var:value}}}}</div>}}}}}}<!--
 
--- Below ---
 
-->{{#if:{{{below|}}}|<!--
 
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}-
 
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{below}}} }}
 
{{!}}}{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/>
 
 
{{!}}} }}</includeonly><noinclude>
 
{{!}}} }}</includeonly><noinclude>
 
== State usage ==
 
== State usage ==

Revision as of 23:58, 25 August 2021

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.
This Wiki contains NSFW content. All people mentioned are above the age of 18. By using this wiki you agree that you are of 18 years of age or over.