Difference between revisions of "Template:Driver/doc"
From LFS Manual
Jump to navigationJump to searchm (→Parameters) |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Formats a driver name, username and laptime. It can be used in both plain text and table cells. Two optional parameters specify the driver's name and their username, respectively. If the <code>|laptime=</code> parameter is defined, it gets put in front of the driver info, separated with a vertical line (pipe) symbol (<code>|</code>). | Formats a driver name, username and laptime. It can be used in both plain text and table cells. Two optional parameters specify the driver's name and their username, respectively. If the <code>|laptime=</code> parameter is defined, it gets put in front of the driver info, separated with a vertical line (pipe) symbol (<code>|</code>). | ||
− | For indicating podium positions in colored table cells, see templates {{tl|code=1|1st}}, {{tl|code=1|2nd}}, {{tl|code=1|3rd}}. | + | For indicating podium positions in colored table cells, see templates {{tl|code=1|1st}}, {{tl|code=1|2nd}}, {{tl|code=1|3rd}}. Uses {{tl|code=1|flag icon}} internally. |
== Usage == | == Usage == | ||
Line 10: | Line 10: | ||
|1 = nickname | |1 = nickname | ||
|2 = lfsw username | |2 = lfsw username | ||
+ | |flag = | ||
|laptime = | |laptime = | ||
|streak = | |streak = | ||
Line 22: | Line 23: | ||
! scope="col" | Explanation | ! scope="col" | Explanation | ||
! scope="col" width="271px" | Example values | ! scope="col" width="271px" | Example values | ||
+ | ! scope="col" | Required? | ||
|- | |- | ||
! scope="row" | 1 | ! scope="row" | 1 | ||
| Driver nickname. Unnamed parameter. | | Driver nickname. Unnamed parameter. | ||
| {{code|Average Joe}} | | {{code|Average Joe}} | ||
+ | | {{yes}} | ||
|- | |- | ||
! scope="row" | 2 | ! scope="row" | 2 | ||
| Driver LFSW username. Unnamed parameter. | | Driver LFSW username. Unnamed parameter. | ||
| {{code|avgjoe123}} | | {{code|avgjoe123}} | ||
+ | | {{optional}} | ||
+ | |- | ||
+ | ! scope="row" | flag | ||
+ | | Inserts a flag icon. If you set {{code|unknown}}, a question mark icon is output. Hidden by default. For flag codes, see {{tl|code=1|flag icon}}. | ||
+ | | {{code|UK}}, {{code|DE}}, {{code|unknown}} | ||
+ | | {{optional}} | ||
|- | |- | ||
! scope="row" | laptime | ! scope="row" | laptime | ||
− | | In the context of pole positions and fastest laps, laptime of driver. Appears before the driver name. | + | | In the context of pole positions and fastest laps, laptime of driver. Appears before the driver name, separated by a pipe symbol. |
| {{code|1:25.32}} | | {{code|1:25.32}} | ||
+ | | {{optional}} | ||
|- | |- | ||
! scope="row" | streak | ! scope="row" | streak | ||
− | | When used as a table cell, highlights streak. One of the following: start, end. | + | | When used as a table cell, highlights beginning or end of streak. One of the following: start, end. |
| {{code|start}}, {{code|end}} | | {{code|start}}, {{code|end}} | ||
+ | | {{optional}} | ||
|} | |} | ||
Line 43: | Line 54: | ||
{{markup| | {{markup| | ||
<nowiki>{{Driver|Average Joe|avgjoe123}}</nowiki>|{{Driver|Average Joe|avgjoe123}}}}<!-- Template:Mra --> | <nowiki>{{Driver|Average Joe|avgjoe123}}</nowiki>|{{Driver|Average Joe|avgjoe123}}}}<!-- Template:Mra --> | ||
+ | {{markup| | ||
+ | <nowiki>{{Driver|Average Joe|avgjoe123|flag=JP}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=JP}}}}<!-- Template:Mra --> | ||
{{markup| | {{markup| | ||
<nowiki>{{Driver|Average Joe|avgjoe123|laptime=1:24.75}}</nowiki>|{{Driver|Average Joe|avgjoe123|laptime=1:24.75}}}}<!-- Template:Mra --> | <nowiki>{{Driver|Average Joe|avgjoe123|laptime=1:24.75}}</nowiki>|{{Driver|Average Joe|avgjoe123|laptime=1:24.75}}}}<!-- Template:Mra --> | ||
+ | {{markup| | ||
+ | <nowiki>{{Driver|Average Joe|avgjoe123|flag=IT|laptime=1:24.75}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=IT|laptime=1:24.75}}}}<!-- Template:Mra --> | ||
<includeonly> | <includeonly> |
Latest revision as of 14:23, 8 January 2025
![]() |
This is a documentation subpage for Template:Driver.
It may contain usage information, categories and other content that is not part of the original page. |
Formats a driver name, username and laptime. It can be used in both plain text and table cells. Two optional parameters specify the driver's name and their username, respectively. If the |laptime=
parameter is defined, it gets put in front of the driver info, separated with a vertical line (pipe) symbol (|
).
For indicating podium positions in colored table cells, see templates {{1st}}
, {{2nd}}
, {{3rd}}
. Uses {{flag icon}}
internally.
Usage
{{Driver |1 = nickname |2 = lfsw username |flag = |laptime = |streak = }}
This template prefers inline formatting of parameters.
Parameters
Parameter | Explanation | Example values | Required? |
---|---|---|---|
1 | Driver nickname. Unnamed parameter. | Average Joe
|
Yes |
2 | Driver LFSW username. Unnamed parameter. | avgjoe123
|
Optional |
flag | Inserts a flag icon. If you set unknown , a question mark icon is output. Hidden by default. For flag codes, see {{flag icon}} .
|
UK , DE , unknown
|
Optional |
laptime | In the context of pole positions and fastest laps, laptime of driver. Appears before the driver name, separated by a pipe symbol. | 1:25.32
|
Optional |
streak | When used as a table cell, highlights beginning or end of streak. One of the following: start, end. | start , end
|
Optional |
Examples
Markup | Renders as |
---|---|
{{Driver|Average Joe|avgjoe123}} |
Average Joe (avgjoe123) |
Markup | Renders as |
---|---|
{{Driver|Average Joe|avgjoe123|flag=JP}} |
(avgjoe123)
Average Joe |
Markup | Renders as |
---|---|
{{Driver|Average Joe|avgjoe123|laptime=1:24.75}} |
1:24.75 | Average Joe (avgjoe123) |
Markup | Renders as |
---|---|
{{Driver|Average Joe|avgjoe123|flag=IT|laptime=1:24.75}} |
1:24.75 | (avgjoe123)
Average Joe |