Difference between revisions of "Template:Driver/doc"
| m (→Parameters) | |||
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| <noinclude>{{documentation subpage}}</noinclude> | <noinclude>{{documentation subpage}}</noinclude> | ||
| − | 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>) - this is useful for indicating Fastest laps / Pole position laptimes in a single cell. | 
| − | 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. | + | 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}} and {{tl|code=1|LFSW stats link}} internally. | 
| == Usage == | == Usage == | ||
| Line 13: | Line 13: | ||
| |laptime       =   | |laptime       =   | ||
| |streak        =   | |streak        =   | ||
| + | |boldName      =  | ||
| + | |winner        = | ||
| + | |rookie        = | ||
| }} | }} | ||
| </pre> | </pre> | ||
| Line 41: | Line 44: | ||
| |- | |- | ||
| ! scope="row" | laptime | ! scope="row" | laptime | ||
| − | | In the context of pole positions and fastest laps, laptime of driver. Appears before the driver name, separated by a pipe symbol  | + | | 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}} | | {{optional}} | ||
| Line 48: | Line 51: | ||
| | When used as a table cell, highlights beginning or end of 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}} | ||
| + | |- | ||
| + | ! scope="row" | boldName | ||
| + | | If set to <code>yes</code>, the driver nickname will be highlighted in bold. | ||
| + | | {{code|yes}} | ||
| + | | {{optional}} | ||
| + | |- | ||
| + | ! scope="row" | link | ||
| + | | When a value is set to 0, the LFSW username will not be a link to LFS World. | ||
| + | | {{code|0}} | ||
| + | | {{optional}} | ||
| + | |- | ||
| + | ! scope="row" | winner | ||
| + | | If set to <code>yes</code>, there will be a tag next to the driver's name indicating that the driver is a former winner. | ||
| + | | {{code|yes}} | ||
| + | | {{optional}} | ||
| + | |- | ||
| + | ! scope="row" | rookie | ||
| + | | If set to <code>yes</code>, there will be a tag next to the driver's name indicating that the driver is a rookie. | ||
| + | | {{code|yes}} | ||
| | {{optional}} | | {{optional}} | ||
| |} | |} | ||
| Line 56: | Line 79: | ||
| {{markup| | {{markup| | ||
| <nowiki>{{Driver|Average Joe|avgjoe123|flag=JP}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=JP}}}}<!-- Template:Mra --> | <nowiki>{{Driver|Average Joe|avgjoe123|flag=JP}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=JP}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|avgjoe123|flag=JP|boldName=yes}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=JP|boldName=yes}}}}<!-- 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| | {{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 --> | <nowiki>{{Driver|Average Joe|avgjoe123|flag=IT|laptime=1:24.75}}</nowiki>|{{Driver|Average Joe|avgjoe123|flag=IT|laptime=1:24.75}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|avgjoe123|link=0}}</nowiki>|{{Driver|Average Joe|avgjoe123|link=0}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|winner=yes}}</nowiki>|{{Driver|Average Joe|winner=yes}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|avgjoe123|winner=yes}}</nowiki>|{{Driver|Average Joe|avgjoe123|winner=yes}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|rookie=yes}}</nowiki>|{{Driver|Average Joe|rookie=yes}}}}<!-- Template:Mra --> | ||
| + | {{markup| | ||
| + | <nowiki>{{Driver|Average Joe|avgjoe123|rookie=yes}}</nowiki>|{{Driver|Average Joe|avgjoe123|rookie=yes}}}}<!-- Template:Mra --> | ||
| <includeonly> | <includeonly> | ||
Latest revision as of 17:09, 5 July 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 (|) - this is useful for indicating Fastest laps / Pole position laptimes in a single cell.
For indicating podium positions in colored table cells, see templates {{1st}}, {{2nd}}, {{3rd}}. Uses {{flag icon}} and {{LFSW stats link}} internally.
Usage
{{Driver
|1             = nickname
|2             = lfsw username
|flag          = 
|laptime       = 
|streak        = 
|boldName      = 
|winner        =
|rookie        =
}}
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 | 
| boldName | If set to yes, the driver nickname will be highlighted in bold. | yes | Optional | 
| link | When a value is set to 0, the LFSW username will not be a link to LFS World. | 0 | Optional | 
| winner | If set to yes, there will be a tag next to the driver's name indicating that the driver is a former winner. | yes | Optional | 
| rookie | If set to yes, there will be a tag next to the driver's name indicating that the driver is a rookie. | yes | Optional | 
Examples
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123}} | Average Joe (avgjoe123) | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123|flag=JP}} | 
 Average Joe (avgjoe123)
 | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123|flag=JP|boldName=yes}} | 
 Average Joe (avgjoe123)
 | 
| 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 |  Average Joe (avgjoe123)
 | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123|link=0}} | Average Joe (avgjoe123) | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|winner=yes}} | Average Joe W | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123|winner=yes}} | Average Joe (avgjoe123) W | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|rookie=yes}} | Average Joe R | 
| Markup | Renders as | 
|---|---|
| {{Driver|Average Joe|avgjoe123|rookie=yes}} | Average Joe (avgjoe123) R | 

