Template:Tab: Difference between revisions

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
(I think these are deprecated?)
m (Changed protection level for "Template:Tab": High traffic page ([Edit=Allow only KHWiki staff] (indefinite) [Move=Allow only KHWiki staff] (indefinite)))
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}
<includeonly>{{#switch:{{{1|}}}
|game-o=<div class="tabber goright" title="Game" style="width:{{{2|auto}}};">
|o=<div class="tabber" style="{{#if:{{{2|}}}|width:{{{2}}}}};{{#if:{{{3|}}}|max-width:{{{3}}}}}">
|o=<div class="tabber goright" title="Game" style="width:{{{2|auto}}};">
|o-info=<div class="tabber info" style="width:{{{2|250px}}}">
|o-char=<div class="tabber info" style="width:{{{2|360px}}}">
|o-left=<div class="tabber goleft" style="{{#if:{{{2|}}}|width:{{{2}}}}};{{#if:{{{3|}}}|max-width:{{{3}}}}}">
|o-right=<div class="tabber goright" style="{{#if:{{{2|}}}|width:{{{2}}}}};{{#if:{{{3|}}}|max-width:{{{3}}}}}">
|o-center=<div class="tabber gocenter" style="{{#if:{{{2|}}}|width:{{{2}}}}};{{#if:{{{3|}}}|max-width:{{{3}}}}}">
|c=</div>
|c=</div>
|#default=<div class="tabbertab" title="{{{1|}}}">
|#default=<div class="tabbertab" title="{{{1|}}}" style="{{#if:{{{2|}}}|background:{{{2}}}}}">
}}</includeonly><noinclude>
}}</includeonly><noinclude>
==Usage==
==Usage==
{{tab|game-o}}
===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. Default width for [[Template:Character]].
*'''<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|Elder Sign}}
{{tab|Elder Sign}}
{{tab|set-o}}
{{tab|o}}
{{tab|Core Set}}
{{tab|Core Set}}
Elder Sign: Core Set
Elder Sign: Core Set
{{tab|c}}
{{tab|c}}
{{tab|Unseen Forces}}
{{tab|Unseen Forces|yellow}}
Elder Sign: Unseen Forces
Elder Sign: Unseen Forces
{{tab|c}}
{{tab|c}}
Line 21: Line 42:
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|c}}
<pre>{{tab|o-right}}
{{tab|Elder Sign}}
{{tab|o}}
{{tab|Core Set}}
Elder Sign: Core Set
{{tab|c}}
{{tab|Unseen Forces|yellow}}
Elder Sign: Unseen Forces
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|Call of Cthulhu}}
Call of Cthulhu
{{tab|c}}
{{tab|c}}</pre>


[[Category:Utility templates]]</noinclude>
[[Category:Utility templates]]</noinclude>

Latest revision as of 21:53, 30 October 2022

Usage

Openers

  • {{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. Default width for Template:Character.
  • {{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

  • {{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

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

Example

Elder Sign: Core Set

Elder Sign: Unseen Forces

Call of Cthulhu

{{tab|o-right}}
{{tab|Elder Sign}}
{{tab|o}}
{{tab|Core Set}}
Elder Sign: Core Set
{{tab|c}}
{{tab|Unseen Forces|yellow}}
Elder Sign: Unseen Forces
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|Call of Cthulhu}}
Call of Cthulhu
{{tab|c}}
{{tab|c}}