« Modèle:Cost » : différence entre les versions

De Inkipédia
Aucun résumé des modifications
(Copie du Modèle:Cost)
Balise : Contenu remplacé
 
(3 versions intermédiaires par 3 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
{{ImageLabel|{{#switch:{{{currency|Cash}}}
<includeonly>{{#invoke:Cost|main}}</includeonly><noinclude>
|sss      = Super Sea Snail.png
Template invocation of [[Module:Cost]].
|pe      = Power Egg.png
|#default = Coins.png
}}|{{{1|}}}
|size={{{2|30px}}}|link={{#switch:{{{currency|Cash}}}
|sss      = Super Sea Snail
|pe      = Power Egg
|#default = Cash
}}
|width={{{width|auto}}}
|align={{{align|right}}}
}}<noinclude>
 
;Summary
A handy template for putting the [[Cash]], [[Super Sea Snail]] or [[Power Egg]] icon next to a price.
 
; Usage
* {{t|cost|amount}} for a simple cost in cash.  
* {{t|cost|amount|size}} makes it 24 pixels wide.
* {{t|cost|amount|currency{{=}}}} to select the currency
* {{t|cost|amount|currency{{=}}sss}} shows [[Super Sea Snail]] cost.
* {{t|cost|amount|currency{{=}}pe}} shows [[Power Egg]] cost.
 
; Examples
* <nowiki>{{Cost|400|48px}}</nowiki> gives {{Cost|400|48px}}
* <nowiki>{{Cost|1|24px|currency=sss}}</nowiki> gives {{Cost|1|24px|currency=sss}}
* <nowiki>{{Cost|300|12px|currency=pe}}</nowiki> gives {{Cost|300|12px|currency=pe}}


{{:Module:Cost/doc}}
</noinclude>
</noinclude>

Dernière version du 4 mai 2024 à 20:54

Template invocation of Module:Cost.

Displays an inline currency icon with a text link.

Usage

{{Cost|<game>|<price>|<currency>|<size>|<link>|<textwidth>}}

game Unnamed, required The game that the cost belongs to. Must be one of the following:
  • S for Splatoon
  • S2 for Splatoon 2
  • S3 for Splatoon 3
price Unnamed, required (may be empty) The quantity to show as the cost.
If set empty, the template will show the icon only.
Note that this template also accepts space (' ') which handles differently to empty.
Use 0 or Free for free items.
currency Unnamed, optional The currency to use.
The default value is cash.
Must be one of the following: S S2 S3
cash Cash Cash Cash
pe Power Eggs Power Eggs Power Egg Alternas
sss Super Sea Snails Super Sea Snails Super Sea Snails
ge Golden Eggs
sard Sardinium Shadow
ac Ability Chunks
cqp CQ Points
sl Sheldon Licenses
gsl Gold Sheldon Licenses
bs Bronze Fish Scales
ss Silver Fish Scales
gs Gold Fish Scales
mb Membuxs
pl Prlzs
size Unnamed, optional The icon size for the currency icon. The default is 24.
link Unnamed, optional If present, the amount text will be a link to the currency's page.
textwidth Unnamed, optional Requries size and link to both be present.
If specified, the label will be set inside a right-aligned rectangle of the specified width

Markup

*{{Cost|S|200}}
*{{Cost|S2|200}}
*{{Cost|S3|200}}
*{{Cost|S|}}
*{{Cost|S|1|sss}}
*{{Cost|S2||ac}}
*{{Cost|S3|160|bs}}
*{{Cost|S|200|cash|48}}
*{{Cost|S|200|cash|link}}
*{{Cost|S|200|cash|48|link}}
*{{Cost|S|200|cash|24|link|60}}
*{{Cost|S|200|cash|24| |60}}

Output

  • Cash 200
  • Cash 200
  • Cash 200
  • Cash
  • Super Sea Snail 1
  • Ability Chunks
  • Bronze Fish Scales 160
  • Cash 200
  • Cash 200
  • Cash 200
  • Cash 200
  • Cash 200