Template:ImageLink

From Straftat Wiki
Revision as of 23:02, 9 December 2024 by Administrator (talk | contribs) (basic)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template allows you to add images on top of links.

The element will be an inline block, meaning several can appear in one line. You can give them all a specific width and height to get a nice consistent layout.


Standard width/height is 150:

{{ImageLink | AK.png | AK | AK}}
{{ImageLink | GLock.png | Glock | Glock}}
{{ImageLink | Passive Feature Generic Icon.png | Feats | Just a test with very very long text }}

Result:

AK

Limiting width only; note this may cause the text to clip as seen here:

{{ImageLink | AK.png | AK | AK | w = 50 }}
{{ImageLink | GLock.png | Glock | Glock | w = 50 }}

Result:

AK

Limiting height only:

{{ImageLink | AK.png | AK | AK | h = 50 }}
{{ImageLink | GLock.png | Glock | Glock | h = 50 }}

Result:

AK

Limiting width and height:

{{ImageLink | AK.png | AK | AK | w = 50 | h = 50 }}
{{ImageLink | GLock.png | Glock | Glock | w = 50 | h = 50 }}

Result:

AK

You might have noticed the text is often too wide for the icon... You can specify a font size:

{{ImageLink | AK.png | AK | w = 80 | h = 80 | font size = 80% }}
{{ImageLink | GLock.png | Glock | Glock | w = 80 | h = 80 | font size = 80% }}

Result:

AK