Predefinição:Icon

Fonte: Terraria Wiki
Saltar para a navegação Saltar para a pesquisa
Template-info.svg Documentação A documentação que segue é transcluída de Predefinição:Icon/doc. (editar | histórico)

This template can be used to display one or more platform icons.

Note: If you only want to display a single platform icon, say, desktop, you can use {{icon|desktop}}, of course; but if in a performance-sensitive context (such as used in other templates), you should use {{icon/desktop}} (see here for all individual icon templates) directly. In addition, this also allows you to have full control over the icon size.

Usage

{{ icon | <platform 1> | <platform 2> | ... | <platform n> | nl = y (optional) | small = y (optional) }}

Unnamed parameters

See below for the list of possible values. The possible number of unnamed parameters is nearly infinite; their order is irrelevant.

nl or nolink

Removes the link from the icons. They are linked by default.

small

Reduces the icons' size to 75%.

ParâmetroDescriçãoTipoEstado
Platform1
Name of the platform
Linha
obrigatório
Platform 22
Name of an additional platform.
Linha
opcional
Platform 33
Name of an additional platform.
Linha
opcional
Platform 44
Name of an additional platform.
Linha
opcional
Platform 55
Name of an additional platform. Repeat this as many times as necessary.
Linha
opcional
Unlink iconsnl
nolink
Remove the link from the icons.
Valor automático:
True (1/y/yes)
Booliano
opcional
Reduce icon sizesmall
Reduces the icons' size to 75%.
Valor automático:
True (1/y/yes)
Booliano
opcional

Esta predefinição prefere a formatação em linha dos parâmetros.

All valid icons

Values are listed in lowercase here, but are functionally case-insensitive.

Value Icon
  • desktop
  • dsk
Versão para Computador
  • console
  • cns
Versão para Console
  • japan
  • jpc
  • jas
  • jcs
Versão para Console japonês
  • old-gen console
  • old-gen
  • oldgen
  • old
Versão para Console old-gen
  • mobile
  • mbl
Versão para Celular
  • 3ds
Versão para Nintendo 3DS
  • xbox one
  • xboxone
  • xb1
Xbox One
  • xbox 360
  • xbox360
  • xb360
Xbox 360
  • playstation
  • ps
PlayStation
  • playstation3
  • ps3
PlayStation 3
  • playstation4
  • ps4
PlayStation 4
  • psvita
  • psv
  • vita
PlayStation Vita
  • switch
Nintendo Switch
  • wiiu
Wii U
  • android
Android
  • ios
iOS & iPadOS
  • google play
  • googleplay
  • google
Google Play
  • windows phone
  • winphone
  • wp
Windows Phone
  • amazon
  • amz
  • aws
Amazon Appstore

Example

Code Result Expected result
{{icon| desktop }} Versão para Computador Versão para Computador
{{icon| desktop | console }} Versão para ComputadorVersão para Console Versão para ComputadorVersão para Console
{{icon| console | desktop }} Versão para ConsoleVersão para Computador Versão para ConsoleVersão para Computador
{{icon| desktop ||   | | console }}
(Blank parameters are irrelevant.)
Versão para ComputadorVersão para Console Versão para ComputadorVersão para Console
{{icon| dsk | 3ds | mbl | cns }} Versão para ComputadorVersão para Nintendo 3DSVersão para CelularVersão para Console Versão para ComputadorVersão para Nintendo 3DSVersão para CelularVersão para Console
{{icon| dsk | dsk | mbl }} Versão para ComputadorVersão para ComputadorVersão para Celular Versão para ComputadorVersão para ComputadorVersão para Celular
{{icon| oldgen | mobile | nl=y | small=y }} Versão para Console old-genVersão para Celular Versão para Console old-genVersão para Celular
{{icon| small=y | oldgen | nl=y | mobile }}
(Valid, but poor code readability, so not recommended.)
Versão para Console old-genVersão para Celular Versão para Console old-genVersão para Celular
All icons:
{{icon| desktop | console | japan | oldgen | mobile | 3ds }} Versão para ComputadorVersão para ConsoleVersão para Console japonêsVersão para Console old-genVersão para CelularVersão para Nintendo 3DS Versão para ComputadorVersão para ConsoleVersão para Console japonêsVersão para Console old-genVersão para CelularVersão para Nintendo 3DS
{{icon| desktop | console | japan | oldgen | mobile | 3ds | small=y }} Versão para ComputadorVersão para ConsoleVersão para Console japonêsVersão para Console old-genVersão para CelularVersão para Nintendo 3DS Versão para ComputadorVersão para ConsoleVersão para Console japonêsVersão para Console old-genVersão para CelularVersão para Nintendo 3DS

How to add new icon types

Only need to create a corresponding Template:Icon/<icon name> (its content can refer to {{icon/desktop}}). If you need to allow multiple valid parameters for it, use redirection.

For example, say, want to add a new iOS icon type:

  1. Create Template:Icon/ios (similar to {{icon/desktop}}). Note: The template name must use lowercase (i.e. not Template:icon/ios, Template:Icon/IOS or Template:Icon/Ios). That's all. Now we can use {{icon|ios}} to display an iOS icon.
  2. If you want to add a new alias parameter for it, for example, you want to allow display a iOS icon by using {{icon|iphone}}, just create a redirect page Template:Icon/iphone, and set its redirect target to Template:Icon/ios.