Template:Tab/doc: Difference between revisions

From Tears of Themis Wiki
imported>Elaeagnifolia
m (1 revision imported)
imported>Elaeagnifolia
No edit summary
Line 1: Line 1:
{{doc/start}}
{{doc/start}}
* No History Tab template created by [https://feheroes.gamepedia.com/User:Endilyn Endilyn] of the [https://feheroes.gamepedia.com/Main_Page FEH Wiki]. Original Template located here: [https://feheroes.gamepedia.com/Template:Tab Template:Tab]
{{Notice|No History Tab template created by [https://feheroes.gamepedia.com/User:Endilyn Endilyn] of the [https://feheroes.gamepedia.com/Main_Page FEH Wiki]. Original Template located here: [https://feheroes.gamepedia.com/Template:Tab Template:Tab]}}
==Boilerplate==
==Boilerplate==
<pre>{{tab/start}}<!--
<pre>{{tab/start}}<!--
Line 9: Line 9:
-->{{tab/end}}</pre>
-->{{tab/end}}</pre>
==Usage==
==Usage==
<div style="background-color:#fff;border:2px black dotted;padding:1em;>
<pre>
<pre>
{{tab/start}}
{{tab/start}}
Line 25: Line 24:
tab content 2
tab content 2
{{tab/end}}
{{tab/end}}
=== Styling tabs ===
{{Tlx|tab/start}} may optionally have inline styles applied to it:<pre>{{tab/start|style=<!-- CSS here -->}}</pre> which will show on both the JavaScript and non-Javascript versions.
{{Tlx|tab/start}} may optionally have inline styles applied to it:<pre>{{tab/start|style=<!-- CSS here -->}}</pre> which will show on both the JavaScript and non-Javascript versions.
<pre>
<pre>
Line 40: Line 41:
tab content 2
tab content 2
{{tab/end}}
{{tab/end}}
=== Setting a default tab ===
By default the first tab will be selected. To override that behavior and select a different tab, the # of the tab to be selected can be passed to {{Tlx|tab/start}} through the 'default' parameter:
<pre>
{{tab/start|default=2}}
{{tab/header|tab name 1}}
tab content 1
{{tab/header|tab name 2}}
tab content 2
{{tab/end}}
</pre>
{{tab/start|default=2}}
{{tab/header|tab name 1}}
tab content 1
{{tab/header|tab name 2}}
tab content 2
{{tab/end}}
=== Nesting tabs ===
Tabs can be nested.
Tabs can be nested.
<pre>{{tab/start}}
<pre>{{tab/start}}
Line 71: Line 91:
tab content 4
tab content 4
{{tab/end}}
{{tab/end}}
{{tab/end}}</div>
{{tab/end}}
{{doc/end}}
{{doc/end}}

Revision as of 20:19, 30 December 2021

Template-info.png Documentation

Template:Notice

Boilerplate

{{tab/start}}<!--
-->{{tab/header|}}<!--
--><!--
-->{{tab/header|}}<!--
--><!--
-->{{tab/end}}

Usage

{{tab/start}}
{{tab/header|tab name 1}}
tab content 1
{{tab/header|tab name 2}}
tab content 2
<!-- as many tabs as needed can be added -->
{{tab/end}}
tab name 1

tab content 1

tab name 2

tab content 2

Styling tabs

{{tab/start}} may optionally have inline styles applied to it:
{{tab/start|style=<!-- CSS here -->}}
which will show on both the JavaScript and non-Javascript versions.
{{tab/start|style=width:50%;}}
{{tab/header|tab name 1}}
tab content 1
{{tab/header|tab name 2}}
tab content 2
{{tab/end}}
tab name 1

tab content 1

tab name 2

tab content 2

Setting a default tab

By default the first tab will be selected. To override that behavior and select a different tab, the # of the tab to be selected can be passed to {{tab/start}} through the 'default' parameter:

{{tab/start|default=2}}
{{tab/header|tab name 1}}
tab content 1
{{tab/header|tab name 2}}
tab content 2
{{tab/end}}
tab name 1

tab content 1

tab name 2

tab content 2

Nesting tabs

Tabs can be nested.

{{tab/start}}
{{tab/header|tab name 1}}
{{tab/start}}
{{tab/header|nested tab name 1}}
tab content 1
{{tab/header|nested tab name 2}}
tab content 2
{{tab/end}}
{{tab/header|tab name 2}}
{{tab/start}}
{{tab/header|nested tab name 1}}
tab content 3
{{tab/header|nested tab name 2}}
tab content 4
{{tab/end}}
{{tab/end}}
tab name 1
nested tab name 1

tab content 1

nested tab name 2

tab content 2

tab name 2
nested tab name 1

tab content 3

nested tab name 2

tab content 4

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.