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

From Team Fortress Wiki
Jump to: navigation, search
(capitalize grade values in accordance to the item infobox, and add data-grade so it's easier to determine the grade from the HTML)
(Only change link color if a valid grade)
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="{{#if:{{{grade|}}}|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}}|<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>]]
 
{{!}} 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=%}}}}
 
{{!-}}
 
{{!-}}
Line 18: Line 18:
 
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Assassin}}
 
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Assassin}}
 
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Elite}}
 
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Elite}}
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1}}
+
  |{{Crate series table/row/Sandbox|item=Scattergun|rate=1|grade=notagrade}}
  |{{Crate series table/row/Sandbox|item=Minigun|rate=2|grade=Assassin}}
+
  |{{Crate series table/row/Sandbox|item=Minigun|rate=2|grade=assassin}}
 
  |{{Crate series table/row/Sandbox|item=Hat of Undeniable Wealth and Respect|rate=97|grade=Mercenary}}
 
  |{{Crate series table/row/Sandbox|item=Hat of Undeniable Wealth and Respect|rate=97|grade=Mercenary}}
 
  |{{Crate series table/row/Sandbox|item=Pistol|rate=500}}
 
  |{{Crate series table/row/Sandbox|item=Pistol|rate=500}}

Revision as of 00:25, 6 September 2023