More actions
No edit summary |
HiddenDragon (talk | contribs) Use template demo |
||
(2 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
| class = {{{class|}}} | | class = {{{class|}}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
Displays a link with an icon. | |||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| caption 1 = Default | |||
| <nowiki>{{IconLink | Flourish Icon.png | Flourish }}</nowiki> | |||
| caption 2 = Custom link text | |||
| <nowiki>{{IconLink | Flourish Icon.png | Flourish | Custom Text }}</nowiki> | |||
}} | |||
The default size is {{code|x40px}} meaning the icon is scaled until the '''height''' is 40 px. It's usually important to limit the height since the icons are used inline, and a very high inline image makes for an unpleasant text layout. | The default size is {{code|x40px}} meaning the icon is scaled until the '''height''' is 40 px. It's usually important to limit the height since the icons are used inline, and a very high inline image makes for an unpleasant text layout. | ||
Line 25: | Line 26: | ||
An alternative value for the height can be provided via the {{code|size}} or {{code|h}} parameters, which are synonyms: | An alternative value for the height can be provided via the {{code|size}} or {{code|h}} parameters, which are synonyms: | ||
{{Template demo | |||
| style = table | |||
| <nowiki>{{IconLink | size = 25 | Flourish Icon.png | Flourish }}</nowiki> | |||
| <nowiki>{{IconLink | size = 25 | Flourish Icon.png | Flourish | Custom Text }}</nowiki> | |||
| <nowiki>{{IconLink | Missing Icon 123.png | Flourish | Custom Text | size = 30}}</nowiki> | |||
}} | |||
{{IconLink | Missing Icon 123.png | Flourish | Custom Text | size = 30 }} | |||
The width can be set via the {{code|w}} parameter. This could be useful if several elements are supposed to align vertically for design purposes, such as in the following table shown on our main page as of the writing of this documentation. This also uses the {{code|block}} and {{code|gap}} parameters. View the source of this page for usage. | The width can be set via the {{code|w}} parameter. This could be useful if several elements are supposed to align vertically for design purposes, such as in the following table shown on our main page as of the writing of this documentation. This also uses the {{code|block}} and {{code|gap}} parameters. View the source of this page for usage. | ||
Line 65: | Line 61: | ||
| The number you add to your rolls based on whether you have [[Proficiency]]. | | The number you add to your rolls based on whether you have [[Proficiency]]. | ||
|} | |} | ||
== Template parameters == | == Template parameters == | ||
Line 122: | Line 116: | ||
"description": "Insert a linked icon." | "description": "Insert a linked icon." | ||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
[[Category:Templates]] | |||
[[Category:Icon templates]] | |||
[[Category:Link templates]] | |||
</noinclude> |