Jump to content

Template:Recipe: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
allow 48x48 images to be resized properly
imported>Margotbean
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude><div id="{{#switch:{{{2|}}}
<includeonly>{{Overlayimg|{{{1|Blank icon}}}|width={{{2|24}}}|type=Recipe|center={{#ifeq:{{lc:{{{3|}}}}}|center|true|false}}}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
|24=qualitycontainersm
|32=qualitycontainermed
|48=qualitycontainer
|#default=qualitycontainer
}}" style="margin:auto;"><div id="qualityimage"><div id="recipeimage"><!-- DO NOT DELETE THE LINE BREAK BELOW, PLEASE! -->
[[File:{{{1|}}}.png|{{#if:{{{2|}}}|{{{2|}}}px{{!}}|}}|link=]]</div>[[File:Recipe_Overlay.png|{{#if:{{{2|}}}|{{{2|}}}px{{!}}|}}link=]]</div></div></onlyinclude></includeonly>
<noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Latest revision as of 21:25, 16 March 2023

Description

This template overlays a recipe icon over an image. The background image will be rendered semi-transparent.

Parameters

Parameter Notes
First (unnamed) parameter Name of background image (without extension such as .png)
Second (unnamed) parameter Desired display width of background image (do not include "px")
Valid values: 48, 36, 32, 24 (other values will be accepted, but may produce undesired results)
Default value: 24
Third (unnamed) parameter center, if the image is to be displayed in a table cell. Adding this parameter will center the image in the cell.

Examples

Template Call Result
{{Recipe|Bread}}
{{Recipe|Complete Breakfast|48}}
48
{{Recipe|Barrel Brazier|36|center}}
{{Recipe|Wicked Statue|32|center}}