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

From Team Fortress Wiki
Jump to: navigation, search
(Add ability to change background color based on grade)
(capitalize grade values in accordance to the item infobox, and add data-grade so it's easier to determine the grade from the HTML)
Line 2: Line 2:
 
<nowiki></nowiki>
 
<nowiki></nowiki>
 
{{!-}}
 
{{!-}}
{{!}} colspan="2" 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="{{#if:{{{grade|}}}|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 12: Line 12:
 
|-
 
|-
 
{{for|
 
{{for|
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=civilian}}
+
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Civilian}}
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=freelance}}
+
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Freelance}}
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=mercenary}}
+
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Mercenary}}
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=commando}}
+
  |{{Crate series table/row/Sandbox|item=Shotgun|rate=1|grade=Commando}}
  |{{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=Shotgun|rate=1}}
  |{{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}}
 
}}
 
}}
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 22:54, 5 September 2023