Difference between revisions of "Template:Tabs"

From EncyclopAtys

Jump to: navigation, search
m
Line 22: Line 22:
 
   --><div style="padding:1ex; "><!--
 
   --><div style="padding:1ex; "><!--
  
--></includeonly><noinclude>{{Trad
+
--></includeonly><!-- _______________________ Docs_______________________ --><noinclude>{{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'''}}
 +
|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'''''}}
 +
|URL-2=Template:Tab
 +
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
 +
|Pic-2=UnderConstruction.png
 +
}}{{Trad
 
|DE=Vorlage:Tabs
 
|DE=Vorlage:Tabs
 
|EN=Template:Tabs
 
|EN=Template:Tabs
Line 28: Line 43:
 
|FR=Modèle:Début des onglets
 
|FR=Modèle:Début des onglets
 
|RU=Шаблон:Tabs
 
|RU=Шаблон:Tabs
}}[[Category:Tab]]</noinclude>
+
}}[[Category:Tab]]
 +
<br />
 +
<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]].
 +
==Tabs code==
 +
<syntaxhighlight lang="xml"> {{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'''}}
 +
|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'''''}}
 +
|URL-2=Template:Tab
 +
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
 +
|Pic-2=UnderConstruction.png
 +
}}</syntaxhighlight>
 +
{| class="wikitable"
 +
|+Code explained style="font: italic 1em serif; color:#e76700; "|'''Code explained'''
 +
|-
 +
! <code>Code</code> !! Effect !! Range
 +
|-
 +
| <code><nowiki>{{Tabs</nowiki></code> || - || Start of template call
 +
|-
 +
| <code><nowiki>|bord=2px solid #{{ColorAtys|type=dark|group=tryker}}</nowiki></code> || defines border line type, thickness and colour || rowspan="4"|the ''whole'' framed page
 +
|-
 +
| <code><nowiki>|bg_frame=#{{ColorAtys|type=bg|group=tryker}}</nowiki></code> || defines page background colour :  here bg (background) tryker blue as defined in [[:Template:ColorAtys|ColorAtys template]].
 +
|-
 +
| <code><nowiki>|round=5em</nowiki></code> || Radius of rounded corners<br />Note that only tab corners are rounded. 
 +
|-
 +
| <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>|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 9 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 /> "Inactive tabs are separated from the page body by an horizontal line.
 +
|-
 +
| <code><nowiki>|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}}</nowiki></code> || Tab background colour: here light tryker blue
 +
|-
 +
| <code><nowiki>|Pic-1=dummy.png </nowiki></code> || An icon to be displayed left of the tab title.
 +
|-
 +
| <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>|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>|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}</nowiki></code> || Tab background colour: here light fyros orange
 +
|-
 +
| <code><nowiki>|Pic-2=UnderConstruction.png</nowiki></code> || Tab 2 icon 
 +
|-
 +
| <code><nowiki>}}</nowiki></code> || - || End of Template.
 +
<!-- |-
 +
| <code><nowiki>Example</nowiki></code> || Example || Example -->
 +
|}
 +
</noinclude>

Revision as of 18:50, 6 November 2020

Tab#1: the Tabs Template Tab#1: the Tabs Template Tab#2 the Tab Template Tab#2 the Tab Template
de:Vorlage:Tabs
en:Template:Tabs
es:Plantilla:Tabs
fr:Modèle:Début des onglets
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: (Dorothée, 2020-11-06)



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 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'''}} 
|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'''''}}
|URL-2=Template:Tab
|bg_Tab-2=#{{ColorAtys|type=light|group=fyros}}
|Pic-2=UnderConstruction.png
}}
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
<!-- --> separator to make the code easier to read
|Tab-1={{3DText|text='''Tab#1 the Tabs Template'''}} Tab name This single tab
Note that the parameters are numbered. You can have up to 9 tabs as this one.
|URL-1=Template:Tabs The url of the page in which the tab is "active".
"Inactive tabs are separated from the page body by an horizontal line.
|bg_Tab-1=#{{ColorAtys|type=light|group=tryker}} Tab background colour: here light tryker blue
|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'''''}} 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.