Template:VP/doc
From DominionStrategy Wiki
(Difference between revisions)
(rework to make it more usable for validating template changes) |
|||
Line 1: | Line 1: | ||
− | This | + | This template may be used to display the icon for [[Victory point|Victory points]]. |
− | ==Usage== | + | == Usage == |
− | + | <pre>{{VP|amount|size}}</pre> | |
− | + | ||
− | + | ||
− | + | DO use the template like in one of the following ways. | |
− | + | To achieve a consistent styling and line breaking behavior all other forms are not recommended. | |
+ | |||
+ | <pre> | ||
+ | {{VP}} | ||
+ | {{VP|5}} | ||
+ | {{VP|'''5'''}} | ||
+ | {{VP|+5}} | ||
+ | {{VP|'''+5'''}} | ||
+ | {{VP|5|m}} | ||
+ | {{VP|5|l}} | ||
+ | {{VP|5|xl}} | ||
+ | </pre> | ||
+ | |||
+ | == Parameters == | ||
+ | === Optional === | ||
+ | ; ''amount'' : The amount of [[Victory point|Victory points]]. Is displayed as number in front of the icon in proper size. | ||
+ | ; ''size'' : The size of icon and number. Supported sizes: m, l, xl. If omitted it is considered to be displayed inline with text. | ||
+ | |||
+ | == Implementation details == | ||
+ | * ''amount'' is cleared of font styles to prevent outer styles to be effective (mainly italics). | ||
+ | |||
+ | == Examples == | ||
+ | The following examples represent the main use cases throughout the wiki. | ||
+ | |||
+ | === Inline with text === | ||
+ | <pre>Curse's most obvious penalty is that it gives you {{VP|-1}} at the end of the game.</pre> | ||
+ | Curse's most obvious penalty is that it gives you {{VP|-1}} at the end of the game. | ||
+ | |||
+ | === Inside of infobox === | ||
+ | {{Infobox Card | ||
+ | |name = Crumbling Castle | ||
+ | |cost = 4 | ||
+ | |set = Empires | ||
+ | |type1 = Victory | ||
+ | |type2 = Castle | ||
+ | |illustrator = Julien Delval | ||
+ | |text = {{VP|1|l}} | ||
+ | |text2 = When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. | ||
+ | |nocats = 1 | ||
+ | }} | ||
+ | <pre style="overflow:auto"> | ||
+ | {{Infobox Card | ||
+ | |name = Crumbling Castle | ||
+ | |cost = 4 | ||
+ | |set = Empires | ||
+ | |type1 = Victory | ||
+ | |type2 = Castle | ||
+ | |illustrator = Julien Delval | ||
+ | |text = {{VP|1|l}} | ||
+ | |text2 = When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. | ||
+ | }} | ||
+ | </pre> | ||
+ | <div style="clear:both"></div> | ||
+ | |||
+ | {{Infobox Card | ||
+ | |name = Harem | ||
+ | |cost = 6 | ||
+ | |type1 = Treasure | ||
+ | |type2 = Victory | ||
+ | |illustrator = Maura Kalusky | ||
+ | |text = {{Cost|2|l}} | ||
+ | |text2 = {{VP|2|l}} | ||
+ | |nocats = 1 | ||
+ | }} | ||
+ | <pre style="overflow:auto"> | ||
+ | {{Infobox Card | ||
+ | |name = Harem | ||
+ | |cost = 6 | ||
+ | |type1 = Treasure | ||
+ | |type2 = Victory | ||
+ | |illustrator = Maura Kalusky | ||
+ | |text = {{Cost|2|l}} | ||
+ | |text2 = {{VP|2|l}} | ||
+ | }} | ||
+ | </pre> | ||
+ | <div style="clear:both"></div> | ||
+ | |||
+ | === Inside of version tables === | ||
+ | <pre style="overflow-x: auto"> | ||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | ! Print !! Digital !! Text | ||
+ | |- | ||
+ | | {{CardVersionImage|Crumbling Castle}} || {{CardVersionImage|Crumbling CastleDigital}} || {{VP|1|l}}{{Divline}}When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. | ||
+ | |} | ||
+ | </pre> | ||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | ! Print !! Digital !! Text | ||
+ | |- | ||
+ | | {{CardVersionImage|Crumbling Castle}} || {{CardVersionImage|Crumbling CastleDigital}} || {{VP|1|l}}{{Divline}}When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. | ||
+ | |} | ||
+ | |||
+ | <pre style="overflow-x: auto"> | ||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | ! Print !! Digital !! Text | ||
+ | |- | ||
+ | | {{CardLangVersionImage|o=1}} || {{CardLangVersionImage|d=1|o=1}} || style="padding:0px 30px;"| {{Cost|2|l}}<br>{{VP|2|l}} | ||
+ | |- | ||
+ | | {{CardLangVersionImage}} || {{CardLangVersionImage|d=1}} || {{Cost|2|l}}{{Divline}}{{VP|2|l}} | ||
+ | |} | ||
+ | </pre> | ||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | ! Print !! Digital !! Text | ||
+ | |- | ||
+ | | {{CardLangVersionImage|o=1|n=Harem}} || {{CardLangVersionImage|d=1|o=1|n=Harem}} || style="padding:0px 30px;"| {{Cost|2|l}}<br>{{VP|2|l}} | ||
+ | |- | ||
+ | | {{CardLangVersionImage|n=Harem}} || {{CardLangVersionImage|d=1|n=Harem}} || {{Cost|2|l}}{{Divline}}{{VP|2|l}} | ||
+ | |} | ||
+ | |||
+ | == Backwards compatibility == | ||
+ | The following table shows legacy forms of how this template is used throughout the wiki. | ||
+ | Changes to this template should be backwards compatible to these legacy forms. | ||
+ | Otherwise one has to update all instances over the whole wiki or accept broken styles. | ||
+ | |||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | ! Legacy form !! style="width: 100px" | Rendered !! style="width: 100px" | Recommended | ||
+ | |- | ||
+ | | <pre>5{{VP}}</pre> || 5{{VP}} || {{VP|5}} | ||
+ | |- | ||
+ | | <pre>{{nowrap|5{{VP}}}}</pre> || {{nowrap|5{{VP}}}} || {{VP|5}} | ||
+ | |- | ||
+ | | <pre>'''5'''{{VP}}</pre> || '''5'''{{VP}} || {{VP|'''5'''}} | ||
+ | |- | ||
+ | | <pre>'''5{{VP}}'''</pre> || '''5{{VP}}''' || {{VP|'''5'''}} | ||
+ | |- | ||
+ | | <pre>{{nowrap|'''5'''{{VP}}}}</pre> || {{nowrap|'''5'''{{VP}}}} || {{VP|'''5'''}} | ||
+ | |- | ||
+ | | <pre>{{VP|'''5'''|l}}</pre> || {{VP|'''5'''|l}} || {{VP|5|l}} | ||
+ | |- | ||
+ | | <pre>'''{{VP|5|l}}'''</pre> || '''{{VP|5|l}}''' || {{VP|5|l}} | ||
+ | |- | ||
+ | | <pre>{{nowrap|{{VP|'''5'''|l}}}}</pre> || {{nowrap|{{VP|'''5'''|l}}}} || {{VP|5|l}} | ||
+ | |} |
Revision as of 12:19, 21 August 2022
This template may be used to display the icon for Victory points.
Contents |
Usage
{{VP|amount|size}}
DO use the template like in one of the following ways. To achieve a consistent styling and line breaking behavior all other forms are not recommended.
{{VP}} {{VP|5}} {{VP|'''5'''}} {{VP|+5}} {{VP|'''+5'''}} {{VP|5|m}} {{VP|5|l}} {{VP|5|xl}}
Parameters
Optional
- amount
- The amount of Victory points. Is displayed as number in front of the icon in proper size.
- size
- The size of icon and number. Supported sizes: m, l, xl. If omitted it is considered to be displayed inline with text.
Implementation details
- amount is cleared of font styles to prevent outer styles to be effective (mainly italics).
Examples
The following examples represent the main use cases throughout the wiki.
Inline with text
Curse's most obvious penalty is that it gives you {{VP|-1}} at the end of the game.
Curse's most obvious penalty is that it gives you -1 at the end of the game.
Inside of infobox
Crumbling Castle | |
---|---|
Info | |
Cost | |
Type(s) | Victory - Castle |
Kingdom card? | Yes |
Set | Empires |
Illustrator(s) | Julien Delval |
Card text | |
1 When you gain or trash this, +1 and gain a Silver. |
{{Infobox Card |name = Crumbling Castle |cost = 4 |set = Empires |type1 = Victory |type2 = Castle |illustrator = Julien Delval |text = {{VP|1|l}} |text2 = When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. }}
Harem | |
---|---|
Info | |
Cost | |
Type(s) | Treasure - Victory |
Kingdom card? | Yes |
Set | Intrigue |
Illustrator(s) | Maura Kalusky |
Card text | |
2 |
{{Infobox Card |name = Harem |cost = 6 |type1 = Treasure |type2 = Victory |illustrator = Maura Kalusky |text = {{Cost|2|l}} |text2 = {{VP|2|l}} }}
Inside of version tables
{| class="wikitable" style="text-align:center;" ! Print !! Digital !! Text |- | {{CardVersionImage|Crumbling Castle}} || {{CardVersionImage|Crumbling CastleDigital}} || {{VP|1|l}}{{Divline}}When you gain or trash this, {{VP|'''+1'''}} and gain a Silver. |}
Digital | Text | |
---|---|---|
1 When you gain or trash this, +1 and gain a Silver. |
{| class="wikitable" style="text-align:center;" ! Print !! Digital !! Text |- | {{CardLangVersionImage|o=1}} || {{CardLangVersionImage|d=1|o=1}} || style="padding:0px 30px;"| {{Cost|2|l}}<br>{{VP|2|l}} |- | {{CardLangVersionImage}} || {{CardLangVersionImage|d=1}} || {{Cost|2|l}}{{Divline}}{{VP|2|l}} |}
Digital | Text | |
---|---|---|
2 | ||
2 |
Backwards compatibility
The following table shows legacy forms of how this template is used throughout the wiki. Changes to this template should be backwards compatible to these legacy forms. Otherwise one has to update all instances over the whole wiki or accept broken styles.