Difference between revisions of "LFS Manual:Template index"

From LFS Manual
Jump to navigationJump to search
m
(→‎Formatting: +LFSW stats link, LFSW races link, plain link)
 
(23 intermediate revisions by 2 users not shown)
Line 8: Line 8:
  
 
== Article namespace ==
 
== Article namespace ==
 +
 +
=== Formatting ===
 +
 +
{{see also|Help:Formatting}}
 +
 +
{| class="wikitable"
 +
|-
 +
! What to type !! What it produces !! Description
 +
|-
 +
| {{tl|code=1|Abbr|UK|United Kingdom}}
 +
| {{Abbr|UK|United Kingdom}}
 +
| Abbreviation
 +
|-
 +
| {{tl|code=1|folder|C:|LFS|data|mods|vehicles}}
 +
| {{folder|C:|LFS|data|mods|vehicles}}
 +
| Folder
 +
|-
 +
| {{tl|code=1|key press|Ctrl|Shift|F}}
 +
| {{key press|Ctrl|Shift|F}}
 +
| Key press
 +
|-
 +
| {{tl|code=1|code|console.log('hello')}}
 +
| {{code|console.log('hello')}}
 +
| Source code
 +
|-
 +
| {{tl|code=1|kbd|71077345}}
 +
| {{kbd|71077345}}
 +
| Keyboard input, use for LFS-commands too
 +
|-
 +
| {{tl|code=1|samp|[A]bort, [R]etry, [F]ail?}}
 +
| {{samp|[A]bort, [R]etry, [F]ail?}}
 +
| Example program output
 +
|-
 +
| {{tl|code=1|var|isGood}}
 +
{{tl|code=1|var serif|isGood}}
 +
| {{var|isGood}}
 +
{{var serif|isGood}}
 +
| Program variable
 +
|-
 +
| {{tl|code=1|old button|save}}
 +
{{tl|code=1|old button|save|#a1a1ff}}
 +
|
 +
{{old button|save}}
 +
{{old button|save|#a1a1ff}}
 +
| LFS button (old style)
 +
|-
 +
| {{tl|code=1|button|save}}
 +
{{tl|code=1|button|save|light}}
 +
| {{button|save}}
 +
{{button|save|light}}
 +
| LFS button
 +
|-
 +
| {{tl|code=1|option|one|two|three}}
 +
| {{option|one|two|three}}
 +
| Option (group of buttons)
 +
|-
 +
| {{tl|code=1|car link|XFG}}
 +
| {{car link|XFG}}
 +
| Link to car page using the car's abbreviation
 +
|-
 +
| {{tl|code=1|steps|First|Second|Third}}
 +
| {{steps|First|Second|Third}}
 +
| An ordered list useful for step-by-step instructions
 +
|-
 +
| {{tl|code=1|quote|Cry "Havoc" and let slip the dogs of war.|William Shakespeare|''Julius Caesar'', act III, scene I}}
 +
| {{quote|Cry "Havoc" and let slip the dogs of war.|William Shakespeare|''Julius Caesar'', act III, scene I}}
 +
| Block quote
 +
|-
 +
| {{tl|code=1|driver|Fastest Joe|joeuser123|4=laptime=1:24.75}}
 +
| {{driver|Fastest Joe|joeuser123|laptime=1:24.75}}
 +
| LFS player with username
 +
|-
 +
| {{tl|code=1|LFSW stats link|joeuser123}}
 +
| {{LFSW stats link|joeuser123}}
 +
| Link to a user's LFSW stats (Online Racer Stats)
 +
|-
 +
| {{tl|code=1|LFSW races link|joeuser123}}
 +
| {{LFSW races link|joeuser123}}
 +
| Link to a user's LFSW race results (Online Race Results)
 +
|-
 +
| {{tl|code=1|plain link|2=url=<nowiki>https://www.lfs.net/</nowiki>|3=name=LFS Website}}
 +
| {{plain link|url=https://www.lfs.net/|name=LFS Website}}
 +
| External link appearing as an interwiki link (without the blue external link icon)
 +
|}
  
 
=== Maintenance ===
 
=== Maintenance ===
Line 15: Line 99:
 
! What to type !! What it produces !! Where to put it
 
! What to type !! What it produces !! Where to put it
 
|-
 
|-
{{tlrow|historical}}
+
| {{tl|historical|code=1}}
 +
| {{historical|nocat=1}}
 
| Top
 
| Top
 
|-
 
|-
| {{tl|proposed deletion}}
+
| {{tl|proposed deletion|code=1}}
 
| {{proposed deletion|nocat=1}}
 
| {{proposed deletion|nocat=1}}
 
| Top
 
| Top
 
|-
 
|-
| {{tl|under construction}}
+
| {{tl|under construction|code=1}}
 
| {{under construction|nocat=1}}
 
| {{under construction|nocat=1}}
 
| Top
 
| Top
 
|}
 
|}
  
== Template namespace ==
+
=== Layout ===
 +
 
 +
{| class="wikitable"
 +
|-
 +
! What to type !! What it produces !! Description
 +
|-
 +
| {{tl|box|box content|code=1}}
 +
<code><nowiki>{{</nowiki>box|box content|border=red|bg=yellow|padding=8px<nowiki>}}</nowiki></code>
 +
| {{box|box content}}
 +
{{box|box content|border=red|bg=yellow|padding=8px}}
 +
| Box with a border, customisable colors and padding
 +
|-
 +
| {{tl|list item box|Getting started|Introduction|code=1}}
 +
| {{list item box|Getting started|Introduction}}
 +
| An {{code|<nowiki><li></nowiki>}} element used as a part of a list on a dashboard-style page
 +
|-
 +
| {{tl|code=1|shared repository category|XF GTR}}
 +
| {{shared repository category|XF GTR}}
 +
| Indicates the existence of media related to the article, over on the shared repository. Place it bottom right (after the last content section, but before the navbox template), or bottom left (when content vs. infobox length ratio is bad)
 +
|}
 +
 
 +
=== Message box ===
 +
 
 +
{| class="wikitable"
 +
|-
 +
! What to type !! What it produces !! Description
 +
|-
 +
|
 +
<nowiki>{{</nowiki>[[Template:Mbox|mbox]]
 +
<nowiki>|</nowiki> text = The message body text.
 +
<nowiki>}}</nowiki>
 +
| {{mbox|text=The message body text.}}
 +
| A box with a message
 +
|-
 +
|
 +
<nowiki>{{</nowiki>[[Template:Mbox|mbox]]
 +
<nowiki>|</nowiki> type = warning
 +
<nowiki>|</nowiki> text = The message body text.
 +
<nowiki>}}</nowiki>
 +
| {{mbox|type=warning|text=The message body text.}}
 +
| A box with a warning message
 +
|-
 +
|
 +
<nowiki>{{</nowiki>[[Template:Mbox|mbox]]
 +
<nowiki>|</nowiki> type = notice
 +
<nowiki>|</nowiki> text = The message body text.
 +
<nowiki>}}</nowiki>
 +
| {{mbox|type=notice|text=The message body text.}}
 +
| A box with a notice message
 +
|-
 +
|
 +
<nowiki>{{</nowiki>[[Template:Mbox|mbox]]
 +
<nowiki>|</nowiki> type = tip
 +
<nowiki>|</nowiki> text = The message body text.
 +
<nowiki>}}</nowiki>
 +
| {{mbox|type=tip|text=The message body text.}}
 +
| A box with a tip message
 +
|-
 +
|
 +
<nowiki>{{</nowiki>[[Template:Mbox|mbox]]
 +
<nowiki>|</nowiki> small = yes
 +
<nowiki>|</nowiki> text = The message body text.
 +
<nowiki>}}</nowiki>
 +
| {{mbox|small=yes|text=The message body text.}}
 +
| A box with a message in small text
 +
|}
 +
 
 +
=== Hatnotes ===
 +
 
 +
{| class="wikitable"
 +
|-
 +
! What to type !! What it produces !! Description
 +
|-
 +
| {{tl|code=1|hatnote|This is a hatnote.}}
 +
| {{hatnote|This is a hatnote.}}
 +
| A helpful message placed at the top of the article or a section.
 +
|-
 +
| {{tl|code=1|further|LFS Editor}}
 +
| {{further|LFS Editor}}
 +
| A link to an article explaining the topic in more detail.
 +
|-
 +
| {{tl|code=1|see also|Options}}
 +
| {{see also|Options}}
 +
| A link to an article about a related topic.
 +
|-
 +
| {{tl|code=1|see also external|<nowiki>https://en.lfsmanual.net</nowiki> LFS Manual}}
 +
| {{see also external|https://en.lfsmanual.net LFS Manual}}
 +
| A link to an external web page about a related topic.
 +
|}
 +
 
 +
=== Tables ===
 +
{| class="wikitable" style="text-align:left;"
 +
|+ Table cell templates
 +
! colspan=2 | Default
 +
! colspan=2 | Fully customized
 +
|-
 +
! Syntax !! Preview
 +
! Syntax !! Preview
 +
|-
 +
| {{tl|code=1|yes}}
 +
| {{yes}}
 +
| {{tl|code=1|yes|Customized text}}
 +
| {{yes|Customized text}}
 +
|-
 +
| {{tl|code=1|yes C}}
 +
| {{yes C}}
 +
| {{tl|code=1|yes C|Customized text}}
 +
| {{yes C|Customized text}}
 +
|-
 +
| {{tl|code=1|no}}
 +
| {{no}}
 +
| {{tl|code=1|no|Customized text}}
 +
| {{no|Customized text}}
 +
|-
 +
| {{tl|code=1|no X}}
 +
| {{no X}}
 +
| {{tl|code=1|no X|Customized text}}
 +
| {{no X|Customized text}}
 +
|-
 +
| {{tl|code=1|partial}}
 +
| {{partial}}
 +
| {{tl|code=1|partial|Customized text}}
 +
| {{partial|Customized text}}
 +
|-
 +
| {{tl|code=1|maybe}}
 +
| {{maybe}}
 +
| {{tl|code=1|maybe|Customized text}}
 +
| {{maybe|Customized text}}
 +
|-
 +
| {{tl|code=1|optional}}
 +
| {{optional}}
 +
| {{tl|code=1|optional|Customized text}}
 +
| {{optional|Customized text}}
 +
|-
 +
| {{tl|code=1|planned}}
 +
| {{planned}}
 +
| {{tl|code=1|planned|Customized text}}
 +
| {{planned|Customized text}}
 +
|-
 +
| {{tl|code=1|TBA}}
 +
| {{TBA}}
 +
|
 +
|
 +
|-
 +
| {{tl|code=1|TBD}}
 +
| {{TBD}}
 +
|
 +
|
 +
|-
 +
| {{tl|code=1|unknown}}
 +
| {{unknown}}
 +
| {{tl|code=1|unknown|Customized text}}
 +
| {{unknown|Customized text}}
 +
|-
 +
| {{tl|code=1|N/A}}
 +
| {{N/A}}
 +
| {{tl|code=1|N/A|Customized text}}
 +
| {{N/A|Customized text}}
 +
|-
 +
| {{tl|code=1|bonus}}
 +
| {{bonus}}
 +
| {{tl|code=1|bonus|+15}} or <code>{{tl|bonus}} +15</code>
 +
| {{bonus|+15}}
 +
|-
 +
| {{tl|code=1|pen}}
 +
| {{pen}}
 +
| {{tl|code=1|pen|-4}} or <code>{{tl|pen}} -4</code>
 +
| {{pen|-4}}
 +
|-
 +
| {{tl|code=1|1st}}
 +
| {{1st}}
 +
| {{tl|code=1|1st|Winner Joe|joewin123}}
 +
| {{1st|Winner Joe|joewin123}}
 +
|-
 +
| {{tl|code=1|2nd}}
 +
| {{2nd}}
 +
| {{tl|code=1|2nd|Second Joe|joesecond123}}
 +
| {{2nd|Second Joe|joesecond123}}
 +
|-
 +
| {{tl|code=1|3rd}}
 +
| {{3rd}}
 +
| {{tl|code=1|3rd|Third Joe|joethird123}}
 +
| {{3rd|Third Joe|joethird123}}
 +
|-
 +
| {{tl|code=1|XRR cell}}
 +
| {{XRR cell}}
 +
| {{tl|code=1|XRR cell|XR2}} or <code>{{tl|XRR cell}} XR2</code>
 +
| {{XRR cell|XR2}}
 +
|-
 +
| {{tl|code=1|FXR cell}}
 +
| {{FXR cell}}
 +
| {{tl|code=1|FXR cell|FX2}} or <code>{{tl|FXR cell}} FX2</code>
 +
| {{FXR cell|FX2}}
 +
|-
 +
| {{tl|code=1|FZR cell}}
 +
| {{FZR cell}}
 +
| {{tl|code=1|FZR cell|FZ2}} or <code>{{tl|FZR cell}} FZ2</code>
 +
| {{FZR cell|FZ2}}
 +
|-
 +
| {{tl|code=1|XFR cell}}
 +
| {{XFR cell}}
 +
| {{tl|code=1|XFR cell|XFR}} or <code>{{tl|XFR cell}} XFR</code>
 +
| {{XFR cell|XFR}}
 +
|-
 +
| {{tl|code=1|UFR cell}}
 +
| {{UFR cell}}
 +
| {{tl|code=1|UFR cell|UFR}} or <code>{{tl|UFR cell}} UFR</code>
 +
| {{UFR cell|UFR}}
 +
|}
 +
 
 +
== Category namespace ==
 +
 
 +
=== Hatnotes ===
 +
 
 +
{| class="wikitable"
 +
|-
 +
! What to type !! What it produces !! Description
 +
|-
 +
| {{tl|code=1|cat main|Main Page}}
 +
| {{cat main|Main Page}}
 +
| Link to the main page of a category article.
 +
|}

Latest revision as of 14:31, 17 September 2024

TemplateIconUnderConstruction.png This page or section is being initially created, or is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it.

This page provides an index of templates used within LFS Manual. They are grouped into topic-specific headings.

A more comprehensive category system may also be viewed at Category:Templates or you can view All pages (Template namespace).

Article namespace

Formatting

See also: Help:Formatting
What to type What it produces Description
{{Abbr|UK|United Kingdom}} UK Abbreviation
{{folder|C:|LFS|data|mods|vehicles}} C:\LFS\data\mods\vehicles Folder
{{key press|Ctrl|Shift|F}} Ctrl + ⇧ Shift + F Key press
{{code|console.log('hello')}} console.log('hello') Source code
{{kbd|71077345}} 71077345 Keyboard input, use for LFS-commands too
{{samp|[A]bort, [R]etry, [F]ail?}} [A]bort, [R]etry, [F]ail? Example program output
{{var|isGood}}

{{var serif|isGood}}

isGood

isGood

Program variable
{{old button|save}}

{{old button|save|#a1a1ff}}

save save

LFS button (old style)
{{button|save}}

{{button|save|light}}

save

save

LFS button
{{option|one|two|three}} one two three Option (group of buttons)
{{car link|XFG}} XFG Link to car page using the car's abbreviation
{{steps|First|Second|Third}}
  1. 1First
  2. 2Second
  3. 3Third
An ordered list useful for step-by-step instructions
{{quote|Cry "Havoc" and let slip the dogs of war.|William Shakespeare|Julius Caesar, act III, scene I}}
Cry "Havoc" and let slip the dogs of war.
—William Shakespeare, Julius Caesar, act III, scene I
Block quote
{{driver|Fastest Joe|joeuser123|laptime=1:24.75}} 1:24.75 | Fastest Joe (joeuser123) LFS player with username
{{LFSW stats link|joeuser123}} joeuser123 Link to a user's LFSW stats (Online Racer Stats)
{{LFSW races link|joeuser123}} joeuser123 Link to a user's LFSW race results (Online Race Results)
{{plain link|url=https://www.lfs.net/|name=LFS Website}} LFS Website External link appearing as an interwiki link (without the blue external link icon)

Maintenance

What to type What it produces Where to put it
{{historical}}
TemplateIconHistorical.png This page or section contains outdated information, but is kept for historical reasons.
Top
{{proposed deletion}}
Caution.png It is proposed that this article be deleted.
Top
{{under construction}}
TemplateIconUnderConstruction.png This page or section is being initially created, or is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it.
Top

Layout

What to type What it produces Description
{{box|box content}}

{{box|box content|border=red|bg=yellow|padding=8px}}

box content
box content
Box with a border, customisable colors and padding
{{list item box|Getting started|Introduction}}
  • Getting started
    Introduction
  • An <li> element used as a part of a list on a dashboard-style page
    {{shared repository category|XF GTR}}
    Gallery icon.png

    Shared repository has media related to XF GTR.

    Indicates the existence of media related to the article, over on the shared repository. Place it bottom right (after the last content section, but before the navbox template), or bottom left (when content vs. infobox length ratio is bad)

    Message box

    What to type What it produces Description
    {{mbox
    | text = The message body text.
    }}
    
    Information icon4.png The message body text.
    A box with a message
    {{mbox
    | type = warning
    | text = The message body text.
    }}
    
    Caution.png The message body text.
    A box with a warning message
    {{mbox
    | type = notice
    | text = The message body text.
    }}
    
    Information icon4.png The message body text.
    A box with a notice message
    {{mbox
    | type = tip
    | text = The message body text.
    }}
    
    Bulbgraph.png The message body text.
    A box with a tip message
    {{mbox
    | small = yes
    | text = The message body text.
    }}
    
    Information icon4.png The message body text.
    A box with a message in small text

    Hatnotes

    What to type What it produces Description
    {{hatnote|This is a hatnote.}}
    This is a hatnote.
    A helpful message placed at the top of the article or a section.
    {{further|LFS Editor}}
    Further information: LFS Editor
    A link to an article explaining the topic in more detail.
    {{see also|Options}}
    See also: Options
    A link to an article about a related topic.
    {{see also external|https://en.lfsmanual.net LFS Manual}}
    See also: LFS Manual
    A link to an external web page about a related topic.

    Tables

    Table cell templates
    Default Fully customized
    Syntax Preview Syntax Preview
    {{yes}} Yes {{yes|Customized text}} Customized text
    {{yes C}}  Yes {{yes C|Customized text}}  Customized text
    {{no}} No {{no|Customized text}} Customized text
    {{no X}}  No {{no X|Customized text}}  Customized text
    {{partial}} Partial {{partial|Customized text}} Customized text
    {{maybe}} Maybe {{maybe|Customized text}} Customized text
    {{optional}} Optional {{optional|Customized text}} Customized text
    {{planned}} Planned {{planned|Customized text}} Customized text
    {{TBA}} TBA
    {{TBD}} TBD
    {{unknown}} Unknown {{unknown|Customized text}} Customized text
    {{N/A}} N/A {{N/A|Customized text}} Customized text
    {{bonus}} {{bonus|+15}} or {{bonus}} +15 +15
    {{pen}} {{pen|-4}} or {{pen}} -4 -4
    {{1st}} {{1st|Winner Joe|joewin123}} Winner Joe (joewin123)
    {{2nd}} {{2nd|Second Joe|joesecond123}} Second Joe (joesecond123)
    {{3rd}} {{3rd|Third Joe|joethird123}} Third Joe (joethird123)
    {{XRR cell}} {{XRR cell|XR2}} or {{XRR cell}} XR2 XR2
    {{FXR cell}} {{FXR cell|FX2}} or {{FXR cell}} FX2 FX2
    {{FZR cell}} {{FZR cell|FZ2}} or {{FZR cell}} FZ2 FZ2
    {{XFR cell}} {{XFR cell|XFR}} or {{XFR cell}} XFR XFR
    {{UFR cell}} {{UFR cell|UFR}} or {{UFR cell}} UFR UFR

    Category namespace

    Hatnotes

    What to type What it produces Description
    {{cat main|Main Page}}
    Main article: Main Page
    Link to the main page of a category article.