Difference between revisions of "Template:Itemlist/row"

From Team Fortress Wiki
Jump to: navigation, search
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{#switch: {{lc:{{{type}}}}}
 
{{#switch: {{lc:{{{type}}}}}
 
| class =
 
| class =
{{!}} width="90px" style="background:#FF9310;" rowspan="{{{rowspan}}}" {{!}} '''{{class link|{{{class}}}|br=yes|color=white}}'''
+
{{!}} width="90px" style="background:{{{class-background|#FF9310}}};" rowspan="{{{rowspan}}}" {{!}} '''{{#ifeq:{{lc:{{{class}}}}}|multiclass|[[File:TF2 crosshair orange.png|20px]]<br>[[Classes{{if lang}}|{{font colour|white|{{class name|multiclass}}}}]]|{{class link|{{{class}}}|br=yes|color={{{class-colour|white}}}}}}}'''
{{!}} width="75px" {{#switch: {{lc:{{{grade}}}}}|unique = style="background:#FFD700;"|#default = class="item-grade {{lc:{{{grade}}}}}"}} {{!}} {{item icon|{{{item}}}|75px}}
+
{{!}} width="75px" {{#switch: {{lc:{{{grade}}}}}|unique = style="position:relative;background:#FFD700;"|#default = style="position:relative;" class="item-grade {{lc:{{{grade}}}}}"}} {{!}} {{item icon|{{{item}}}|75px}}
{{!}} width="160px" style="background:#FFE8CC;" {{!}} '''{{item link|{{{item}}}}}'''
+
{{#if:{{{halloween-icon|}}}|<div style="position:absolute;top:2px;right:2px;">{{Halloween icon state|20px}}</div>}}
 +
{{!}} width="160px" style="background:{{{name-background|#FFE8CC}}};" {{!}} '''{{item link|{{{item}}}}}'''
 
{{!}}-
 
{{!}}-
 
| item =
 
| item =
{{!}} {{#switch: {{lc:{{{grade}}}}}|unique = style="background:#FFD700;"|#default = class="item-grade {{lc:{{{grade}}}}}"}} {{!}} {{item icon|{{{item}}}|75px}}
+
{{!}} {{#switch: {{lc:{{{grade}}}}}|unique = style="position:relative;background:#FFD700;"|#default = style="position:relative;" class="item-grade {{lc:{{{grade}}}}}"}} {{!}} {{item icon|{{{item}}}|75px}}
{{!}} style="background:#FFE8CC;" {{!}} '''{{item link|{{{item}}}}}'''
+
{{#if:{{{halloween-icon|}}}|<div style="position:absolute;top:2px;right:2px;">{{Halloween icon state|20px}}</div>}}
 +
{{!}} style="background:{{{name-background|#FFE8CC}}};" {{!}} '''{{item link|{{{item}}}}}'''
 
{{!}}-
 
{{!}}-
 
}}<noinclude>
 
}}<noinclude>
 
{{Doc begin}}
 
{{Doc begin}}
 
 
== Parameters ==
 
== Parameters ==
 
For use on {{tl|Itemlist}}
 
For use on {{tl|Itemlist}}
  
; type
+
; ''type''
: Accepts "class" or "item", class is the top row, subsequent rows for class items should use "item".
+
: Accepts{{code|class}} or {{code|item}}, with ''class'' being the top row, subsequent rows for class items should use ''item''.
  
; rowspan
+
; ''rowspan''
: Rowspawn number, only necessary if type = class.
+
: Rowspawn number. Required if '''type''' is set to {{code|class}}.
  
; class
+
; ''class''
: Class name, also accepts "All classes", only if type = class.
+
: Class name, also accepts the value "All classes" and "Multiclass", but only if '''type''' is set to {{code|class}}.
  
; grade
+
:; ''class-colour''
: Grade of the item, should be lowercase. Also accepts "unique".
+
:: Colour of the class name, defaults to white.
  
; item
+
; ''grade''
 +
: Grade of the item. Must be lowercase. Also accepts "unique" as a value.
 +
 
 +
; ''item''
 
: Item name, for icon + link, in English.
 
: Item name, for icon + link, in English.
 +
 +
; ''class-background''
 +
: Background colour of the column where the class is. Required if '''type''' is set to {{code|class}}.
 +
 +
; ''name-background''
 +
: Background colour of the column where the item name is.
 +
 +
; ''halloween-icon''
 +
: Optional. Displays the state of the Halloween icon, for use on holiday-restricted items. Set to <code>halloween-icon = yes</code>.
  
 
== Example ==
 
== Example ==
Type = class example:
+
'''type''' = {{code|class}} example:
 
<pre>
 
<pre>
 
{{Itemlist/row
 
{{Itemlist/row
Line 39: Line 52:
 
| item = Jumping Jester
 
| item = Jumping Jester
 
| grade = commando
 
| grade = commando
 +
| class-background = #FF9310
 
}}
 
}}
 
</pre>
 
</pre>
  
Type = item example:
+
'''type''' = {{code|item}} example:
 
<pre>
 
<pre>
 
{{Itemlist/row
 
{{Itemlist/row
Line 48: Line 62:
 
| item = Last Laugh
 
| item = Last Laugh
 
| grade = assassin
 
| grade = assassin
 +
| name-background = #FFE8CC
 
}}
 
}}
 
</pre></noinclude>
 
</pre></noinclude>

Latest revision as of 13:22, 24 December 2024

Documentation for Itemlist/row

Parameters

For use on {{Itemlist}}

type
Acceptsclass or item, with class being the top row, subsequent rows for class items should use item.
rowspan
Rowspawn number. Required if type is set to class.
class
Class name, also accepts the value "All classes" and "Multiclass", but only if type is set to class.
class-colour
Colour of the class name, defaults to white.
grade
Grade of the item. Must be lowercase. Also accepts "unique" as a value.
item
Item name, for icon + link, in English.
class-background
Background colour of the column where the class is. Required if type is set to class.
name-background
Background colour of the column where the item name is.
halloween-icon
Optional. Displays the state of the Halloween icon, for use on holiday-restricted items. Set to halloween-icon = yes.

Example

type = class example:

{{Itemlist/row
| type = class
| rowspan = 2
| class = Scout
| item = Jumping Jester
| grade = commando
| class-background = #FF9310
}}

type = item example:

{{Itemlist/row
| type = item
| item = Last Laugh
| grade = assassin
| name-background = #FFE8CC
}}