Difference between revisions of "Template:3rd/doc"
(Created page with "<noinclude>{{documentation subpage}}</noinclude> This is a table cell template used to fill cells of a table to indicate a third position. Useful in championship standings ta...") |
(update docs for flagicon support) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{documentation subpage}}</noinclude> | <noinclude>{{documentation subpage}}</noinclude> | ||
− | This is a table cell template used to fill cells of a table to indicate a third position. | + | This is a table cell template used to fill cells of a table to indicate a third 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 driver's name and their username, respectively. Setting parameter <code>break</code> 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 <code>streak</code>: if set to <code>start</code> the cell will have widened borders so that it is open towards the bottom, if set to <code>end</code>, it gets widened borders on sides and bottom. |
− | === Examples | + | For first and second places, use {{tl|code=1|1st}} and {{tl|code=1|2nd}}, respectively. Uses {{tl|code=1|flag icon}} internally. |
+ | |||
+ | == Usage == | ||
+ | <pre> | ||
+ | {{3rd | ||
+ | |1 = nickname | ||
+ | |2 = lfsw username | ||
+ | |flag = | ||
+ | |streak = | ||
+ | |break = | ||
+ | }} | ||
+ | </pre> | ||
+ | This template prefers inline formatting of parameters. | ||
+ | |||
+ | == Parameters == | ||
+ | {| class="wikitable" | ||
+ | |+ {{NAMESPACE}}:{{BASEPAGENAME}} parameters and basic guidelines | ||
+ | ! scope="col" | Parameter | ||
+ | ! scope="col" | Explanation | ||
+ | ! scope="col" width="271px" | Example values | ||
+ | ! scope="col" | Required? | ||
+ | |- | ||
+ | ! scope="row" | 1 | ||
+ | | Driver nickname. Unnamed parameter. | ||
+ | | {{code|Average Joe}} | ||
+ | | {{optional}} | ||
+ | |- | ||
+ | ! scope="row" | 2 | ||
+ | | Driver LFSW username. Unnamed parameter. | ||
+ | | {{code|avgjoe123}} | ||
+ | | {{optional}} | ||
+ | |- | ||
+ | ! scope="row" | flag | ||
+ | | Inserts a flag icon. If you set {{code|unknown}}, a question mark icon gets output. Hidden by default. For flag codes, see {{tl|code=1|flag icon}}. | ||
+ | | {{code|UK}}, {{code|DE}}, {{code|unknown}} | ||
+ | | {{optional}} | ||
+ | |- | ||
+ | ! scope="row" | streak | ||
+ | | Highlights beginning or end of a streak. One of the following: start, end. | ||
+ | | {{code|start}}, {{code|end}} | ||
+ | | {{optional}} | ||
+ | |- | ||
+ | ! scope="row" | break | ||
+ | | Inserts a line break between the nickname and username in the output. One of the following: true, false. | ||
+ | | {{code|true}}, {{code|false}} | ||
+ | | {{optional}} | ||
+ | |} | ||
+ | |||
+ | == Examples == | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 13: | Line 61: | ||
| {{tl|code=1|3rd}} 15 | | {{tl|code=1|3rd}} 15 | ||
| {{3rd}} 15 | | {{3rd}} 15 | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe}} | ||
+ | | {{3rd|Third Joe}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123|4=streak=start}} | ||
+ | | {{3rd|Third Joe|joethird123|streak=start}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123}} | ||
+ | | {{3rd|Third Joe|joethird123}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123|4=streak=end}} | ||
+ | | {{3rd|Third Joe|joethird123|streak=end}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123|4=flag=unknown}} | ||
+ | | {{3rd|Third Joe|joethird123|flag=unknown}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123|4=flag=AD}} | ||
+ | | {{3rd|Third Joe|joethird123|flag=AD}} | ||
+ | |- | ||
+ | | {{tl|code=1|3rd|Third Joe|joethird123|4=break=true}} | ||
+ | | {{3rd|Third Joe|joethird123|break=true}} | ||
|} | |} | ||
Latest revision as of 17:32, 7 January 2025
![]() |
This is a documentation subpage for Template:3rd.
It may contain usage information, categories and other content that is not part of the original page. |
This is a table cell template used to fill cells of a table to indicate a third 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 driver'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 first and second places, use {{1st}}
and {{2nd}}
, respectively. Uses {{flag icon}}
internally.
Usage
{{3rd |1 = nickname |2 = lfsw username |flag = |streak = |break = }}
This template prefers inline formatting of parameters.
Parameters
Parameter | Explanation | Example values | Required? |
---|---|---|---|
1 | Driver nickname. Unnamed parameter. | Average Joe
|
Optional |
2 | Driver LFSW username. Unnamed parameter. | avgjoe123
|
Optional |
flag | Inserts a flag icon. If you set unknown , a question mark icon gets output. Hidden by default. For flag codes, see {{flag icon}} .
|
UK , DE , unknown
|
Optional |
streak | Highlights beginning or end of a streak. One of the following: start, end. | start , end
|
Optional |
break | Inserts a line break between the nickname and username in the output. One of the following: true, false. | true , false
|
Optional |
Examples
What to type | What it produces |
---|---|
{{3rd}}
|
|
{{3rd}} 15
|
15 |
{{3rd|Third Joe}}
|
Third Joe |
{{3rd|Third Joe|joethird123|streak=start}}
|
Third Joe (joethird123) |
{{3rd|Third Joe|joethird123}}
|
Third Joe (joethird123) |
{{3rd|Third Joe|joethird123|streak=end}}
|
Third Joe (joethird123) |
{{3rd|Third Joe|joethird123|flag=unknown}}
|
(joethird123) | Third Joe
{{3rd|Third Joe|joethird123|flag=AD}}
|
(joethird123) | Third Joe
{{3rd|Third Joe|joethird123|break=true}}
|
Third Joe (joethird123) |