From Brotato Wiki
(Restore min-width (I meant to remove it in a subsequent edit, not the previous one)) |
(Add more comments to improve readability; Remove max-width (as it causes some issues eg. with element overflow, and can stop text from being centered correctly with long words eg "Wheelbarrow"); Add <br> (to ensure line breaks happen, and fix issues where the line break wasn't occurring despite max-width) with an option to hide it (`nobr=1`)) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--><div class="iconbox" style="display:inline-block | --><div class="iconbox" style="display:inline-block;"><!-- | ||
ICON | |||
--><div class="rarity{{{rarity|{{Rarity|{{{1}}}}}}}} rounded relative"><!-- | --><div class="rarity{{{rarity|{{Rarity|{{{1}}}}}}}} rounded relative"><!-- | ||
-->[[File:{{{image|{{{1}}}}}}.png|{{{size|60px}}}|link={{{1}}}|{{{1}}}]]<!-- | -->[[File:{{{image|{{{1}}}}}}.png|{{{size|60px}}}|link={{{1}}}|{{{1}}}]]<!-- | ||
-->{{#if:{{{amount|}}}|<span class="iconamount">{{{amount}}}</span>|}}<!-- | -->{{#if:{{{amount|}}}|<!-- | ||
--><span class="iconamount">{{{amount}}}</span><!-- | |||
-->|}}<!-- | |||
--></div><!-- | --></div><!-- | ||
-->{{#if:{{{top|}}}|{{{top}}}< | TOP | ||
-->{{#ifeq: {{{caption}}} | no | |<!-- | -->{{#if:{{{top|}}}|<!-- | ||
-->{{#if:{{{caption|}}}|[[{{{1}}}|<strong>{{{caption}}}</strong>]]|[[{{{1}}}|<strong>{{{1}}}</strong>]]}}<!-- | -->{{#ifeq:{{{nobr}}}|1|<!--empty space (nobr)--> |<br>}}<!-- | ||
-->{{{top}}}<!-- | |||
-->|}}<!-- | |||
CAPTION | |||
-->{{#ifeq:{{{caption}}}|no|<!--no caption-->|<!-- | |||
-->{{#ifeq:{{{nobr}}}|1|<!--empty space (nobr)--> |<br>}}<!-- | |||
-->{{#if:{{{caption|}}}|<!-- | |||
CAPTION: CUSTOM | |||
-->[[{{{1}}}|<strong>{{{caption}}}</strong>]]|<!-- | |||
CAPTION: AUTO | |||
-->[[{{{1}}}|<strong>{{{1}}}</strong>]]<!-- | |||
-->}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--></div><!-- | --></div><!-- | ||
--></includeonly> | --></includeonly><noinclude> | ||
<noinclude> | |||
==Usage== | ==Usage== | ||
Line 50: | Line 62: | ||
|<code><nowiki>{{Iconbox|Acid|size=30px}}</nowiki></code> | |<code><nowiki>{{Iconbox|Acid|size=30px}}</nowiki></code> | ||
|{{Iconbox|Acid|size=30px}} | |{{Iconbox|Acid|size=30px}} | ||
|- | |||
|<code><nowiki>{{Iconbox|Acid|size=30px|nobr=1}}</nowiki></code> | |||
|{{Iconbox|Acid|size=30px|nobr=1}} | |||
|- | |||
|<code><nowiki>{{Iconbox|Acid|size=30px|nobr=1|top=Foobar}}</nowiki></code> | |||
|{{Iconbox|Acid|size=30px|nobr=1|top=Foobar}} | |||
|} | |} | ||
Revision as of 21:15, 6 November 2022
Usage
This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.
{{Iconbox|Acid|size=30px|caption=caption|amount=1|rarity=1}}
Examples
Code | Preview |
---|---|
{{Iconbox|Acid}}
|
|
{{Iconbox|Acid|amount=1}}
|
|
{{Iconbox|Acid|caption=Foobar}}
|
|
{{Iconbox|Acid|caption=no}}
|
|
{{Iconbox|Acid|top=Foobar}}
|
|
{{Iconbox|Acid|rarity=-1}}
|
|
{{Iconbox|Acid|size=30px}}
|
|
{{Iconbox|Acid|size=30px|nobr=1}}
|
|
{{Iconbox|Acid|size=30px|nobr=1|top=Foobar}}
|
Foobar Acid
|