Template:Ribbons: Difference between revisions

added right aligned option
No edit summary
(added right aligned option)
Line 2: Line 2:
#switch: {{{3}}}
#switch: {{{3}}}
   | 2 = <div style="position: absolute; left: {{#expr:({{{2}}}/2.48)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
   | 2 = <div style="position: absolute; left: {{#expr:({{{2}}}/2.48)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
      -->[[File:Award-goldstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
  | 2r = <div style="position: absolute; left: {{#expr:({{{2}}}/1.4)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
       -->[[File:Award-goldstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
       -->[[File:Award-goldstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
   | 3 = <div style="position: absolute; left: {{#expr:({{{2}}}/5)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
   | 3 = <div style="position: absolute; left: {{#expr:({{{2}}}/5)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
Line 22: Line 24:
       -->[[File:Award-goldstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
       -->[[File:Award-goldstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
   | 6 = <div style="position: absolute; left: {{#expr:({{{2}}}/2.48)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
   | 6 = <div style="position: absolute; left: {{#expr:({{{2}}}/2.48)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
      -->[[File:Award-silverstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
  | 6r = <div style="position: absolute; left: {{#expr:({{{2}}}/1.4)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
       -->[[File:Award-silverstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
       -->[[File:Award-silverstar.png|{{#expr:({{{2}}}/5) round 0}}px|link=File:{{{1}}}]]</div>
   | 7 = <div style="position: absolute; left: {{#expr:({{{2}}}/5)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
   | 7 = <div style="position: absolute; left: {{#expr:({{{2}}}/5)}}px; top: {{#expr:({{{2}}}/16)}}px; padding: 0;"><!--
Line 87: Line 91:


{{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|100|7}}
{{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|100|7}}
===Right-aligned single star===
Some service ribbons such as the Explorer’s Ribbon and the Gold and Silver Lifesaving Ribbons have a special design in the center. If you don't want to block it with your star, use '''2r''' and '''6r''' to display a gold (2 citations) and silver star (6 citations) respectively, aligned to the right of the ribbon's center.
For instance,
<pre>{{Ribbons|Awards ServiceRibbons LifesavingSilver 2011.jpg|100|2r}}</pre>
gives you
{{Ribbons|Awards ServiceRibbons LifesavingSilver 2011.jpg|100|2r}}


The template currently supports up to 11 citations of the same service ribbon, and yes, you can use this template to also display a single citation of the ribbon as well by leaving off the last number or putting a 1.
The template currently supports up to 11 citations of the same service ribbon, and yes, you can use this template to also display a single citation of the ribbon as well by leaving off the last number or putting a 1.
Line 101: Line 116:
!2
!2
| {{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|120|2}}
| {{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|120|2}}
|-
!2r
| {{Ribbons|Awards ServiceRibbons LifesavingSilver 2011.jpg|120|2}}
|-
|-
!3
!3
Line 109: Line 127:
|-
|-
!5
!5
| {{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|120|5}}
| {{Ribbons|Awards ServiceRibbons LifesavingGold 2011.jpg|120|5}}
|-
|-
!6
!6
| {{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|120|6}}
| {{Ribbons|Awards ServiceRibbons SilverStar 2011.jpg|120|6}}
|-
!6r
| {{Ribbons|Awards ServiceRibbons Explorers 2011.jpg|120|2}}
|-
|-
!7
!7