Template:Tab: Difference between revisions

From Equestripedia, the Archives of Equestria!
Content added Content deleted
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
<div style="min-width:{{{minwidth|5.0}}}em; max-width:{{{maxwidth|12}}}em; float:left; border:2px solid #4D4180; margin-bottom:-2px; margin-right: 1px; background: #EAD5FC; border-radius:6px 6px 0 0; -moz-border-radius:6px 6px 0 0; padding: 3px">
<div style="min-width:{{{minwidth|5.0}}}em; max-width:{{{maxwidth|12}}}em; float:left; border:2px solid #4D4180; margin-bottom:-2px; margin-right: 1px; background: #EAD5FC; border-radius:6px 6px 0 0; -moz-border-radius:6px 6px 0 0; padding: 3px">
<table style="height:100%;width:100%;"><tr>
<table style="height:100%;width:100%;"><tr>
<td style="vertical-align:center;">{{{1}}}</td></tr></table></div>
<td style="vertical-align:center;">{{{tab 1}}}</td></tr></table></div>
|
|
<div style="min-width:{{{minwidth|5.0}}}em; max-width:{{{maxwidth|12}}}em; float:left; border:2px solid #4D4180; margin-bottom:-2px; margin-right: 1px; background: #EAD5FC; border-radius:6px 6px 0 0; -moz-border-radius:6px 6px 0 0; padding: 3px">
<div style="min-width:{{{minwidth|5.0}}}em; max-width:{{{maxwidth|12}}}em; float:left; border:2px solid #4D4180; margin-bottom:-2px; margin-right: 1px; background: #EAD5FC; border-radius:6px 6px 0 0; -moz-border-radius:6px 6px 0 0; padding: 3px">
<table style="height:100%;width:100%;"><tr>
<table style="height:100%;width:100%;"><tr>
<td style="vertical-align:center;">{{{Base page|[[{{NAMESPACE}}:{{BASEPAGENAME}}{{!}}{{{tab 1}}}]]}}}</td>
<td style="vertical-align:center;">{{{base page|[[{{NAMESPACE}}:{{BASEPAGENAME}}{{!}}{{{tab 1}}}]]}}}</td>
</tr></table></div>
</tr></table></div>
}}{{#if:{{{tab 2| }}}|
}}{{#if:{{{tab 2| }}}|

Latest revision as of 15:04, 25 February 2020

{{{tab 1}}}

Description

This template can be used as it is to display tabs in the subpages of an article, but it's recommended to create another template to easily modify it if necessary.

Syntax
{{Tab|tab1=Main page|tab2=Gallery}}
Parameters

All parameters, except tab1, are optional.
minwidth - min. width of tabs, in em; default: 5.0em;
maxwidth - max. width of tabs, in em; default: 12.0em;
tab1 - an arbitrary title of the first tab;
tab2 - title of the second tab; it must correspond to the part after "/" of the name of the page, to which it links
tab3, tab4, tab5, tab6, tab7, tab8, tab9 - like tab2
title2 - the title you want to display in the tab. title3, title4, title5, title6, title7, title8, title9 - like title2