Difference between revisions of "Template:Quality"

From Stardew Valley Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<noinclude>{{Quality|Parsnip|silver|32}}</noinclude>
+
<noinclude>This template places a quality star over an image.  It uses the following parameters
 +
 
 +
<pre>
 +
{{Quality
 +
|image=Image name assuming the image is a .png (image)
 +
|quality=denotes the star color (silver/gold)
 +
|size=size of the image (24/32/48)
 +
}}
 +
</pre>
 +
When used the parameters are not identified by name, but by order.  Example use of this template;
 +
<pre>{{Quality|Parsnip|silver|32}}</pre>
 +
Result: {{Quality|Parsnip|silver|32}}
 +
<pre>{{Quality|Kale|gold|48}}</pre>
 +
Result: {{Quality|Kale|gold|48}}
 +
</noinclude>
 
<includeonly><div id="{{#switch:{{{3|}}}
 
<includeonly><div id="{{#switch:{{{3|}}}
 
|24=qualitycontainersm
 
|24=qualitycontainersm
Line 8: Line 22:
 
[[File:{{{1|}}}.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]
 
[[File:{{{1|}}}.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]
 
{{#ifeq: {{{2|}}}|silver|[[File:Silver_Quality_Icon.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]|[[File:Gold_Quality_Icon.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]}}
 
{{#ifeq: {{{2|}}}|silver|[[File:Silver_Quality_Icon.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]|[[File:Gold_Quality_Icon.png|{{#if:{{{3|}}}|{{{3|}}}px{{!}}|}}link=]]}}
</div></includeonly>
+
</div></div></includeonly>

Revision as of 06:46, 3 February 2016

This template places a quality star over an image. It uses the following parameters

{{Quality
|image=Image name assuming the image is a .png (image)
|quality=denotes the star color (silver/gold)
|size=size of the image (24/32/48)
}}

When used the parameters are not identified by name, but by order. Example use of this template;

{{Quality|Parsnip|silver|32}}

Result:

Parsnip.png Silver Quality Icon.png

{{Quality|Kale|gold|48}}

Result:

Kale.png Gold Quality Icon.png