Template:Icon link inline/doc: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
(→‎Parameters: changed width parameter to size, will use width for something else)
(aligning icons of different widths)
Line 7: Line 7:
; size
; size
: Optional. Icon width, in pixels. Default: 18.
: Optional. Icon width, in pixels. Default: 18.
; width
: Optional. Width of space that icon will be centered in. Used for aligning icons of different widths. Default: Same as size parameter.
; link
; link
: Required. Page to link to.
: Required. Page to link to.
Line 12: Line 14:
: Optional. Text to display. Default: Same as link parameter.
: Optional. Text to display. Default: Same as link parameter.


==Example==
==Examples==
=== Basic use ===
<pre>
<pre>
{{icon link inline
{{icon link inline
Line 26: Line 29:
| text = Accurate Defense Debuff
| text = Accurate Defense Debuff
}}
}}
=== 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>

Revision as of 16:37, 6 April 2022

This is a documentation subpage for Template:Icon link inline (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

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.
size
Optional. Icon width, in pixels. Default: 18.
width
Optional. Width of space that icon will be centered in. Used for aligning icons of different widths. Default: Same as size parameter.
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
}}

Accurate Defense Debuff

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
}}