Difference between revisions of "Template:Infobox element/category format"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
(catch all recognised category names=colors)
imported>DePiep
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#if:{{{category|}}}
+
{{#switch:{{lc:{{{category|}}}}}
| <span title="color legend: {{{category|}}}" style="display:inline-block; vertical-align:middle; width:6px; height:8px; border:1px solid black; background:{{element color|1={{{category|}}}}}">&nbsp;</span> <!--
+
| unknown | =
-->{{#switch:{{lc:{{{category|}}}}}
+
| #default=<span title="color legend: {{{category|}}}" style="display:inline-block; vertical-align:middle; width:6px; height:8px; border:1px solid black; background:{{element color|1={{{category|}}}}}">&nbsp;</span> <!--
| unknown | unknown chemical properties = {{{category|}}}
+
the text
| #default=[[{{{category|}}}]]
+
-->{{#if:{{#invoke:String|match|s={{{category|}}} |pattern=[Uu]nknown |plain=false |nomatch=}}
 +
|{{{category|}}}
 +
|[[{{{category|}}}]]
 
}}
 
}}
 
}}<!--
 
}}<!--
  
 
--><noinclude>{{documentation}}</noinclude>
 
--><noinclude>{{documentation}}</noinclude>

Latest revision as of 10:11, 29 June 2019

50px Template documentation[create]