Template:Icon link inline/doc: Difference between revisions
Jump to navigation
Jump to search
(params) |
(→Examples: add two icons example) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
; icon | ; icon | ||
: Required. Filename of icon to display. | : Required. Filename of icon to display. | ||
; icon2 | |||
: Optional. Filename of second icon to display. Default: No second icon displayed. | |||
; size | |||
: Optional. Width of each icon, in pixels. Avoid icon heights larger than the text's line height, usually 22px. Default: 22. | |||
; width | |||
: Optional. Width of space that icon(s) will be centered in. Used for aligning icons of different widths. Default: Same as size parameter, or double size parameter if icon2 is given. | |||
; link | ; link | ||
: Required. Page to link to. | : Required. Page to link to. | ||
Line 10: | Line 16: | ||
: Optional. Text to display. Default: Same as link parameter. | : Optional. Text to display. Default: Same as link parameter. | ||
== | ==Examples== | ||
=== Basic use === | |||
<pre> | <pre> | ||
{{icon link inline | {{icon link inline | ||
Line 24: | Line 31: | ||
| text = Accurate Defense Debuff | | text = Accurate Defense Debuff | ||
}} | }} | ||
=== Two icons, one link === | |||
<pre> | |||
{{icon link inline | |||
| icon = Badge event spectral.png | |||
| icon2 = Badge event corsair.png | |||
| link = Clothes Horse Badge | |||
| text = Clothes Horse | |||
}} | |||
</pre> | |||
{{icon link inline | |||
| icon = Badge event spectral.png | |||
| icon2 = Badge event corsair.png | |||
| link = Clothes Horse Badge | |||
| text = Clothes Horse | |||
}} | |||
=== Aligning icons of different widths === | |||
<pre> | |||
* {{icon link inline | |||
| icon = Badge DayJob CareGiver.png | |||
| link = Caregiver Badge | |||
| size = 20 | |||
| width = 31 | |||
| text = Caregiver | |||
}} | |||
* {{icon link inline | |||
| icon = Badge DayJob Scholar.png | |||
| link = Professor Badge | |||
| size = 20 | |||
| width = 31 | |||
| text = Professor | |||
}} | |||
* {{icon link inline | |||
| icon = Badge DayJobAcc Doctor.png | |||
| link = Physician Badge | |||
| size = 31 | |||
| text = Physician | |||
}} | |||
</pre> | |||
* {{icon link inline | |||
| icon = Badge DayJob CareGiver.png | |||
| link = Caregiver Badge | |||
| size = 20 | |||
| width = 31 | |||
| text = Caregiver | |||
}} | |||
* {{icon link inline | |||
| icon = Badge DayJob Scholar.png | |||
| link = Professor Badge | |||
| size = 20 | |||
| width = 31 | |||
| text = Professor | |||
}} | |||
* {{icon link inline | |||
| icon = Badge DayJobAcc Doctor.png | |||
| link = Physician Badge | |||
| size = 31 | |||
| text = Physician | |||
}} | |||
<includeonly><!-- | <includeonly><!-- | ||
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. --> | ++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. --> | ||
[[Category:Link Templates]] | [[Category:Link Templates]] | ||
</includeonly> | </includeonly> |
Latest revision as of 01:51, 3 May 2022
Displays an inline icon and text link. The icon and text are combined as a single tap target.
Parameters
- icon
- Required. Filename of icon to display.
- icon2
- Optional. Filename of second icon to display. Default: No second icon displayed.
- size
- Optional. Width of each icon, in pixels. Avoid icon heights larger than the text's line height, usually 22px. Default: 22.
- width
- Optional. Width of space that icon(s) will be centered in. Used for aligning icons of different widths. Default: Same as size parameter, or double size parameter if icon2 is given.
- link
- Required. Page to link to.
- text
- Optional. Text to display. Default: Same as link parameter.
Examples
Basic use
{{icon link inline | icon = IO Accurate Defense Debuff.png | link = :Category:Sets for improving Accurate Defense Debuff | text = Accurate Defense Debuff }}
Two icons, one link
{{icon link inline | icon = Badge event spectral.png | icon2 = Badge event corsair.png | link = Clothes Horse Badge | text = Clothes Horse }}
Aligning icons of different widths
* {{icon link inline | icon = Badge DayJob CareGiver.png | link = Caregiver Badge | size = 20 | width = 31 | text = Caregiver }} * {{icon link inline | icon = Badge DayJob Scholar.png | link = Professor Badge | size = 20 | width = 31 | text = Professor }} * {{icon link inline | icon = Badge DayJobAcc Doctor.png | link = Physician Badge | size = 31 | text = Physician }}