Template:Infobox item: Difference between revisions
Appearance
Vorlagen-Geruest |
Ausgabe einzeilig: keine leeren Absaetze mehr |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><div class="hs-infobox"> | <includeonly><div class="hs-infobox"><div class="hs-infobox__title">{{{name|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}|<div class="hs-infobox__image">[[File:{{{image}}}|96px|link=|{{{name|{{PAGENAME}}}}}]]</div>}}<table>{{#if:{{{type|}}}|<tr><th>Type</th><td>{{{type}}}</td></tr>}}{{#if:{{{source|}}}|<tr><th>Source</th><td>{{{source}}}</td></tr>}}{{#if:{{{tool|}}}|<tr><th>Obtained with</th><td>{{{tool}}}</td></tr>}}{{#if:{{{stack|}}}|<tr><th>Stack size</th><td>{{{stack}}}</td></tr>}}{{#if:{{{sell|}}}|<tr><th>Sell price</th><td>{{{sell}}}</td></tr>}}{{#if:{{{restores|}}}|<tr><th>Restores</th><td>{{{restores}}}</td></tr>}}{{#if:{{{craftedat|}}}|<tr><th>Crafted at</th><td>{{{craftedat}}}</td></tr>}}{{#if:{{{id|}}}|<tr><th>Item ID</th><td><code>{{{id}}}</code></td></tr>}}</table></div></includeonly><noinclude> | ||
<div class="hs-infobox__title">{{{name|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}| | |||
<div class="hs-infobox__image">[[File:{{{image}}}|96px|link=|{{{name|{{PAGENAME}}}}}]]</div>}} | |||
<table> | |||
{{#if:{{{type|}}}|<tr><th>Type</th><td>{{{type}}}</td></tr>}} | |||
{{#if:{{{source|}}}|<tr><th>Source</th><td>{{{source}}}</td></tr>}} | |||
{{#if:{{{tool|}}}|<tr><th>Obtained with</th><td>{{{tool}}}</td></tr>}} | |||
{{#if:{{{stack|}}}|<tr><th>Stack size</th><td>{{{stack}}}</td></tr>}} | |||
{{#if:{{{sell|}}}|<tr><th>Sell price</th><td>{{{sell}}}</td></tr>}} | |||
{{#if:{{{restores|}}}|<tr><th>Restores</th><td>{{{restores}}}</td></tr>}} | |||
{{#if:{{{craftedat|}}}|<tr><th>Crafted at</th><td>{{{craftedat}}}</td></tr>}} | |||
{{#if:{{{id|}}}|<tr><th>Item ID</th><td><code>{{{id}}}</code></td></tr>}} | |||
</table> | |||
</div></includeonly><noinclude> | |||
Infobox for a single item. Every parameter is optional — empty ones leave no row. | Infobox for a single item. Every parameter is optional — empty ones leave no row. | ||
| Line 31: | Line 18: | ||
<code>id</code> is the item id used in the game code — keep it in sync with | <code>id</code> is the item id used in the game code — keep it in sync with | ||
<code>src/i18n/en.ts</code>, it is what the planned wiki generator matches on. | <code>src/i18n/en.ts</code>, it is what the planned wiki generator matches on. | ||
The rendered part is a single line on purpose: line breaks inside the template | |||
turn into empty paragraphs above the table. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 01:48, 31 July 2026
Infobox for a single item. Every parameter is optional — empty ones leave no row.
{{Infobox item
| name = Oak Log
| image = Oak Log.png
| type = Resource
| source = Chopping oak trees
| tool = [[Axe]]
| stack = 99
| sell = 12
| craftedat =
| id = oak_log
}}
id is the item id used in the game code — keep it in sync with
src/i18n/en.ts, it is what the planned wiki generator matches on.
The rendered part is a single line on purpose: line breaks inside the template turn into empty paragraphs above the table.