Template:Legend: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Hdante
No edit summary
m 1 revision imported
 
(72 intermediate revisions by 45 users not shown)
Line 1: Line 1:
<includeonly><p style="margin:0px;font-size:90%"><span style="border:{{{border|none}}};color:{{{1|none}}};">&#9608;</span>&nbsp;{{{2|}}}</p></includeonly>
<includeonly><!--
<noinclude>
--><templatestyles src="Legend/styles.css" /><!--
<!-- You are advised to read the talk page before changing this template. -->
--><div class="legend"><!--
Shows a legend row with a colored box.
  --><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>|&nbsp;}}<!--
<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.
  -->&nbsp;{{{2|}}}<!--


;Example:
--></div><!--
<nowiki>{{legend|black|Africa}}</nowiki>
--></includeonly><noinclude>
<nowiki>{{legend|green|Americas}}</nowiki>
{{Documentation}}
<nowiki>{{legend|blue|Oceania}}</nowiki>
<nowiki>{{legend|#ff0|Europe}}</nowiki>
<nowiki>{{legend|#ff2800|Asia}}</nowiki>
 
 
<p style="margin:0px;font-size:90%"><span style="border:none;color:black;">&#9608;</span>&nbsp;Africa</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:green;">&#9608;</span>&nbsp;Americas</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:blue;">&#9608;</span>&nbsp;Oceania</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:#FF0;">&#9608;</span>&nbsp;Europe</p>
<p style="margin:0px;font-size:90%"><span style="border:none;color:#FF2800;">&#9608;</span>&nbsp;Asia</p>
 
[[de:Vorlage:Legende]]
[[es:Plantilla:Legend]]
[[pl:Szablon:Legenda]]
[[sr:Шаблон:Легенда]]
[[vi:Tiêu bản:Legend]]
</noinclude>
</noinclude>

Latest revision as of 06:28, 6 June 2021