Template:IconLink: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><span style="display: inline-flex; align-items: | <includeonly><span style="display: inline-flex; height: {{{h|{{{size|40}}}}}}px; align-items: center;">[[File:{{{1}}} | frameless | link = {{{2}}} |{{{w|}}}x{{{h|{{{size|40}}}}}}px| {{{2}}} ]] [[ {{{2}}} |{{{ 3 |{{{ 2 }}} }}} ]]</span></includeonly><noinclude> | ||
Usage: {{code|<nowiki>{{IconLink|Flourish Icon.png|Flourish}}</nowiki>}} | Usage: {{code|<nowiki>{{IconLink|Flourish Icon.png|Flourish}}</nowiki>}} | ||
Line 12: | Line 12: | ||
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. | ||
An alternative value for the height can be provided: | An alternative value for the height can be provided via the {{code|size}} or {{code|h}} parameters, which are synonyms: | ||
Usage: {{code|<nowiki>{{IconLink|Flourish Icon.png|Flourish | Usage: {{code|<nowiki>{{IconLink|size=25|Flourish Icon.png|Flourish}}</nowiki>}} | ||
Result: {{IconLink|Flourish Icon.png|Flourish|size=30}} | Result: {{IconLink|Flourish Icon.png|Flourish|size=30}} | ||
Usage: {{code|<nowiki>{{IconLink|Flourish Icon.png|Flourish|Custom Text | Usage: {{code|<nowiki>{{IconLink|size=25|Flourish Icon.png|Flourish|Custom Text}}</nowiki>}} | ||
Result: {{IconLink|Flourish Icon.png|Flourish|Custom Text|size=30}} | Result: {{IconLink|Flourish Icon.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 this table shown on our main page as of the writing of this documentation: | |||
{| class="wikitable" style="width: 50%;" | |||
! colspan="2" | Rolls | |||
|- | |||
| {{IconLink|w=20|h=20|D20.png|Attack Roll}} || The roll you make to determine whether an attack hits an enemy at all. | |||
|- | |||
| {{IconLink|w=20|h=20|D6 Thunder.png|Damage Roll}} || The roll you make to determine the amount of damage done by a successful attack. | |||
|- | |||
| {{IconLink|w=20|h=20|D20.png|Saving Throw}} || The roll you make to attempt avoiding various threats other than direct attacks. | |||
|- | |||
| {{IconLink|w=20|h=20|D20.png|Ability Check}} || The roll you make when attempting anything else that requires a roll to succeed. | |||
|- | |||
! colspan="2" | Modifiers | |||
|- | |||
| {{IconLink|w=20|h=20|Advantage_Icon.png|Advantage}} || Roll the die twice, and use the higher result. [[Disadvantage]] is the exact opposite. | |||
|- | |||
| {{IconLink|w=20|h=20|Charisma Ability Icon.png|Ability Score Modifier}} || The number you add to your rolls based on your [[Ability Scores]]. | |||
|- | |||
| {{IconLink|w=20|h=20|Proficiency Icon.png|Proficiency Bonus}} || The number you add to your rolls based on whether you have [[Proficiency]]. | |||
|} | |||
[[Category:Icon Templates]] | [[Category:Icon Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 01:12, 22 July 2023
Usage: {{IconLink|Flourish Icon.png|Flourish}}
Result: Flourish
The link text can be changed with a third parameter:
Usage: {{IconLink|Flourish Icon.png|Flourish|Custom Text}}
Result: Custom Text
The default size is 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.
An alternative value for the height can be provided via the size
or h
parameters, which are synonyms:
Usage: {{IconLink|size=25|Flourish Icon.png|Flourish}}
Result: Flourish
Usage: {{IconLink|size=25|Flourish Icon.png|Flourish|Custom Text}}
Result: Custom Text
The width can be set via the w
parameter. This could be useful if several elements are supposed to align vertically for design purposes, such as in this table shown on our main page as of the writing of this documentation:
Rolls | |
---|---|
Attack Roll | The roll you make to determine whether an attack hits an enemy at all. |
Damage Roll | The roll you make to determine the amount of damage done by a successful attack. |
Saving Throw | The roll you make to attempt avoiding various threats other than direct attacks. |
Ability Check | The roll you make when attempting anything else that requires a roll to succeed. |
Modifiers | |
Advantage | Roll the die twice, and use the higher result. Disadvantage is the exact opposite. |
Ability Score Modifier | The number you add to your rolls based on your Ability Scores. |
Proficiency Bonus | The number you add to your rolls based on whether you have Proficiency. |