Template: Infobox STAline: Difference between revisions

From The Shire
Jump to: navigation, search
Taxcuts (talk | contribs)
No edit summary
Taxcuts (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:


<tr>
<tr>
<th colspan="2" style="text-align:center; font-size:150%; padding: 0.2em 0.4em; background-color:{{{color|#cccccc}}}; color:{{#ifexpr: (0.2126 * 0x{{#sub:{{{color|#cccccc}}}|1|2}}) + (0.7152 * 0x{{#sub:{{{color|#cccccc}}}|3|2}}) + (0.0722 * 0x{{#sub:{{{color|#cccccc}}}|5|2}}) > 149 | #000 | #fff}};">
<th colspan="2" style="text-align:center; font-size:150%; background-color:{{{color|#cccccc}}}; color:{{{text_color|#000}}};">
{{{name|Unnamed Line}}}
{{{name|Unnamed Line}}}
</th>
</th>
Line 15: Line 15:


<tr>
<tr>
<th colspan="2" style="text-align:center; padding: 0.2em 0.4em; background-color:{{{color|#cccccc}}}; color:{{#ifexpr: (0.2126 * 0x{{#sub:{{{color|#cccccc}}}|1|2}}) + (0.7152 * 0x{{#sub:{{{color|#cccccc}}}|3|2}}) + (0.0722 * 0x{{#sub:{{{color|#cccccc}}}|5|2}}) > 149 | #000 | #fff}};">
<th colspan="2" style="text-align:center; background-color:{{{color|#cccccc}}}; color:{{{text_color|#000}}};">
Overview
Overview
</th>
</th>
Line 33: Line 33:
<td>{{{status|Operational}}}</td>
<td>{{{status|Operational}}}</td>
</tr>
</tr>
{{#if:{{{locale|}}}|
{{#if:{{{serves|}}}|
<tr>
<tr>
<th>Locale</th>
<th>Serves</th>
<td>{{{locale}}}</td>
<td>{{{serves}}}</td>
</tr>
</tr>
}}
}}


<tr>
<tr>
<th colspan="2" style="text-align:center; padding: 0.2em 0.4em; background-color:{{{color|#cccccc}}}; color:{{#ifexpr: (0.2126 * 0x{{#sub:{{{color|#cccccc}}}|1|2}}) + (0.7152 * 0x{{#sub:{{{color|#cccccc}}}|3|2}}) + (0.0722 * 0x{{#sub:{{{color|#cccccc}}}|5|2}}) > 149 | #000 | #fff}};">
<th colspan="2" style="text-align:center; background-color:{{{color|#cccccc}}}; color:{{{text_color|#000}}};">
Route
Route
</th>
</th>
Line 70: Line 70:


<tr>
<tr>
<th colspan="2" style="text-align:center; padding: 0.2em 0.4em; background-color:{{{color|#cccccc}}}; color:{{#ifexpr: (0.2126 * 0x{{#sub:{{{color|#cccccc}}}|1|2}}) + (0.7152 * 0x{{#sub:{{{color|#cccccc}}}|3|2}}) + (0.0722 * 0x{{#sub:{{{color|#cccccc}}}|5|2}}) > 149 | #000 | #fff}};">
<th colspan="2" style="text-align:center; background-color:{{{color|#cccccc}}}; color:{{{text_color|#000}}};">
Operations & Technical
Operations & Technical
</th>
</th>
Line 106: Line 106:
This infobox is for individual train, metro, or other transit lines. Paste the code below onto a page and fill in the desired fields.
This infobox is for individual train, metro, or other transit lines. Paste the code below onto a page and fill in the desired fields.


=== About the `color` Parameter ===
=== Color Parameters ===
The `color` parameter sets the background color for all headers. You must use a 6-digit hexadecimal code, including the `#`. The template will automatically set the text color to black or white for contrast. If you leave it blank, it will default to a light grey.
* '''color''': Sets the background color for all headers. Use a 6-digit hexadecimal code (e.g., `#FF55FF`) based on the STA line color.
* '''text_color''': Manually set the text color for the headers. Use `white` for dark backgrounds and `black` for light backgrounds. It defaults to black if left blank.


=== Blank Syntax ===
=== Blank Syntax ===
Line 114: Line 115:
| name            =  
| name            =  
| color          =  
| color          =  
| text_color      =
| image          =  
| image          =  
| image_width    =  
| image_width    =  
Line 119: Line 121:
| type            =  
| type            =  
| status          =  
| status          =  
| locale         =  
| serves         =  
| start          =  
| start          =  
| end            =  
| end            =  

Latest revision as of 15:14, 8 June 2025


Usage

This infobox is for individual train, metro, or other transit lines. Paste the code below onto a page and fill in the desired fields.

Color Parameters

  • color: Sets the background color for all headers. Use a 6-digit hexadecimal code (e.g., `#FF55FF`) based on the STA line color.
  • text_color: Manually set the text color for the headers. Use `white` for dark backgrounds and `black` for light backgrounds. It defaults to black if left blank.

Blank Syntax

{{Infobox STAline
| name            = 
| color           = 
| text_color      = 
| image           = 
| image_width     = 
| system          = 
| type            = 
| status          = 
| serves          = 
| start           = 
| end             = 
| stations        = 
| line_map        = 
| opened          = 
| operator        = 
| length          = 
| electrification = 
}}