Template:Bar: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 15: Line 15:
|12=I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=blue>ııııiıııı</font>Iııııiııı
|12=I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=#00bb00>ııııiııı</font>I<font color=blue>ııııiıııı</font>Iııııiııı
}}{{#switch: {{#expr: floor ( {{{n|{{{1|1234}}} }}} * 100 / {{{goal|2000}}} ) mod 10 }}
}}{{#switch: {{#expr: floor ( {{{n|{{{1|1234}}} }}} * 100 / {{{goal|2000}}} ) mod 10 }}
|0=<font color=blue>I</font>
|0=<font color=blue>I</font>....:....!
|1=I<font color=blue>ı</font>...:....!
|1=I<font color=blue>ı</font>...:....!
|2=I<font color=blue>ıı</font>..:....!
|2=I<font color=blue>ıı</font>..:....!

Revision as of 00:24, 4 February 2014


IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIı...:....!....:....!....:....!....:....!
1234 new score pages this year out of 2000 annual goal (61.7%)

Creates a bar representing the fraction "<n> <things> out of <goal> <after>". The label defaults are

n=1234
things=new score pages this year
goal=2000
after=annual goal

Normally this template might be invoked with something like:

{{Bar|{{NewWorkCount}} }}
{{Bar|{{#expr: 1+ {{#time: z }}}}|goal=365|things=days elapsed out of|after=}}

These invocations produce:

IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiı...!
1930 new score pages this year out of 2000 annual goal (96.5%)
IııııiııııIııııiııııIııııiııııIııııiııı.!....:....!....:....!....:....!....:....!....:....!....:....!
140 days elapsed out of out of 365 (38.35%)


{{Bar|n=977|goal=800|things=oboes available|after=needed}}

produces:

IııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiıııIııııiııııIııııiıııIıı..:....!
977 oboes available out of 800 needed (122.12%)

Note the green color for the 100% already attained.

{{Bar|n=37|goal=60|things=tenors recruited|after=positions available}}

produces:

IııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIııııiııııIı...:....!....:....!....:....!....:....!
37 tenors recruited out of 60 positions available (61.66%)