« Modèle:Navbar » : différence entre les versions
Aller à la navigation
Aller à la recherche
test0>Shirayuki (use translation aware transclusion) |
test0>Baris6161TURK (Adding translate tags and remove unneeded deprecated information.) |
||
Ligne 25 : | Ligne 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}} | ||
Ligne 37 : | Ligne 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 ---> | ||
Ligne 90 : | Ligne 96 : | ||
[[Category:Formatting templates{{#translation:}}]] | [[Category:Formatting templates{{#translation:}}]] | ||
</includeonly> | </includeonly> | ||
}} | }} | ||
</noinclude> | </noinclude> |
Version du 5 mars 2021 à 20:00
<languages/> · [{{fullurl:Modèle:{{{1}}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:|]}} {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}{{#if:<translate>
]{{#if:||Usage
General
When one of the following examples is placed inside a given [[<tvar|1>Special:MyLanguage/Help:Templates</>|template]], it adds navbar navigational functionality: </translate>
<translate> The <tvar| [[Category:Template documentation pages{{#translation:}}]] }}