Difference between revisions of "Template:Recipe item/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(Created page with " ;Purpose :This is a template for improving the maintainability of Template: Recipe draw, where the code for drawing the plus sign and item icon is used nearly 20 times. This template is intended to be used '''only''' in Template: Recipe draw and does not work alone. ;Usage <templatestyles src="Template:Recipe draw/styles.css" /> :For Input1 and Output1 <div class="recipe-wrapper> {{markup|<nowiki> {{Recipe item | Name = Steam hi | Quantity = 2...")
 
Line 52: Line 52:
}}
}}
</div>
</div>
:Overwrite plus icon and/or icon size:
:For overwriting plus icon and/or icon size:
<div class="recipe-wrapper>
<div class="recipe-wrapper>
{{markup|<nowiki>
{{markup|<nowiki>
Line 71: Line 71:
}}
}}
</div>
</div>
:When Name is empty:
<div class="recipe-wrapper>
{{markup|<nowiki>
  {{Recipe item
    | Name      =
    | Quantity  = 2
    | Time      = 10
  }}</nowiki>|
  {{Recipe item
    | Name      =
    | Quantity  = 2
    | Time      = 10
  }}
}}
</div>
;The reason this template cannot be used alone
;The reason this template cannot be used alone
:[[Template: Recipe draw]] has the following 2 codes to define its style. These codes are omitted from '''Template:Recipe item'''.
:[[Template: Recipe draw]] has the following 2 codes to define its style. These codes are omitted from '''Template:Recipe item'''.
:*<nowiki><templatestyles src="Template:Recipe draw/styles.css" /></nowiki>
:*<nowiki><templatestyles src="Template:Recipe draw/styles.css" /></nowiki>
:*<nowiki><div class="recipe-wrapper></nowiki>
:*<nowiki><div class="recipe-wrapper></nowiki>

Revision as of 21:17, 2 October 2022

Purpose
This is a template for improving the maintainability of Template: Recipe draw, where the code for drawing the plus sign and item icon is used nearly 20 times. This template is intended to be used only in Template: Recipe draw and does not work alone.
Usage
For Input1 and Output1
Markup Renders as
  {{Recipe item
    | Name     = Steam hi
    | Quantity = 2
    | Time     = 10
  }}
For Input2-6 and Output2-6:
Markup Renders as
  {{Recipe item
    | Name      = Steam hi
    | Quantity  = 2
    | Time      = 10
    | Plus      = yes
  }}
For Mechanical power and Electricity:
Markup Renders as
  {{Recipe item
    | Name      = Electricity
    | Quantity  = 2
    | Unit      = MW
  }}
 
Electricity.png
2 MW
For overwriting plus icon and/or icon size:
Markup Renders as
  {{Recipe item
    | Name      = Steam hi
    | Quantity  = 2
    | Time      = 10
    | Plus      = [[File:Unity.png|32x32px]]
    | ImageSize = 24x24px
  }}
When Name is empty:
Markup Renders as
  {{Recipe item
    | Name      = 
    | Quantity  = 2
    | Time      = 10
  }}
The reason this template cannot be used alone
Template: Recipe draw has the following 2 codes to define its style. These codes are omitted from Template:Recipe item.
  • <templatestyles src="Template:Recipe draw/styles.css" />
  • <div class="recipe-wrapper>