|
|
| (47 intermediate revisions by 32 users not shown) |
| Line 1: |
Line 1: |
| <onlyinclude><p style="margin:0px;font-size:90%"><span style="border:{{{border|none}}};background-color:{{{1|none}}};color:{{{1|none}}};">██</span> {{{2|}}}</p></onlyinclude> | | <includeonly><!-- |
| <!-- You are advised to read the talk page before changing this template. --> | | --><templatestyles src="Legend/styles.css" /><!-- |
| Shows a legend row with a colored box.
| | --><div class="legend"><!-- |
| | --><span class="legend-color" style="<!-- |
| | -->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!-- |
| | -->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!-- |
| | -->{{#if:{{{textcolor|}}}|color:{{{textcolor}}};}}<!-- |
| | -->{{#if:{{{size|}}}|font-size:{{{size}}};}}"><!-- |
|
| |
|
| ;Usage:
| | -->{{#if:{{{text|}}}|<span class="legend-text">{{{text}}}</span>| }}<!-- |
| <nowiki>{{</nowiki>legend|''color''|''label''|border=''border''<nowiki>}}</nowiki>
| | --></span><!-- |
|
| |
|
| ''color'' is passed to the [[Cascading Style Sheets|css]] background property, so it can also include images. The optional ''border'' argument is passed to the css border property.
| | --> {{{2|}}}<!-- |
|
| |
|
| ;Example:
| | --></div><!-- |
| <nowiki>{{legend|black|Africa}}</nowiki>
| | --></includeonly><noinclude> |
| <nowiki>{{legend|green|Americas}}</nowiki>
| | {{Documentation}} |
| <nowiki>{{legend|blue|Oceania}}</nowiki>
| | </noinclude> |
| <nowiki>{{legend|#ff0|Europe}}</nowiki>
| |
| <nowiki>{{legend|#ff2800|Asia}}</nowiki>
| |
| | |
| | |
| <p style="margin:0px;font-size:90%"><span style="border:none;color:black;background-color:black">mm</span> Africa</p>
| |
| <p style="margin:0px;font-size:90%"><span style="border:none;color:green;background-color:green">mm</span> Americas</p>
| |
| <p style="margin:0px;font-size:90%"><span style="border:none;color:blue;background-color:blue">mm</span> Oceania</p>
| |
| <p style="margin:0px;font-size:90%"><span style="border:none;color:#FF0;background-color:#FF0">mm</span> Europe</p>
| |
| <p style="margin:0px;font-size:90%"><span style="border:none;color:#FF2800;background-color:#FF2280">mm</span> Asia</p>
| |
| | |
| | |
| For legends involving lines on a map, see {{tl|legend-line}}.
| |
| | |
| [[Category:Legend templates]]
| |
| | |
| [[ca:Template:Llegenda]]
| |
| [[cy:Nodyn:Legend]]
| |
| [[de:Vorlage:Legende]]
| |
| [[es:Plantilla:Legend]]
| |
| [[fr:Modèle:Légende]]
| |
| [[ka:თარგი:ლეგენდა]]
| |
| [[ko:Template:범례]]
| |
| [[hu:Sablon:Jelmagyarázat]]
| |
| [[pl:Szablon:Legenda]]
| |
| [[ru:Шаблон:Легенда]]
| |
| [[sl:Predloga:Legenda]]
| |
| [[sr:Шаблон:Легенда]]
| |
| [[vi:Tiêu bản:Legend]]
| |
| [[zh:Template:Legend]]
| |
Lua error in Module:Documentation at line 7: Module:Documentation/config returned boolean, table expected.