Wiki

Template:Stars: Difference between revisions

From 2D Tower Wiki
This page was last edited on 7 September 2026, at 22:27.
Add reusable five-star rating template
 
Spell TOWER for five-star ratings
 
Line 1: Line 1:
<noinclude>
<noinclude>
Displays a five-star rating using the iconset. The positional parameter is the number of filled stars, from 0 to 5.
Displays a five-star rating using the iconset. The positional parameter is the number of filled stars, from 0 to 5. A five-star rating spells <code>TOWER</code> using the special star sprites.


Usage: <code>{{Stars|3}}</code>
Usage: <code>{{Stars|3}}</code>
</noinclude><includeonly><span class="rating-stars" aria-label="{{{1|0}}} out of 5 stars">{{#ifexpr:{{{1|0}}} >= 1|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 2|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 3|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 4|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 5|{{Icon|star}}|{{Icon|star_empty}}}}</span></includeonly>
</noinclude><includeonly><span class="rating-stars" aria-label="{{{1|0}}} out of 5 stars">{{#ifexpr:{{{1|0}}} = 5|{{Icon|star_5t}}{{Icon|star_5o}}{{Icon|star_5w}}{{Icon|star_5e}}{{Icon|star_5r}}|{{#ifexpr:{{{1|0}}} >= 1|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 2|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 3|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 4|{{Icon|star}}|{{Icon|star_empty}}}}{{#ifexpr:{{{1|0}}} >= 5|{{Icon|star}}|{{Icon|star_empty}}}}}}</span></includeonly>

Latest revision as of 22:27, 7 September 2026

Displays a five-star rating using the iconset. The positional parameter is the number of filled stars, from 0 to 5. A five-star rating spells TOWER using the special star sprites.

Usage: