Difference between revisions of "Template:Tabs"

From EncyclopAtys

Jump to: navigation, search
 
(14 intermediate revisions by 3 users not shown)
Line 19: Line 19:
  
 
  --></table><!--
 
  --></table><!--
  --><div style="border:{{{bord|solid 2px #A3B1BF}}}; padding: .5em 1em 1em 1em; border-top: none; background-color:{{{bg_frame|transparent}}}; color:#000;zoom: 1"><!--
+
  --><div style="border:{{{bord|solid 2px #{{ColorAtys|type=fg|group=Amber}} }}}; padding: 0em; border-top: none; background-color:{{{bg_frame|transparent}}}; color:#000;zoom: 1;overflow: hidden;"><!--
 
   --><div style="padding:1ex; "><!--
 
   --><div style="padding:1ex; "><!--
  
Line 28: Line 28:
 
|align_tab=center
 
|align_tab=center
  
|Tab-1={{3DText|text='''Tab#1: the Tabs Template'''}}
+
|Tab-1={{3DText|text='''Tab#1: the Tabs Template<br />It is the ''active''  tab'''}}
 
|URL-1=Template:Tabs  
 
|URL-1=Template:Tabs  
 
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}
 
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}
 
|Pic-1=dummy.png  
 
|Pic-1=dummy.png  
  
|Tab-2={{3DText|text='''''Tab#2 the Tab Template'''''}}
+
|Tab-2={{3DText|text='''''Tab#2: the Tab Template'''''<br />This tab is ''inactive''}}
 
|URL-2=Template:Tab
 
|URL-2=Template:Tab
 
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
 
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
Line 41: Line 41:
 
|EN=Template:Tabs
 
|EN=Template:Tabs
 
|ES=Plantilla:Tabs
 
|ES=Plantilla:Tabs
|FR=Modèle:Début des onglets
+
|FR=Modèle:Tabs
 
|RU=Шаблон:Tabs
 
|RU=Шаблон:Tabs
}}[[Category:Tab]]
+
}}
<br />
+
<!-- {| class="wikitable" style="margin: auto; width: 100%; background-color:transparent; text-align:center;font: bold 2em serif;;"
<br />
+
|-
:This template is designed to assemble a set of tabs such as the ones on this same page. Lets explain how it works on this example. It uses the [[:Template:Tab|Tab "sub"-template]].  
+
| <span style="font: bold 2em serif; color: crimson;">↑</span> This is Tab#1 <span style="font: bold 2em serif; color: crimson;">↑</span> || <span style="font: bold 2em serif; color: crimson;">↑</span> This is Tab#2 <span style="font: bold 2em serif; color: crimson;">↑</span>
 +
|} -->
 +
:This template is designed to assemble a set of tabs (10 max) such as the ones on this same page. Lets explain how it works on this example. It uses the [[:Template:Tab|Tab "sub"-template]].  
 +
 
 
==Tabs code==
 
==Tabs code==
 
<syntaxhighlight lang="xml"> {{Tabs
 
<syntaxhighlight lang="xml"> {{Tabs
Line 54: Line 57:
 
|align_tab=center
 
|align_tab=center
 
<!--  -->
 
<!--  -->
|Tab-1={{3DText|text='''Tab#1 the Tabs Template'''}}  
+
|Tab-1={{3DText|text='''Tab#1 the Tabs Template<br />It is the ''active''  tab'''}}  
 
|URL-1=Template:Tabs  
 
|URL-1=Template:Tabs  
 
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}
 
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}
 
|Pic-1=dummy.png  
 
|Pic-1=dummy.png  
 
<!--  -->
 
<!--  -->
|Tab-2={{3DText|text='''''Tab#2 the Tab Template'''''}}
+
|Tab-2={{3DText|text='''''Tab#2: the Tab Template'''''<br />This tab is ''inactive''}}
 
|URL-2=Template:Tab
 
|URL-2=Template:Tab
 
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
 
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
 
|Pic-2=UnderConstruction.png
 
|Pic-2=UnderConstruction.png
 
}}</syntaxhighlight>
 
}}</syntaxhighlight>
 +
 +
==Detailed code==
 
{| class="wikitable"
 
{| class="wikitable"
 
|+Code explained style="font: italic 1em serif; color:#e76700; "|'''Code explained'''  
 
|+Code explained style="font: italic 1em serif; color:#e76700; "|'''Code explained'''  
Line 79: Line 84:
 
| <code><nowiki>|align_tab=center</nowiki></code> || text alignment of tab names  
 
| <code><nowiki>|align_tab=center</nowiki></code> || text alignment of tab names  
 
|-
 
|-
| <code><nowiki><!--  --></nowiki></code> || separator || to make the code easier to read
+
| <code><nowiki><!--  --></nowiki></code> || empty comment (used as separator) || to make the code easier to read
 
|-
 
|-
| <code><nowiki>|Tab-1={{3DText|text='''Tab#1 the Tabs Template'''}}</nowiki></code> || Tab name ||  rowspan="4"|This single tab<br /><small>Note that the parameters are numbered. You can have up to 10 tabs as this one.</small>
+
| <code><nowiki>|Tab-1={{3DText|text='''Tab#1 the Tabs Template<br />It is the ''active''  tab'''}}</nowiki></code> || Tab name ||  rowspan="4"|This single tab<br /><small>Note that the parameters are numbered. You can have up to 10 tabs as this one.</small>
 
|-
 
|-
| <code><nowiki>|URL-1=Template:Tabs</nowiki></code> || The url of the page in which the tab is "active".<br /> The url is the one of the actual page, the tab is "active", thus its backround is the page body one.  
+
| <code><nowiki>|URL-1=Template:Tabs</nowiki></code> || The url of the page in which the tab is "active".<br /> The url is the one of the actual page, the tab is "active", thus its background is the page body one.  
 
|-
 
|-
| <code><nowiki>|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}</nowiki></code> || Tab background colour: here light tryker blue, effective only if url differs from actual page.
+
| <code><nowiki>|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}</nowiki></code> || Tab background color: here light tryker blue, effective only if url differs from actual page.
 
|-
 
|-
 
| <code><nowiki>|Pic-1=dummy.png </nowiki></code> || An icon to be displayed left of the tab title.  
 
| <code><nowiki>|Pic-1=dummy.png </nowiki></code> || An icon to be displayed left of the tab title.  
Line 91: Line 96:
 
| <code><nowiki><!--  --></nowiki></code> || separator || to make the code easier to read  
 
| <code><nowiki><!--  --></nowiki></code> || separator || to make the code easier to read  
 
|-
 
|-
| <code><nowiki>|Tab-2={{3DText|text='''''Tab#2 the Tab Template'''''}}</nowiki></code> || Second tab title. ||  rowspan="4"|This single tab
+
| <code><nowiki>|Tab-2={{3DText|text='''''Tab#2: the Tab Template'''''<br />This tab is ''inactive''}}</nowiki></code> || Second tab title. ||  rowspan="4"|This single tab
 
|-
 
|-
 
| <code><nowiki>|URL-2=Template:Tab</nowiki></code> || This page is not the actual page, the tab is "inactive"<br /> "Inactive" tabs are separated from the page body by an horizontal line.  
 
| <code><nowiki>|URL-2=Template:Tab</nowiki></code> || This page is not the actual page, the tab is "inactive"<br /> "Inactive" tabs are separated from the page body by an horizontal line.  
Line 103: Line 108:
 
| <code><nowiki>Example</nowiki></code> || Example || Example -->
 
| <code><nowiki>Example</nowiki></code> || Example || Example -->
 
|}
 
|}
</noinclude>
+
 
 +
 
 +
==Examples==
 +
*Guild page: [[Guild:Ballistic Mystix|Ballistic Mystix]]
 +
*With 2 tabs, no 3D Text: [[Wheel of fortune]]
 +
[[Category:Tab]][[Category:Template:Tab]]</noinclude>

Latest revision as of 14:55, 27 February 2022

Tab#1: the Tabs TemplateIt is the active  tab Tab#1: the Tabs Template
It is the active tab
 Tab#2: the Tab TemplateThis tab is inactive Tab#2: the Tab Template
This tab is inactive
de:Vorlage:Tabs
en:Template:Tabs
es:Plantilla:Tabs
fr:Modèle:Tabs
ru:Шаблон:Tabs
 
UnderConstruction.png
Translation to review
Don't blame the contributors, but come and help them 😎

Reference text ( Maintained text, used as reference ) :
Notes: (Zorroargh, 2022-02-27)

This template is designed to assemble a set of tabs (10 max) such as the ones on this same page. Lets explain how it works on this example. It uses the Tab "sub"-template.

Tabs code

 {{Tabs
|bord=2px solid #{{ColorAtys|type=dark|group=tryker}}
|bg_frame=#{{ColorAtys|type=bg|group=tryker}}
|round=5em
|align_tab=center
<!--  -->
|Tab-1={{3DText|text='''Tab#1 the Tabs Template<br />It is the ''active''  tab'''}} 
|URL-1=Template:Tabs 
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}
|Pic-1=dummy.png 
<!--  -->
|Tab-2={{3DText|text='''''Tab#2: the Tab Template'''''<br />This tab is ''inactive''}}
|URL-2=Template:Tab
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
|Pic-2=UnderConstruction.png
}}

Detailed code

Code explained
Code Effect Range
{{Tabs - Start of template call
|bord=2px solid #{{ColorAtys|type=dark|group=tryker}} defines border line type, thickness and colour the whole framed page
|bg_frame=#{{ColorAtys|type=bg|group=tryker}} defines page background colour : here bg (background) tryker blue as defined in ColorAtys template.
|round=5em Radius of rounded corners
Note that only tab corners are rounded.
|align_tab=center text alignment of tab names
<!-- --> empty comment (used as separator) to make the code easier to read
|Tab-1={{3DText|text='''Tab#1 the Tabs Template<br />It is the ''active'' tab'''}} Tab name This single tab
Note that the parameters are numbered. You can have up to 10 tabs as this one.
|URL-1=Template:Tabs The url of the page in which the tab is "active".
The url is the one of the actual page, the tab is "active", thus its background is the page body one.
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}} Tab background color: here light tryker blue, effective only if url differs from actual page.
|Pic-1=dummy.png An icon to be displayed left of the tab title.
<!-- --> separator to make the code easier to read
|Tab-2={{3DText|text='''''Tab#2: the Tab Template'''''<br />This tab is ''inactive''}} Second tab title. This single tab
|URL-2=Template:Tab This page is not the actual page, the tab is "inactive"
"Inactive" tabs are separated from the page body by an horizontal line.
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}} Tab background colour: here light fyros orange
|Pic-2=UnderConstruction.png Tab 2 icon
}} - End of Template.


Examples