Difference between revisions of "Template:Crate series table/row/Sandbox"

From Team Fortress Wiki
Jump to: navigation, search
(Only change link color if a valid grade)
(Sandbox - fix template limit on retired series)
Line 2: Line 2:
 
<nowiki></nowiki>
 
<nowiki></nowiki>
 
{{!-}}
 
{{!-}}
{{!}} colspan="2" {{#if:{{{grade|}}}|data-grade={{{grade}}}}} style="background:#{{#switch: {{{grade}}}|Civilian=B0C3D9|Freelance=5E98D9|Mercenary=4B69FF|Commando=8847FF|Assassin=D32CE6|Elite=EB4B4B|#default=FFDDAD}};" {{!}} {{item icon|{{{item}}}}} [[{{{link|{{{item}}}}}}{{if lang}}|<span style="{{#switch: {{{grade}}}|Civilian=color:white;|Freelance=color:white;|Mercenary=color:white;|Commando=color:white;|Assassin=color:white;|Elite=color:white;}}">{{{name|{{Item name|{{{item}}}}}}}}</span>]]
+
{{!}} colspan="2" {{#if:{{{grade|}}}|data-grade={{{grade}}}}} style="background:#{{#switch: {{{grade}}}|Civilian=B0C3D9|Freelance=5E98D9|Mercenary=4B69FF|Commando=8847FF|Assassin=D32CE6|Elite=EB4B4B|#default=FFDDAD}};" {{!}} {{item icon|{{{item}}}}} [[{{{link|{{{item}}}}}}{{if lang}}|{{#switch: {{{grade}}}|Civilian=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|Freelance=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|Mercenary=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|Commando=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|Assassin=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|Elite=<span style="color:white;">{{{name|{{Item name|{{{item}}}}}}}}</span>|#default={{{name|{{Item name|{{{item}}}}}}}}}}]]
 
{{!}} style="text-align:right;" {{!}} {{#if:{{{rate|}}}|{{Decimal Align|NUM={{{rate}}}|P=2|POSTFIX=%}}}}
 
{{!}} style="text-align:right;" {{!}} {{#if:{{{rate|}}}|{{Decimal Align|NUM={{{rate}}}|P=2|POSTFIX=%}}}}
 
{{!-}}
 
{{!-}}

Revision as of 00:59, 6 September 2023