Jump to content

Template:Icon: Difference between revisions

From The Petit Planet Wiki
ReisuDesign (talk | contribs)
Created page with "<includeonly><!-- --><span {{#if:{{{top-left|}}}{{{top-right|}}}{{{bottom-left|}}}{{{bottom-right|}}}|class="icon-corner"}}><!-- -->[[File:{{#if:{{{customfile|}}}|{{{customfile}}}|{{{type|Icon}}} {{{file|{{{1|}}}}}}.{{{ext|png}}}}}|{{{size|{{{2|20}}}}}}px|link=|class={{{class|}}}]]<!-- -->{{#if:{{{top-left|}}}|<span <!-- -->{{#if:{{{top-left-style|}}}|style="{{{top-left-style|}}}"}} class="icon-corner-top-left"<!-- -->>{{{top-left|}}}<!-- --></span>}..."
 
ReisuDesign (talk | contribs)
No edit summary
 
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><span {{#if:{{{top-left|}}}{{{top-right|}}}{{{bottom-left|}}}{{{bottom-right|}}}|class="icon-corner"}}><!--
--><span {{#if:{{{top-left|}}}{{{top-right|}}}{{{bottom-left|}}}{{{bottom-right|}}}|class="icon-corner"}}><!--
   -->[[File:{{#if:{{{customfile|}}}|{{{customfile}}}|{{{type|Icon}}} {{{file|{{{1|}}}}}}.{{{ext|png}}}}}|{{{size|{{{2|20}}}}}}px|link=|class={{{class|}}}]]<!--
   -->[[File:{{#if:{{{customfile|}}}|{{{customfile}}}|{{{file|{{{1|}}}}}} {{{type|Icon}}}.{{{ext|png}}}}}|{{{size|{{{2|20}}}}}}px|link=|class={{{class|}}}]]<!--
   -->{{#if:{{{top-left|}}}|<span <!--
   -->{{#if:{{{top-left|}}}|<span <!--
       -->{{#if:{{{top-left-style|}}}|style="{{{top-left-style|}}}"}} class="icon-corner-top-left"<!--
       -->{{#if:{{{top-left-style|}}}|style="{{{top-left-style|}}}"}} class="icon-corner-top-left"<!--

Latest revision as of 14:01, 31 August 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.

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[Edit template data]

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]