Template:CSSCounter
From Dragon Mania Legends (DML) Wiki
Template documentation |
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this template's documentation. (About template documentation) |
Examples
Example 1
{{CSSCounter| <!--1-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>1 {{i|Dragon Pieces}}}} <!--2-->{{CalDay|yellow|{{i|Gold|i|40}}<br><br>4,000{{modifier}}}} <!--3-->{{CalDay|purple|{{i|Food|i|40}}<br><br>2,000{{modifier}}|vip=VIP}} <!--4-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>2 {{i|Dragon Pieces}}}} <!--5-->{{CalDay|yellow|{{i|Food|i|40}}<br><br>4,000{{modifier}}}} <!--6-->{{CalDay|purple|[[File:Three-Card Pack.png|40px]]<br>{{spacer|5}}1|VIP=VIP}} <!--7-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>15}} <!--8-->{{CalDay|yellow|[[File:Legendary Habitat.png|100px]]<br><br>}} <!--9-->{{CalDay|purple|{{i|Dragon Fury Essence|i|35}}<br><br>2|vip=VIP}} <!--10-->{{CalDay|blue|{{i|Dragon Piece Ticket|i|50}}<br><br>10}} <!--11-->{{CalDay|yellow|[[File:Quartern Dragon.png|150px|link=Quartern Dragon]]}} <!--12-->{{CalDay|purple|{{i|Food|i|40}}<br><br>10,000{{modifier}}|vip=VIP}} <!--13-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>50}} <!--14-->{{CalDay|yellow|{{i|VIP Ticket|i|50}}<br><br>2}} <!--15-->{{CalDay|purple|[[File:Plasma Dragon.png|100px|link=Plasma Dragon]]<br>{{spacer|5}}|vip=VIP}} <!--16-->{{CalDay|blue|[[File:Rare Chest.png|50px|link=Enchantment Chests]]<br>{{spacer|5}}1}} <!--17-->{{CalDay|yellow|{{i|Portal Energy||25}}<br><br>20}} <!--18-->{{CalDay|purple|{{i|Tyrant Ticket (Grey)|i|45}}<br><br>10|vip=VIP}} <!--19-->{{CalDay|blue|[[File:Five-Card Pack.png|40px]]<br>{{spacer|5}}1}} <!--20-->{{CalDay|yellow|{{i|Enchantment Ticket|i|50}}<br><br>2}} <!--21-->{{CalDay|purple|{{i|Relic of Hatching|i|45}}<br><br>2|vip=VIP}} }}
Result:
Notes:
- Most icons can be standardized at 40 pixels, e.g.,
{{i|Gold|i|40}}
, though Dragon Fury Essence must be 35. - Most pages need two breaks
<br><br>
in a row after the image, and before the text. - In cases where the image is large or fit is awkward, one
<br>
is used followed by{{spacer|5}}
(a 5px spacer). - Vertical Dragon images may need to be scaled down.
{{modifier}}
is entered after anything needing the Level Modifier notation.- Ideally, it's about keeping the images somewhat uniform, not too high, or too low.
- Days marked as VIP need the
|vip=VIP
parameter.
Example 2 (Plain Text Counter)
{{CSSCounter|name=1| {{CounterItem|1}} This is my content. <br> {{CounterItem|1}} Some more content. <br> }}
Result:
Some more content.
Example 3 (2 counters in text)
Using {{CounterItem|1}} counters {{CounterItem|1}} works {{CounterItem|1}} even if {{CounterItem|1}} they never {{CounterItem|1}} got a {{CounterItem|1}} reset. And the {{CounterItem|2}} same goes {{CounterItem|2}} for {{CounterItem|2}} Counter2.
Result:
Using counters works even if they never got a reset. And the same goes for Counter2.
Example 4 (same counter twice)
Further, the CSSCounter template, more specifically, allows for two-part events using the same counter, on the same page. See the next example for continuing numbering of the same counter in two separated blocks.
'''Part 1:''' {{CSSCounter| <!--1-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>1 {{i|Dragon Pieces}}}} <!--2-->{{CalDay|yellow|{{i|Gold|i|40}}<br><br>4,000{{modifier}}}} <!--3-->{{CalDay|purple|{{i|Food|i|40}}<br><br>2,000{{modifier}}|vip=VIP}} <!--4-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>2 {{i|Dragon Pieces}}}} <!--5-->{{CalDay|yellow|{{i|Food|i|40}}<br><br>4,000{{modifier}}}} <!--6-->{{CalDay|purple|[[File:Three-Card Pack.png|40px]]<br>{{spacer|5}}1|VIP=VIP}} <!--7-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>15}} }} '''Part 2:''' {{CSSCounter| <!--1-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>1 {{i|Dragon Pieces}}}} <!--2-->{{CalDay|yellow|{{i|Gold|i|40}}<br><br>4,000{{modifier}}}} <!--3-->{{CalDay|purple|{{i|Food|i|40}}<br><br>2,000{{modifier}}|vip=VIP}} <!--4-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>2 {{i|Dragon Pieces}}}} <!--5-->{{CalDay|yellow|{{i|Food|i|40}}<br><br>4,000{{modifier}}}} <!--6-->{{CalDay|purple|[[File:Three-Card Pack.png|40px]]<br>{{spacer|5}}1|VIP=VIP}} <!--7-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>15}} }}
Result:
Part 1:
Part 2:
Example 5 (Same Counter, Used Twice, Start # Override)
In the case that the same counter needs to be broken into two separate blocks with content in between, with the start number for second set is to be overridden, the following example allows for this:
'''Part 1:''' {{CSSCounter| <!--1-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>1 {{i|Dragon Pieces}}}} <!--2-->{{CalDay|yellow|{{i|Gold|i|40}}<br><br>4,000{{modifier}}}} <!--3-->{{CalDay|purple|{{i|Food|i|40}}<br><br>2,000{{modifier}}|vip=VIP}} <!--4-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>2 {{i|Dragon Pieces}}}} <!--5-->{{CalDay|yellow|{{i|Food|i|40}}<br><br>4,000{{modifier}}}} <!--6-->{{CalDay|purple|[[File:Three-Card Pack.png|40px]]<br>{{spacer|5}}1|VIP=VIP}} <!--7-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>15}} }} '''Part 2:''' {{CSSCounter|start=7| <!--8-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>1 {{i|Dragon Pieces}}}} <!--9-->{{CalDay|yellow|{{i|Gold|i|40}}<br><br>4,000{{modifier}}}} <!--10-->{{CalDay|purple|{{i|Food|i|40}}<br><br>2,000{{modifier}}|vip=VIP}} <!--11-->{{CalDay|blue|[[File:Cheerleader Dragon.png|80px|link=Cheerleader Dragon]]<br>2 {{i|Dragon Pieces}}}} <!--12-->{{CalDay|yellow|{{i|Food|i|40}}<br><br>4,000{{modifier}}}} <!--13-->{{CalDay|purple|[[File:Three-Card Pack.png|40px]]<br>{{spacer|5}}1|VIP=VIP}} <!--14-->{{CalDay|blue|{{i|Gems|i|40}}<br><br>15}} }}
Result:
Part 1:
Part 2:
See Also
Counter (and reset), to set counters and be able to have more than one set of counters per page. Also serves as counter reset when blank.
Parameter | Description | Type | Status | |
---|---|---|---|---|
(Optional) content | 1 | Used to add content or create a clear/reset | String | optional |
(Optional, counter) name | 2 name | If a new counter name is required to apply multiple counters to the same page, set a lowercase name to be applied.
| String | optional |
(Optional, from number) start | start | To set the start number to a number other than zero (so it starts at one), use this field.
| Number | optional |