The wiki is lacking in content. You can help by creating a new article. See the to do list for more ways you can help.

Difference between revisions of "Template:Tab"

From Final Fantasy Wiki
Jump to navigationJump to search
(new template)
 
(→‎Usage: Clarif)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="text-align:center">
<includeonly>{{#switch:{{{1|}}}
<div class="MPInterior" style="border-radius: 5px 5px 0px 0px;  float:left; width:17%; padding: 0.6em 0;font-weight:bold; background-color:#FFED70; border:2px solid black; border-bottom:0px; border-bottom:0; font-size:120%;">{{{1|{{PAGENAME}}}}}</div>
|o=<div class="tabber" {{#if:{{{2|}}}|style="width:{{{2}}}"}}>
{{#ifexist:Gallery:{{{1|{{PAGENAME}}}}}|<div style="float:left; width:16%; padding: 0.6em 0;">[[Gallery/Gallery:{{{1|{{PAGENAME}}}}}|Gallery]]}}
|o-info=<div class="tabber info" style="width:{{{2|250px}}}">
</div>
|o-char=<div class="tabber info" style="width:{{{2|360px}}}">
<div style="clear:both; width:100%; padding:0px; border:1px solid black; background-color:transparent">
|o-left=<div class="tabber goleft" {{#if:{{{2|}}}|style="width:{{{2}}}"}}>
</div>
|o-right=<div class="tabber goright" {{#if:{{{2|}}}|style="width:{{{2}}}"}}>
<noinclude>Template taken from Simpsons88 of [http://simpsonswiki.com/ Wikisimpsons] and redesigned.
|o-center=<div class="tabber gocenter" {{#if:{{{2|}}}|style="width:{{{2}}}"}}>
|c=</div>
|#default=<div class="tabbertab" title="{{{1|}}}" {{#if:{{{2|}}}|style="background:{{{2}}}"}}>
}}</includeonly><noinclude>
==Usage==
The original template is from the [[khwiki:Template:Tab|Kingdom Hearts Wiki]]. This template should only be used in the Stats, Bestiary, and other data-related sections of articles.
 
===Openers===
*'''<code><nowiki>{{tab|o}}</nowiki></code>''' - Used to create a general tab box that doesn't float, or any tab box contained within another tab box (whether it floats or not).
*'''<code><nowiki>{{tab|o-info}}</nowiki></code>''' - Used to create a tab box with special infobox treatment. Floats to the right with a default width of 250px.
**The width can be changed by adding an extra parameter, e.g. <code><nowiki>{{tab|o-info|360px}}</nowiki></code>. The infobox will automatically fill the width of the tab box.
*'''<code><nowiki>{{tab|o-char}}</nowiki></code>''' - Used to create a tab box with special infobox treatment. Floats to the right with a default width of 360px.
*'''<code><nowiki>{{tab|o-left}}</nowiki></code>''' - Used to create a tab box that floats to the left. If you don't want the page content to go next to the tab box, use <code><nowiki>{{tab|o}}</nowiki></code>.
*'''<code><nowiki>{{tab|o-right}}</nowiki></code>''' - Used to create a tab box that floats to the right.
*'''<code><nowiki>{{tab|o-center}}</nowiki></code>''' - Used to create a tab box centered on the page.
 
===Tabs===
*'''<code><nowiki>{{tab|Tab Name}}</nowiki></code>''' - Used to start a new tab, with the tab name as the first parameter.
**The tab's background color can changed with an optional second parameter, e.g. <code><nowiki>{{tab|Tab Name|grey}}</nowiki></code>.
 
===Closers===
*'''<code><nowiki>{{tab|c}}</nowiki></code>''' - Used to close each tab, as well as the entire tab box.
 
==Example==
{{tab|o-right}}
{{tab|Foo}}
{{tab|o}}
{{tab|bar}}
Lorem ipsum
{{tab|c}}
{{tab|test|yellow}}
Lorem ipsum
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|hello}}
Lorem ipsum
{{tab|c}}
{{tab|c}}
 
<pre>{{tab|o-right}}
{{tab|Foo}}
{{tab|o}}
{{tab|bar}}
Lorem ipsum
{{tab|c}}
{{tab|test|yellow}}
Lorem ipsum
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|hello}}
Lorem ipsum
{{tab|c}}
{{tab|c}}</pre>
 
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 14:30, February 3, 2022

Usage[edit]

The original template is from the Kingdom Hearts Wiki. This template should only be used in the Stats, Bestiary, and other data-related sections of articles.

Openers[edit]

  • {{tab|o}} - Used to create a general tab box that doesn't float, or any tab box contained within another tab box (whether it floats or not).
  • {{tab|o-info}} - Used to create a tab box with special infobox treatment. Floats to the right with a default width of 250px.
    • The width can be changed by adding an extra parameter, e.g. {{tab|o-info|360px}}. The infobox will automatically fill the width of the tab box.
  • {{tab|o-char}} - Used to create a tab box with special infobox treatment. Floats to the right with a default width of 360px.
  • {{tab|o-left}} - Used to create a tab box that floats to the left. If you don't want the page content to go next to the tab box, use {{tab|o}}.
  • {{tab|o-right}} - Used to create a tab box that floats to the right.
  • {{tab|o-center}} - Used to create a tab box centered on the page.

Tabs[edit]

  • {{tab|Tab Name}} - Used to start a new tab, with the tab name as the first parameter.
    • The tab's background color can changed with an optional second parameter, e.g. {{tab|Tab Name|grey}}.

Closers[edit]

  • {{tab|c}} - Used to close each tab, as well as the entire tab box.

Example[edit]

Lorem ipsum

Lorem ipsum

Lorem ipsum

{{tab|o-right}}
{{tab|Foo}}
{{tab|o}}
{{tab|bar}}
Lorem ipsum
{{tab|c}}
{{tab|test|yellow}}
Lorem ipsum
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|hello}}
Lorem ipsum
{{tab|c}}
{{tab|c}}