Difference between revisions of "Module:Adjacent stations/CTrain"
blackwiki>Blaixx (Initial creation for Calgary LRT system) |
blackwiki>Blaixx (Updated station/line aliases) |
||
| Line 1: | Line 1: | ||
local cal = "%1 station (Calgary)" | local cal = "%1 station (Calgary)" | ||
| + | local sw = "[[$1 Southwest station|%1 SW]]" | ||
local p = { | local p = { | ||
| Line 10: | Line 11: | ||
["station format"] = { | ["station format"] = { | ||
"%1 station", | "%1 station", | ||
| + | ["1 Street"] = sw, | ||
| + | ["3 Street"] = sw, | ||
| + | ["4 Street"] = sw, | ||
| + | ["6 Street"] = sw, | ||
| + | ["7 Street"] = sw, | ||
| + | ["8 Street"] = sw, | ||
| + | ["10 Street"] = sw, | ||
["39 Avenue"] = cal, | ["39 Avenue"] = cal, | ||
| + | ["45 Street"] = sw, | ||
| + | ["69 Street"] = sw, | ||
["Anderson"] = cal, | ["Anderson"] = cal, | ||
["Brentwood"] = cal, | ["Brentwood"] = cal, | ||
| Line 38: | Line 48: | ||
["title"] = "[[Blue Line (Calgary)|Blue Line]]", | ["title"] = "[[Blue Line (Calgary)|Blue Line]]", | ||
["color"] = "026894", | ["color"] = "026894", | ||
| − | ["left terminus"] = "69 | + | ["left terminus"] = "69 Street", |
["right terminus"] = "Saddletowne", | ["right terminus"] = "Saddletowne", | ||
}, | }, | ||
| Line 47: | Line 57: | ||
}, | }, | ||
["aliases"] = { | ["aliases"] = { | ||
| − | [" | + | ["201"] = "Red", |
| − | [" | + | ["202"] = "Blue", |
| − | [" | + | ["203"] = "Green", |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
} | } | ||
return p | return p | ||
Revision as of 14:40, 6 July 2019
This is a data module for Module:Adjacent stations. It supports services operated by the CTrain.
Lines
Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc Template:Rail template doc
Stations
This module can be used to expand a name to link to the appropriate CTrain station article, without displaying the trailing "station". It also handles cases where more disambiguation is needed.
The template can be called using {{Station link}} or {{stl}}.
For example:
{{stl|CTrain|Lions Park}} expands to [[Lions Park station|Lions Park]]
{{stl|CTrain|University}} expands to [[University station (Calgary)|University]]
{{stl|CTrain|7 Street}} expands to [[7 Street Southwest station|7 Street SW]]
local cal = "%1 station (Calgary)"
local sw = "[[$1 Southwest station|%1 SW]]"
local p = {
["lang"] = "en-US",
["system title"] = "[[CTrain]]",
["system icon"] = "",
["name format"] = "font-size: 170%; font-family:Helvetica, sans; font-weight: bolder; line-height: 120%; color: #FFFFFF; background-color: #333366;",
["header background color"] = "EEEEEE",
["header text color"] = "000000",
["station format"] = {
"%1 station",
["1 Street"] = sw,
["3 Street"] = sw,
["4 Street"] = sw,
["6 Street"] = sw,
["7 Street"] = sw,
["8 Street"] = sw,
["10 Street"] = sw,
["39 Avenue"] = cal,
["45 Street"] = sw,
["69 Street"] = sw,
["Anderson"] = cal,
["Brentwood"] = cal,
["Centre Street"] = cal,
["City Hall"] = cal,
["Dalhousie"] = cal,
["Franklin"] = cal,
["Heritage"] = cal,
["Jubilee"] = cal,
["Southland"] = cal,
["Sunnyside"] = cal,
["University"] = cal,
["Westbrook"] = cal,
["Zoo"] = cal
},
["lines"] = {
["_default"] = {
["color"] = "333366",
},
["Red"] = {
["title"] = "[[Red Line (Calgary)|Red Line]]",
["color"] = "ed1c24",
["left terminus"] = "Tuscany",
["right terminus"] = "Somerset–Bridlewood",
},
["Blue"] = {
["title"] = "[[Blue Line (Calgary)|Blue Line]]",
["color"] = "026894",
["left terminus"] = "69 Street",
["right terminus"] = "Saddletowne",
},
["Green"] = {
["title"] = "[[Green Line (Calgary)|Green Line]]",
["color"] = "948a4c",
},
},
["aliases"] = {
["201"] = "Red",
["202"] = "Blue",
["203"] = "Green",
}
}
return p