Difference between revisions of "Template:1st"

From LFS Manual
Jump to navigationJump to search
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>style="background: #ffffbf; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}"|{{#if:{{{1|}}}|'''{{{1|}}}'''}} {{#if:{{{2|}}}|{{#ifeq:{{{break}}}|true|<br>| }}({{{2|}}})}}</includeonly><noinclude>
+
<includeonly>style="background: #ffffbf; vertical-align: middle; text-align: {{{align|center}}}; {{#switch:{{{streak|}}}
 +
|start=border-top: 2px solid; border-left: 2px solid; border-right: 2px solid;
 +
|end=border-bottom: 2px solid; border-left: 2px solid; border-right: 2px solid;
 +
}}{{{style|}}}"|{{#if:{{{1|}}}|'''{{{1|}}}'''}} {{#if:{{{2|}}}|{{#ifeq:{{{break}}}|true|<br>| }}({{{2|}}})}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 19:52, 10 June 2024

Template Info-Icon.png

Template documentation

View - Edit

This is a table cell template used to fill cells of a table to indicate a winning position. When used without parameters, it's useful in championship standings tables which contain points per round for all drivers. Two optional parameters specify the winner's name and their username, respectively. Setting parameter break to true, inserts a line break between the driver name and username (might come handy in packed tables, where the horizontal space is not enough). If needed, streaks (of consecutive results of a driver, for example three wins in a row) can be highlighted by using parameter streak: if set to start the cell will have widened borders so that it is open towards the bottom, if set to end, it gets widened borders on sides and bottom.

For second and third places, use {{2nd}} and {{3rd}}, respectively.

Examples

What to type What it produces
{{1st}}
{{1st}} 25 25
{{1st|Winner Joe}} Winner Joe
{{1st|Winner Joe|joewin123|streak=start}} Winner Joe (joewin123)
{{1st|Winner Joe|joewin123}} Winner Joe (joewin123)
{{1st|Winner Joe|joewin123|streak=end}} Winner Joe (joewin123)
{{1st|Winner Joe|joewin123|break=true}} Winner Joe
(joewin123)