Template:InlineIcon

From Cosmoteer Wiki
Jump to navigation Jump to search


Template documentation
View or edit this documentation. (About template documentation)
CalloutIconNote.pngNote
Portions of the template sample may not be visible without values provided.

Usage

Basic

{{InlineIcon|Steel_Icon.png}}
<!--or-->
{{InlineIcon|filename=Steel_Icon.png}}

Steel Icon.png or Steel Icon.png

Custom icon height

Allows to set custom height in pixels to the icon.

60 pixels in height

CalloutIconNote.pngNote
The size of the icon doesn't affect the spacing between the nearby text, regardless of the icon size.

If wanted, it can enabled. The the next section for details.

{{InlineIcon|Steel_Icon.png|height=60}}

Some text above.

This is the icon Steel Icon.png somewhere inside the text.

The text that's after.

CalloutIconNote.pngInfo
Extra text has been added for this example.

60 pixels in height, but with vertical offset negation disabled

This allows for the icon to offset the text above/below it, preventing overlap of large icons with text.

{{InlineIcon|Steel_Icon.png|height=60|negate vertical offset=0}}

Some text above.

This is the icon Steel Icon.png somewhere inside the text.

The text that's after.

CalloutIconNote.pngInfo
Extra text has been added for this example.

Labels

Allows to add any text to one or both sides of the icon.

Left label

{{InlineIcon|Steel_Icon.png|left label=Steel}}

SteelSteel Icon.png

Right label

{{InlineIcon|Steel_Icon.png|right label=Steel}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel}}

Steel Icon.pngSteel or Steel Icon.pngSteel

With both labels

{{InlineIcon|Steel_Icon.png|left label=Go for it!|right label=I'm a total Steel!}}

Go for it!Steel Icon.pngI'm a total Steel!

Label gap

Allows to add spacing between the icon and the label

{{InlineIcon|Steel_Icon.png|Steel|label gap=10px}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel|gap=10px}}

<!-- with both labels -->
{{InlineIcon|Steel_Icon.png|left label=Steel|right label=METAL METAL METAL|gap=10px}}

Steel Icon.pngSteel or Steel Icon.pngSteel

<!-- with both labels -->

SteelSteel Icon.pngMETAL METAL METAL

Bold labels

To make labels bold, use this option:

{{InlineIcon|Steel_Icon.png|Steel|bold=1}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel|b=1}}

Steel Icon.pngSteel or Steel Icon.pngSteel

Links

Allows to add a link to both icon and the labels (if present).

Link to Steel

{{InlineIcon|Steel_Icon.png|link=Steel}}

Steel Icon.png

Link to Steel with labels

<!-- right label only -->
{{InlineIcon|Steel_Icon.png|Steel|link=Steel}}
<!-- left label only -->
{{InlineIcon|Steel_Icon.png|left label=Steel|link=Steel}}
<!-- both labels -->
{{InlineIcon|Steel_Icon.png|left label=Steel|right label=METAL METAL METAL|link=Steel}}

<!-- right label only -->

Steel Icon.pngSteel

<!-- left label only -->

SteelSteel Icon.png

<!-- both labels -->

SteelSteel Icon.pngMETAL METAL METAL

External links

{{InlineIcon|Discord emoji - Bus.webp|link=https://discord.gg/cosmoteer|external link=1}} 
<!--or-->
{{InlineIcon|Discord emoji - Bus.webp|link=https://discord.gg/cosmoteer|elink=1}}

<!--with left label only-->
{{InlineIcon|Discord emoji - Bus.webp|left label=Our Dicord server|link=https://discord.gg/cosmoteer|elink=1}}
<!--with right label only-->
{{InlineIcon|Discord emoji - Bus.webp|Our Dicord server|link=https://discord.gg/cosmoteer|elink=1}}
<!--with both labels-->
{{InlineIcon|Discord emoji - Bus.webp|left label=Our Dicord server|right label=Come in now :)|link=https://discord.gg/cosmoteer|elink=1}}

Discord emoji - Bus.webp

<!--or-->

Discord emoji - Bus.webp


<!--with left label only-->

Our Dicord serverDiscord emoji - Bus.webp

<!--with right label only-->

Discord emoji - Bus.webpOur Dicord server

<!--with both labels-->

Our Dicord serverDiscord emoji - Bus.webpCome in now :)

Wrapping

Forced to wrap Go for it!Steel Icon.pngI'm a total Steel! mid sentence - doesn't break.

Usage within other markup

In a table

Inline in a table cell, inside other text. Renders the same way.

In a table cell Go for it!Steel Icon.pngI'm a total Steel! being inline


Inline in a table cell, on its own. Renders the same way.

Go for it!Steel Icon.pngI'm a total Steel!

Adds the given image into text as an icon (just a small image). Allows adding labels on both sides, turning the icon (and the labels) into links, controlling how the vertical offset behaves on larger icons. The default icon size is 22px.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Filenamefilename 1

Icon filename

Example
Widgets menu down.png
Filerequired
Label (left)left label

A label to add to the left of the icon.

Lineoptional
Label (right)right label 2

A label to add to the right of the icon.

Lineoptional
Boldbold b

Whether to make the label text bold.

Auto value
0
Booleansuggested
Label gaplabel gap gap

Spacing between icon and labels.

Auto value
0px
Stringsuggested
Linklink 3

Adds a link to the icon. If there are labels, turns them into links too.

Page nameoptional
External link?external link elink

If set, the link parameter will be assumed to be an external link, correctly formatting the result.

Auto value
0
Booleanoptional
Icon height (px)height

Icon height in pixels.

Default
22
Auto value
22
Numberoptional
Negate vertical offsetnegate vertical offset

If disabled, the icon will offset the text vertically if its height is larger than 18 pixels.

Default
true
Booleanoptional