From Dark and Darker Wiki

Revision as of 23:50, 14 August 2024 by Raw Salad (talk | contribs) (Changed nested if to a switch statement that emulates if, elif, else structure. Added capacity to control link behavior in both the caption and the image.)

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|Weapons}}Accessing Weapons.png
{{Iconbox|Arming Sword|image=Armingsword_1.png}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|caption=Foobar|link=Falchion}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|caption=Foobar|link=Falchion|nolink=1}}
Armingsword 1.png
Foobar
{{Iconbox|Arming Sword|image=Armingsword_1.png|caption=Foobar}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|caption=no}}
Arming Sword
{{Iconbox|Arming Sword|image=Armingsword_1.png|top=Foobar}}

{{Iconbox|Arming Sword|image=Armingsword_1.png|rarity=-1}}
{{Iconbox|Arming Sword|image=Arming Sword 0.png|rarity=0}}
{{Iconbox|Arming Sword|image=Arming Sword 1.png|rarity=1}}
{{Iconbox|Arming Sword|image=Arming Sword 2.png|rarity=2}}
{{Iconbox|Arming Sword|image=Arming Sword 3.png|rarity=3}}
{{Iconbox|Arming Sword|image=Arming Sword 4.png|rarity=4}}
{{Iconbox|Arming Sword|image=Arming Sword 5.png|rarity=5}}
{{Iconbox|Arming Sword|image=Arming Sword 6.png|rarity=6}}
{{Iconbox|Arming Sword|image=Arming Sword 7.png|rarity=7}}
{{Iconbox|Arming Sword|image=Adventurer Boots Ruby Silver.png|rarity=Ruby Silver}}
{{Iconbox|Frock|image=Frock Cobalt.png|rarity=4}}

{{Iconbox|Arming Sword|image=Armingsword_1.png|nolink=1}}
Armingsword 1.png
Arming Sword
{{Iconbox|Arming Sword|image=Armingsword_1.png|size=30px}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|size=x30px}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|size=30px|nobr=1}}
{{Iconbox|Arming Sword|image=Armingsword_1.png|size=30px|nobr=1|top=Foobar}}
{{Iconbox|Rubysilver Ore|size=30px|amount=5|top=Foobar}}

Other Options

The maxwidth option lets you restrain text that would otherwise be very long:

{{Iconbox|Arming Sword|image=Armingsword_1.png|size=60px|top=This text is quite long but maxwidth restrains it|maxwidth=120px}}

Arming Sword
This text is quite long but maxwidth restrains itArming Sword

Without max width:

Arming Sword
This text is quite long but maxwidth restrains itArming Sword