Template:I/doc

From Immortal Life Wiki
Jump to navigation Jump to search

Description

Used to display the image icon for an item, as well as a link to the corresponding item. By hovering over the icon, a tooltip displays the name of the icon.

Syntax

{{I|<1>|size=|tip=}}

Clean
{{I|}}
  • <1> - the name of an item, case sensitive (based on the name of the image icon)
  • size - the size group of the item, default is medium, leave blank if default

Note: You can also have a second parameter <2> to specify the in-game name. For example, if you need to specify the in-game name of a book, but the wiki's image icon name is different, you can allow it to use the wiki's icon name and still link to the in-game name. See sample usage below.

Sample usage

{{I|Anima Fruit|size=small}} {{I|Anima Fruit}}

Results in... Anima Fruit
Anima Fruit Anima Fruit
Anima Fruit

Different tooltip text

{{I|Ginger|tip=Ginger Crop}}

Ginger
Ginger

Size groups

This template uses a standard set of size groups for its images.

text
Text sized images are designed to be display inline with text. Any image that is currently coded to be less than 36px in size will automatically be converted to this size group. There are default stylings that can be overridden on an image by image basis to give the following features.
  • Default height of 26px; designed to be as big as possible without offsetting line heights noticeably.
  • Adjusts the vertical positioning so the images appear level with text.
  • Create a uniform horizontal padding between images and text, ideally around 3 pixels.
  • Prevent word wrapping from happening between images and text without a space character between them.
header
Header sized (h2 and h3) images are designed to be displayed inline with headers. Default height of 40px.
small
Small images are designed to be displayed as small icons without the extra inline text features. Default height of 30px.
medium
Medium images are designed to be displayed as normal icons. Any image that is currently coded to be less than 56px in size will automatically be converted to medium. Default height of 50px.
large
Large images are designed to be displayed as large icons. Any image that is currently coded to be less than 81px in size will automatically be converted to large. Default height of 75px.


If absolutely necessary a manual pixel size can be supplied by overriding the size groups. To do so just add an "o" after the "px" (ie: 34pxo).