Difference between revisions of "Template:Navbar"
Jump to navigation
Jump to search
Adding translate tags and remove unneeded deprecated information.
>Shirayuki (use translation aware transclusion) |
>Baris6161TURK (Adding translate tags and remove unneeded deprecated information.) |
||
Line 25: | Line 25: | ||
--></small></span><noinclude> | --></small></span><noinclude> | ||
{{ | {{Documentation|content= | ||
<translate> | |||
== Usage == | == Usage == | ||
===General=== | === General === | ||
When one of the following examples is placed inside a given [[Special:MyLanguage/Help:Templates|template]], it adds navbar navigational functionality: | When one of the following examples is placed inside a given [[<tvar|1>Special:MyLanguage/Help:Templates</>|template]], it adds navbar navigational functionality: | ||
</translate> | |||
: {{tlx|Navbar|Navbar|mini{{=}}1}} | : {{tlx|Navbar|Navbar|mini{{=}}1}} | ||
Line 37: | Line 38: | ||
: {{tlx|Navbar|Navbar|fontstyle{{=}}color:green}} | : {{tlx|Navbar|Navbar|fontstyle{{=}}color:green}} | ||
The <code><nowiki> | <translate> | ||
The <tvar|1><code>{{<nowiki/>subst:PAGENAME}}</code></> will be substituted with the template's name when parsed by the servers.</translate> | |||
<translate>For example, <tvar|1>{{tlx|Navbar|navbar/doc}}</> gives: | |||
</translate> | |||
{{Navbar|navbar/doc}} | {{Navbar|navbar/doc}} | ||
===Font-size=== | <translate> | ||
=== Font-size === | |||
Font-size is 88% when used in a navbar, and 100% when nested in a navbox. | Font-size is <tvar|1><code>88%</code></> when used in a navbar, and <tvar|2><code>100%</code></> when nested in a navbox. | ||
In the navbar, the weight is "normal"; when nested in navbox, it takes on the outer setting. The middot is bold. | </translate> | ||
<translate> | |||
In the navbar, the weight is "<tvar|1><code>normal</code></>"; when nested in navbox, it takes on the outer setting. | |||
</translate> | |||
<translate> | |||
The middot is bold. | |||
== Examples == | == Examples == | ||
===Required parameters=== | === Required parameters === | ||
</translate> | |||
* {{tlx|Navbar| | * {{tlx|Navbar|''<translate>template name</translate>''}} — <translate>the template name is required.</translate> | ||
<translate> | |||
=== Optional parameters === | |||
</translate> | |||
{{(}}{{!}} class="wikitable" | {{(}}{{!}} class="wikitable" | ||
! Options !! Parameters !! Produces... | ! <translate>Options</translate> !! <translate>Parameters</translate> !! <translate>Produces...</translate> | ||
{{!}}- | {{!}}- | ||
{{!}} Basic {{!}}{{!}} {{tlx|Navbar| | {{!}} <translate>Basic</translate> {{!}}{{!}} {{tlx|Navbar|''<translate>template name</translate>''}} {{!}}{{!}} {{navbar|navbar/doc}} | ||
{{!}}- | {{!}}- | ||
{{!}} Different text {{!}}{{!}} {{tlx|Navbar| | {{!}} <translate>Different text</translate> {{!}}{{!}} {{tlx|Navbar|''<translate>template name</translate>''|text{{=}}<translate>This template:</translate>}} {{!}}{{!}} {{navbar|navbar/doc|text=<translate>This template:</translate>}} | ||
{{!}}- | {{!}}- | ||
{{!}} Without "This box:" text {{!}}{{!}} {{tlx|Navbar| | {{!}} <translate>Without "This box:" text</translate> {{!}}{{!}} {{tlx|Navbar|''<translate>template name</translate>''|plain{{=}}1}} {{!}}{{!}} {{navbar|navbar/doc|plain=1}} | ||
{{!}}- | {{!}}- | ||
{{!}} Short version {{!}}{{!}} {{tlx|Navbar| | {{!}} <translate>Short version</translate> {{!}}{{!}} {{tlx|Navbar|''<translate>template name</translate>''|mini{{=}}1}} {{!}}{{!}} {{navbar|navbar/doc|mini=1}} | ||
{{!}}- | {{!}}- | ||
{{!}} With a color option {{!}}{{!}} {{tlx|Navbar| | {{!}} <translate>With a color option</translate> {{!}}{{!}} {{tlx|Navbar|''<translate>template name</translate>''|fontstyle{{=}}color:green}} {{!}}{{!}} {{navbar|navbar/doc|fontstyle=color:green}} | ||
{{!}}- | {{!}}- | ||
{{!}} With brackets | {{!}} <translate>With brackets</translate> | ||
{{!}} {{tlx|Navbar| | {{!}} {{tlx|Navbar|<translate>template name</translate>|brackets{{=}}1}} | ||
{{!}} {{navbar|navbar/doc|brackets=1}} | {{!}} {{navbar|navbar/doc|brackets=1}} | ||
{{!}}{{)}} | {{!}}{{)}} | ||
<translate> | |||
== Notes == | == Notes == | ||
Navbar is contained within a {{tag|div}} in order to accommodate a horizontal unnumbered list. This means it cannot be placed inside a {{tag|span}} or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements. | Navbar is contained within a <tvar|1>{{tag|div}}</> in order to accommodate a horizontal unnumbered list. | ||
</translate> | |||
<translate> | |||
This means it cannot be placed inside a <tvar|1>{{tag|span}}</> or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements. | |||
</translate> | |||
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | <!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | ||
Line 90: | Line 96: | ||
[[Category:Formatting templates{{#translation:}}]] | [[Category:Formatting templates{{#translation:}}]] | ||
</includeonly> | </includeonly> | ||
}} | }} | ||
</noinclude> | </noinclude> |