Difference between revisions of "Template:Styles table"

From Team Fortress Wiki
Jump to: navigation, search
(Updated available languages)
(Converted to wiki syntax. Using !! to create new cells since newlines get stripped. Removed <nowiki> tags since <pre> prevents transclusion.)
Line 1: Line 1:
 
{{#if:{{{hatnotes|}}}||{{main|Styles{{if lang}}|l1={{item name|styles}}}}}}
 
{{#if:{{{hatnotes|}}}||{{main|Styles{{if lang}}|l1={{item name|styles}}}}}}
<table class="wikitable grid" cellpadding="2">
+
{| class="wikitable grid" cellpadding="2"
<tr>
+
! class="header" colspan="11" | {{item name|styles}}
<th class="header" colspan="11">{{item name|styles}}</th>
+
|-
</tr><tr>
+
| [[File:{{{image1}}}|{{{width|80px}}}|center]]{{
<td>[[File:{{{image1}}}|{{{width|80px}}}|center]]</td>{{
+
  #if:{{{style2|}}}|{{!!}} [[File:{{{image2}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style2|}}}|<td align="center">[[File:{{{image2}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style3|}}}|{{!!}} [[File:{{{image3}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style3|}}}|<td align="center">[[File:{{{image3}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style4|}}}|{{!!}} [[File:{{{image4}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style4|}}}|<td align="center">[[File:{{{image4}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style5|}}}|{{!!}} [[File:{{{image5}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style5|}}}|<td align="center">[[File:{{{image5}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style6|}}}|{{!!}} [[File:{{{image6}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style6|}}}|<td align="center">[[File:{{{image6}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style7|}}}|{{!!}} [[File:{{{image7}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style7|}}}|<td align="center">[[File:{{{image7}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style8|}}}|{{!!}} [[File:{{{image8}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style8|}}}|<td align="center">[[File:{{{image8}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style9|}}}|{{!!}} [[File:{{{image9}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style9|}}}|<td align="center">[[File:{{{image9}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style10|}}}|{{!!}} [[File:{{{image10}}}|{{{width|80px}}}|center]]}}{{
  #if:{{{style10|}}}|<td align="center">[[File:{{{image10}}}|{{{width|80px}}}|center]]</td>}}{{
+
  #if:{{{style11|}}}|{{!!}} [[File:{{{image11}}}|{{{width|80px}}}|center]]}}
  #if:{{{style11|}}}|<td align="center">[[File:{{{image11}}}|{{{width|80px}}}|center]]</td>}}
+
|-
</tr><tr>
+
! style="background:#F9D483;" | {{Item name|{{{style1}}}}}{{
<th style="background:#F9D483;">{{Item name|{{{style1}}}}}</th>{{
+
  #if:{{{style2|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style2}}}}}}}{{
  #if:{{{style2|}}}|<th style="background:#F9D483;">{{Item name|{{{style2}}}}}</th>}}{{
+
  #if:{{{style3|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style3}}}}}}}{{
  #if:{{{style3|}}}|<th style="background:#F9D483;">{{Item name|{{{style3}}}}}</th>}}{{
+
  #if:{{{style4|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style4}}}}}}}{{
  #if:{{{style4|}}}|<th style="background:#F9D483;">{{Item name|{{{style4}}}}}</th>}}{{
+
  #if:{{{style5|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style5}}}}}}}{{
  #if:{{{style5|}}}|<th style="background:#F9D483;">{{Item name|{{{style5}}}}}</th>}}{{
+
  #if:{{{style6|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style6}}}}}}}{{
  #if:{{{style6|}}}|<th style="background:#F9D483;">{{Item name|{{{style6}}}}}</th>}}{{
+
  #if:{{{style7|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style7}}}}}}}{{
  #if:{{{style7|}}}|<th style="background:#F9D483;">{{Item name|{{{style7}}}}}</th>}}{{
+
  #if:{{{style8|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style8}}}}}}}{{
  #if:{{{style8|}}}|<th style="background:#F9D483;">{{Item name|{{{style8}}}}}</th>}}{{
+
  #if:{{{style9|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style9}}}}}}}{{
  #if:{{{style9|}}}|<th style="background:#F9D483;">{{Item name|{{{style9}}}}}</th>}}{{
+
  #if:{{{style10|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style10}}}}}}}{{
  #if:{{{style10|}}}|<th style="background:#F9D483;">{{Item name|{{{style10}}}}}</th>}}{{
+
  #if:{{{style11|}}}|!! style="background:#F9D483;" {{!}} {{Item name|{{{style11}}}}}}}
  #if:{{{style11|}}}|<th style="background:#F9D483;">{{Item name|{{{style11}}}}}</th>}}
+
|}<noinclude>
</tr>
 
</table><noinclude>
 
 
{{translation switching|en, ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant}}
 
{{translation switching|en, ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant}}
 
{{doc begin}}
 
{{doc begin}}
Line 34: Line 32:
  
 
== Usage ==
 
== Usage ==
<pre><nowiki>
+
<pre>
 
{{Styles table
 
{{Styles table
 
| hatnotes =  
 
| hatnotes =  
Line 54: Line 52:
 
| width =  
 
| width =  
 
}}
 
}}
</nowiki></pre>
+
</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 70: Line 68:
  
 
== Example ==
 
== Example ==
<pre><nowiki>
+
<pre>
 
{{Styles table
 
{{Styles table
 
| hatnotes = pootis
 
| hatnotes = pootis
Line 82: Line 80:
 
| width = 40px
 
| width = 40px
 
}}
 
}}
</nowiki></pre>
+
</pre>
 
will appear as:
 
will appear as:
 
{{Styles table
 
{{Styles table

Revision as of 00:37, 24 January 2017

Main article: [[Styles|Template:Dictionary/items/styles]]
Template:Dictionary/items/styles
[[File:{{{image1}}}|80px|center]]
{{dictionary/items/{{{style1}}}|null=|list=}}

Documentation for Styles table

This template is used on item articles to show several styles. It currently supports up to 11 styles.

Usage

{{Styles table
| hatnotes = 

| style1 = 
| style2 = 
| style3 = 
| style4 = 
...
| style11 = 

| image1 = 
| image2 = 
| image3 = 
| image4 = 
...
| image11 = 

| width = 
}}

Parameters

hatnotes
Hides hatnotes for main article if used.
styleX
Name for style X. This should not be translated, as it uses strings from Template:Dictionary. If the item has less than 11 styles, remove the unused ones from the template.
imageX
Image for style X. This should be placed as Filename.extension, without File: on the start. If the item has less than 11 styles, remove the unused ones from the template.
width
Sets custom width for images. Default is 80px.

Example

{{Styles table
| hatnotes = pootis

| style1 = Ghastlier Gibus
| style2 = Ghastly Gibus

| image1 = Item icon Ghastlier Gibus.png
| image2 = Item icon Ghastly Gibus.png

| width = 40px
}}

will appear as:

Styles
Item icon Ghastlier Gibus.png
Item icon Ghastly Gibus.png
Ghastlier Gibus Ghastly Gibus