Jump to content

Template:Icon/doc: Difference between revisions

From The Petit Planet Wiki
ReisuDesign (talk | contribs)
Created page with "{{Documentation/Header}} {{CSS|Icon}} Template to display icons without link. ==Syntax== {{T|Icon |v1=file name without extension or Icon prefix |v2=customfile=full file name |P3=size=((XX)) |v4=top-left=content to insert in the icon's top-left corner |v5=top-left-style=inline styles to apply to the top-left icon |v6=top-right=content to insert in the icon's top-right corner |v7=top-right-style=inline styles to apply to the top-right icon |v8=bottom-left=content to inse..."
 
ReisuDesign (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{CSS|Icon}}
Template to display icons without link.
Template to display icons without link.


Line 17: Line 16:
|v11=bottom-right-style=inline styles to apply to the bottom-right icon
|v11=bottom-right-style=inline styles to apply to the bottom-right icon
|block=1}}
|block=1}}
* {{F|1}} or {{F|file}} — Value to insert as "name" in the {{F|Icon_((name)).png}} naming scheme to display as main image.
* {{F|1}} or {{F|file}} — Value to insert as "name" in the {{F|((name))_Icon.png}} naming scheme to display as main image.
** If the file to use does not follow the naming scheme, {{F|customfile}} can be used instead.
** If the file to use does not follow the naming scheme, {{F|customfile}} can be used instead.
* {{F|2}} or {{F|size}} — The icon's size. Defaults to 20px.
* {{F|2}} or {{F|size}} — The icon's size. Defaults to 20px.

Latest revision as of 23:45, 1 September 2026

This is the documentation page for Icon.
It contains usage information, categories, and other content not part of the original template page.

Template to display icons without link.

Syntax

[edit source]

{{Icon
|file name without extension or Icon prefix
|customfile = full file name
|size = XX
|top-left = content to insert in the icon's top-left corner
|top-left-style = inline styles to apply to the top-left icon
|top-right = content to insert in the icon's top-right corner
|top-right-style = inline styles to apply to the top-right icon
|bottom-left = content to insert in the icon's bottom-left corner
|bottom-left-style = inline styles to apply to the bottom-left icon
|bottom-right = content to insert in the icon's bottom-right corner
|bottom-right-style = inline styles to apply to the bottom-right icon
}}

  • 1 or file — Value to insert as "name" in the name_Icon.png naming scheme to display as main image.
    • If the file to use does not follow the naming scheme, customfile can be used instead.
  • 2 or size — The icon's size. Defaults to 20px.

Examples

[edit source]

{{Icon|size = 30|file = Dough}} yields:
{{Icon|Dough|30}} yields:
{{Icon|Hexia|class = day-invert-image}} yields:
{{Icon|customfile = Hexia Icon.png|class = day-invert-image|size = 40}} yields:

Template Data

[edit source]

Template to display icons without link.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Icon1 file

Name of file excluding prefix and extension.

Stringsuggested
Size2 size

Size of icon.

Default
20
Numberoptional
Typetype

Prefix of the file name.

Default
Icon
Stringoptional
Extensionext

File extension of icon.

Default
png
Stringoptional
Classclass

Custom class to add to file.

Example
lightmode-drop-shadow
Stringoptional
Custom Filecustomfile

Full file name to use instead value in "1".

Fileoptional
Top Lefttop-left

Content to place in top left of icon.

Unbalanced wikitextoptional
Top Righttop-right

Content to place in top right of icon.

Unbalanced wikitextoptional
Bottom Leftbottom-left

Content to place in bottom left of icon.

Unbalanced wikitextoptional
Bottom Rightbottom-right

Content to place in bottom right of icon.

Unbalanced wikitextoptional
Top Left Styletop-left-style

Additional style for "top-left" content.

Stringoptional
Top Right Styletop-right-style

Additional style for "top-right" content.

Stringoptional
Bottom Left Stylebottom-left-style

Additional style for "bottom-left" content.

Stringoptional
Bottom Right Stylebottom-right-style

Additional style for "bottom-right" content.

Stringoptional
[edit source]

See Also

[edit source]