Template:Tabber: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
No edit summary
mNo edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div class="tabber {{#if:{{{align|}}}|go{{{align}}}}}" style="{{#if:{{{width|}}}|width:{{{width}}}}}">
<includeonly><div class="tabber {{#if:{{{align|}}}|go{{{align}}}}}" {{#if:{{{width|}}}|style="width:{{{width}}}"}}>{{#forargs:title|key|value|<div class="tabbertab" title="{{#var:value}}" {{#if:{{{height|}}}|style="height:{{{height}}}"}}>
{{#if:{{{tab1|}}}|<div class="tabbertab" title="{{{title1}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{content{{#var:key}}}}}</div>}}</div><templatestyles src="Tabber/styles.css"/></includeonly><noinclude>
{{{tab1}}}
Used for inserting a tab box containing any number of content tabs.
</div>}}{{#if:{{{tab2|}}}|
<div class="tabbertab" title="{{{title2}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab2}}}
</div>}}{{#if:{{{tab3|}}}|
<div class="tabbertab" title="{{{title3}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab3}}}
</div>}}{{#if:{{{tab4|}}}|
<div class="tabbertab" title="{{{title4}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab4}}}
</div>}}{{#if:{{{tab5|}}}|
<div class="tabbertab" title="{{{title5}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab5}}}
</div>}}{{#if:{{{tab6|}}}|
<div class="tabbertab" title="{{{title6}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab6}}}
</div>}}{{#if:{{{tab7|}}}|
<div class="tabbertab" title="{{{title7}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab7}}}
</div>}}{{#if:{{{tab8|}}}|
<div class="tabbertab" title="{{{title8}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab8}}}
</div>}}{{#if:{{{tab9|}}}|
<div class="tabbertab" title="{{{title9}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab9}}}
</div>}}{{#if:{{{tab10|}}}|
<div class="tabbertab" title="{{{title10}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab10}}}
</div>}}{{#if:{{{tab11|}}}|
<div class="tabbertab" title="{{{title11}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab11}}}
</div>}}{{#if:{{{tab12|}}}|
<div class="tabbertab" title="{{{title12}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab12}}}
</div>}}{{#if:{{{tab13|}}}|
<div class="tabbertab" title="{{{title13}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab13}}}
</div>}}{{#if:{{{tab14|}}}|
<div class="tabbertab" title="{{{title14}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab14}}}
</div>}}{{#if:{{{tab15|}}}|
<div class="tabbertab" title="{{{title15}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab15}}}
</div>}}{{#if:{{{tab16|}}}|
<div class="tabbertab" title="{{{title16}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab16}}}
</div>}}{{#if:{{{tab17|}}}|
<div class="tabbertab" title="{{{title17}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab17}}}
</div>}}{{#if:{{{tab18|}}}|
<div class="tabbertab" title="{{{title18}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab18}}}
</div>}}{{#if:{{{tab19|}}}|
<div class="tabbertab" title="{{{title19}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab19}}}
</div>}}{{#if:{{{tab20|}}}|
<div class="tabbertab" title="{{{title20}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab20}}}
</div>}}{{#if:{{{tab21|}}}|
<div class="tabbertab" title="{{{title21}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab21}}}
</div>}}{{#if:{{{tab22|}}}|
<div class="tabbertab" title="{{{title22}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab22}}}
</div>}}{{#if:{{{tab23|}}}|
<div class="tabbertab" title="{{{title23}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab23}}}
</div>}}{{#if:{{{tab24|}}}|
<div class="tabbertab" title="{{{title24}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab24}}}
</div>}}{{#if:{{{tab25|}}}|
<div class="tabbertab" title="{{{title25}}}" style="{{#if:{{{height|}}}|height:{{{height}}}}}">
{{{tab25}}}
</div>}}
</div></includeonly><noinclude>
Used for inserting a tab box containing up to 25 content tabs.


When used in an infobox, it's generally recommended to set all images to the same width to keep the tab box a constant width when switching between tabs:
== Usage ==
'''Optional parameters''' (not needed in most cases): <code>align</code> (left/right/center), <code>width</code>, <code>height</code>.


<pre>{{tabber|title1=Tab 1|tab1=[[File:Image 1.png|250px]]|title2=Tab 2|tab2=[[File:Image 2.png|250px]]}}</pre>
=== Infoboxes ===
When used in an infobox, downscaled images should be set to the same width. For example:


If some of the images are narrower than the rest, it's possible to set the overall tab box width so its size doesn't change:
<pre>{{tabber|title1=Tab 1|content1=[[File:Image 1.png|250px]]|title2=Tab 2|content2=[[File:Image 2.png|250px]]}}</pre>
 
<pre>{{tabber|width=265px|title1=Tab 1|tab1=[[File:Image 1.png|250px]]|title2=Tab 2|tab2=[[File:Image 2.png|175px]]}}</pre>
 
Set the overall tab box width 15px higher than the width of the widest image.


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 14:12, December 4, 2023

Used for inserting a tab box containing any number of content tabs.

Usage

Optional parameters (not needed in most cases): align (left/right/center), width, height.

Infoboxes

When used in an infobox, downscaled images should be set to the same width. For example:

{{tabber|title1=Tab 1|content1=[[File:Image 1.png|250px]]|title2=Tab 2|content2=[[File:Image 2.png|250px]]}}