Difference between revisions of "Template:Crate series table/row"
(test link + name change) |
Jh34ghu43gu (talk | contribs) m (re-word again because the prior one sounds a bit too matter-of-fact) |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly><nowiki></nowiki><!-- this nowiki pair ensures that we get a newline before the |- (start of row) --> |
− | <nowiki></nowiki> | + | |- |
− | {{!-}} | + | | {{#if:{{{grade|}}}|data-grade={{{grade}}} class="item-grade {{lc:{{{grade}}}}}"}} | <!-- |
− | {{ | + | |
− | + | Icon (with {{{link}} override) | |
− | </includeonly> | + | -->{{#if:{{{link|}}}|{{item icon|{{{item}}}|link={{{link}}}}}<!-- |
− | <noinclude> | + | |
+ | Icon (with no link override) | ||
+ | -->|{{item icon|{{{item}}}}}}}<!-- | ||
+ | |||
+ | Link target (can be overridden by {{{link}}}) | ||
+ | -->[[{{#if:{{{link|}}}|{{{link}}}|{{{item}}}{{if lang}}}}|<!-- | ||
+ | |||
+ | Set the link color to white when grade is present, for readability | ||
+ | --><span style="{{#if:{{{grade|}}}|color: white;}}"><!-- | ||
+ | |||
+ | Link text (can be overridden by {{{name}}}) | ||
+ | -->{{#if:{{{name|}}}|{{{name}}}|{{item name|{{{item}}}}}}}</span>]] | ||
+ | | style="text-align:right;" | <!-- | ||
+ | -->{{#if:{{{rate|}}}|{{#if:{{{exactrate|}}}|{{Decimal Align|NUM={{{rate}}}|P=2|PREFIX=~|POSTFIX=%|TOOLTIP={{lang | ||
+ | | en = Odds are approximately {{{exactrate}}}% when accounting for Unusual drops. | ||
+ | }} | ||
+ | }}|{{Decimal Align|NUM={{{rate}}}|P=2|POSTFIX=%}}}}}} | ||
+ | </includeonly><noinclude> | ||
+ | {{translation switching|en}} | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 07:10, 3 April 2024
This template uses translation switching. The correct language will be displayed automatically. Localized versions of this template (e.g. Template:Crate series table/row/ru) are not necessary. Add your translations directly to this template by editing it. Supported languages for this template: en (add) |
A single row template for the Crate series table template.
Renders a single row in the {{Crate series table/Sandbox}}
.
Renders a single row in the {{Crate series table}}
.
Parameters
- item
- Required. Used to determine the icon (and, if not overridden, the link and name)
- link
- Optional. Overrides the image and text links. This template does not modify the value, so it should use
{{if lang}}
- name
- Optional. Overrides the link text. This template does not modify the value, so it should use
{{item name}}
(or similar). - rate
- Optional. Provides a formatted drop percentage.
- exactrate
- Optional. Provides a tooltip on rate with a rate that factors in unusual drops.
- grade
- Optional. Sets the background color according to the Grade.
Examples
{{Crate series table/row|item=Shotgun|rate=1|grade=Civilian}} {{Crate series table/row|item=Shotgun|rate=1|grade=Freelance}} {{Crate series table/row|item=Shotgun|rate=1|grade=Mercenary}} {{Crate series table/row|item=Shotgun|rate=1|grade=Commando}} {{Crate series table/row|item=Shotgun|rate=1|grade=Assassin}} {{Crate series table/row|item=Shotgun|rate=1|exactrate=0.99|grade=Elite}} {{Crate series table/row|item=Scattergun}} {{Crate series table/row|item=Scattergun|name=Rocket Launcher}} {{Crate series table/row|item=Scattergun|name=Stickybomb Launcher|link=Stickybomb Launcher}}
Test
| |||
---|---|---|---|
Shotgun |
| ||
Shotgun |
| ||
Shotgun |
| ||
Shotgun |
| ||
Shotgun |
| ||
Shotgun |
| ||
Scattergun |
| ||
Rocket Launcher |
| ||
Stickybomb Launcher |