Jump to content

Module:Adjacent stations/CTrain

From Wikihoc

{{#if: | This is a redirect for [[Module:Adjacent stations/{{{main}}}]].| This is a data module for Module:Adjacent stations. It supports {{#if: | former }} services {{#if: | in {{{place}}} }} operated by {{#if: | {{{link}}} | [[{{#titleparts: Adjacent stations/CTrain | 2 | 2 }}]] }}{{#if: |  (formerly {{{previous_name}}}) }}{{#if: |, including {{{including}}} }}. {{#if: | For {{#if: | current services | {{{for}}} }}, use Module:Adjacent stations/. }} {{#if: | {{{alias}}} can be used as an alias for {{#titleparts: Adjacent stations/CTrain | 2 | 2 }}. }}}}{{#if:|}}

Lines

{{#if:| {{#if:|}} {{#if:|{{{type}}}| {{#if:|

or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}

}}}}   {{#ifeq:|true||}} |{{#ifeq:|end||

}}}}

{{#if:CTrain|}} |{{#ifeq:Red|end|
Line{{#ifeq:|type|TypeType keys|Keys}}ColorHex colorIcon
Red Line {{#if:|Red Line{{#if:|{{{type}}}|Red {{#if:201|
or 201 {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  d61b32 {{#ifeq:|true||File:CT Red.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Blue|end|
Line{{#ifeq:Red|type|TypeType keys|Keys}}ColorHex colorIcon
Blue Line {{#if:|Blue Line{{#if:|{{{type}}}|Blue {{#if:202|
or 202 {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  008ab1 {{#ifeq:|true||File:CT Blue.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Green|end|
Line{{#ifeq:Blue|type|TypeType keys|Keys}}ColorHex colorIcon
Green Line {{#if:|Green Line{{#if:|{{{type}}}|Green {{#if:203|
or 203 {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  509e2f {{#ifeq:|true||File:CT Green.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Orange|end|
Line{{#ifeq:Green|type|TypeType keys|Keys}}ColorHex colorIcon
MAX Orange {{#if:|MAX Orange{{#if:|{{{type}}}|Orange {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  fa8b14 {{#ifeq:|true||File:CT Orange.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Yellow|end|
Line{{#ifeq:Orange|type|TypeType keys|Keys}}ColorHex colorIcon
MAX Yellow {{#if:|MAX Yellow{{#if:|{{{type}}}|Yellow {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  fdc90e {{#ifeq:|true||File:CT Yellow.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Teal|end|
Line{{#ifeq:Yellow|type|TypeType keys|Keys}}ColorHex colorIcon
MAX Teal {{#if:|MAX Teal{{#if:|{{{type}}}|Teal {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  009ca7 {{#ifeq:|true||File:CT Teal.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:Purple|end|
Line{{#ifeq:Teal|type|TypeType keys|Keys}}ColorHex colorIcon
MAX Purple {{#if:|MAX Purple{{#if:|{{{type}}}|Purple {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  91378d {{#ifeq:|true||File:CT Purple.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:MAX Green|end|
Line{{#ifeq:Purple|type|TypeType keys|Keys}}ColorHex colorIcon
MAX Green {{#if:|MAX Green{{#if:|{{{type}}}|MAX Green {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  105d3f {{#ifeq:|true||File:CT MAX Green.svg}}

|

}}}}

{{#if:CTrain|}} |{{#ifeq:|end|
Line{{#ifeq:MAX Green|type|TypeType keys|Keys}}ColorHex colorIcon
{{#if:|{{#if:|{{{type}}}| {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  333366 {{#ifeq:|true||}}

|

}}}}

{{#if:|}} |{{#ifeq:end|end|
Line{{#ifeq:|type|TypeType keys|Keys}}ColorHex colorIcon
{{#if:|{{#if:|{{{type}}}|end {{#if:|
or {{#if:|or {{#if:|{{#if:|
or or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or {{#if:|or }}}}}}}}}}}}}}}}}}}}}}}}
|or }}}}}}
}}}}
  {{#ifeq:|true||}}

|

}}}}

Note: "MAX Green" is not formatted in conjunction with other max lines, due to its duplicate name with the "Green Line".

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]]

{{safesubst:#if:{{safesubst:#ifeq:CTrain|sandbox|1}}{{safesubst:#ifeq:CTrain|doc|1}}|| }}


Line{{#ifeq:end|type|TypeType keys|Keys}}ColorHex colorIcon
local sw = "[[%1 SW station|%1 SW]]"
local se = "[[%1 SE station|%1 SE]]"
local n = "[[%1 N station|%1 N]]"
local cal = "%1 station (Calgary)"

local p = {
	["lang"] = "en-US",
	["system title"] = "[[Calgary Transit]]",
	["system icon"] = "",
	["name format"] = "font-size: 170%; font-family: Myriad Pro, Open Sans, Lucida Grande, Helvetica, sans, EB Garamond, Garamond, Calisto MT, Goudy Old Style,Palatino, serif; 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"] = cal,
		["69 Street"] = cal,
		["Anderson"] = cal,
		["Brentwood"] = cal,
		["Bridgeland/Memorial"] = "[[%1 station|Bridgeland/​Memorial]]",
		["Centre Street"] = cal,
		["City Hall"] = "City Hall/Bow Valley College station",
		["Dalhousie"] = cal,
		["Franklin"] = cal,
		["Heritage"] = cal,
		["Jubilee"] = cal,
		["Olympic Plaza"] = "City Hall/Bow Valley College station",
		["SAIT/AUArts/Jubilee"] = "[[%1 station|SAIT/AUArts/​Jubilee]]",
		["Southland"] = cal,
		["Sunnyside"] = cal,
		["University"] = cal,
		["Victoria Park/Stampede"] = "[[%1 station|Victoria Park/​Stampede]]",
		["Westbrook"] = cal,
		["Zoo"] = cal,
		["City Center"] =  [[Downtown Calgary]],
	},
	["lines"] = {
		["_default"] = {
			["color"] = "333366",
		},
		["Red"] = {
			["title"] = "[[Red Line (Calgary)|Red Line]]",
			["icon"] = "[[File:CT Red.svg|16px|link=Red Line (Calgary)]]",
			["short name"] = "R",
			["color"] = "d61b32",
			["left terminus"] = "Tuscany",
			["right terminus"] = "Somerset–Bridlewood",
		},
		["Blue"] = {
			["title"] = "[[Blue Line (Calgary)|Blue Line]]",
			["icon"] = "[[File:CT Blue.svg|16px|link=Blue Line (Calgary)]]",
			["short name"] = "B",
			["color"] = "008ab1",
			["left terminus"] = "69 Street",
			["right terminus"] = "Saddletowne",
		},
		["Green"] = {
			["title"] = "[[Green Line (Calgary)|Green Line]]",
			["icon"] = "[[File:CT Green.svg|16px|link=Green Line (Calgary)]]",
			["short name"] = "G",
			["color"] = "509e2f",
			["left terminus"] = "7 Avenue SW",
			["right terminus"] = "Shepard",
		},
		["Orange"] = {
			["title"] = "[[MAX Orange (Calgary)|MAX Orange]]",
			["icon"] = "[[File:CT Orange.svg|16px|link=MAX Orange (Calgary)]]",
			["short name"] = "MO",
			["color"] = "fa8b14",
			["left terminus"] = "Brentwood",
			["right terminus"] = "Saddletowne",
		},
		["Yellow"] = {
			["title"] = "[[MAX Yellow (Calgary)|MAX Yellow]]",
			["icon"] = "[[File:CT Yellow.svg|16px|link=MAX Yellow (Calgary)]]",
			["short name"] = "MY",
			["color"] = "fdc90e",
			["left terminus"] = "Woodpark Bv.",
			["right terminus"] = "City Center",
		},
		["Teal"] = {
			["title"] = "[[MAX Teal]]",
			["icon"] = "[[File:CT Teal.svg|16px|link=MAX Teal]]",
			["short name"] = "MT",
			["color"] = "009ca7",
			["left terminus"] = "Westbrook",
			["right terminus"] = "Douglas Glen",
		},
		["Purple"] = {
			["title"] = "[[MAX Purple]]",
			["icon"] = "[[File:CT Purple.svg|16px|link=MAX Purple]]",
			["short name"] = "MP",
			["color"] = "91378d",
			["left terminus"] = "City Center",
			["right terminus"] = "East Hills",
		},
		["MAX Green"] = {
			["title"] = "[[MAX Green]]",
			["icon"] = "[[File:CT MAX Green.svg|16px|link=MAX Green]]",
			["short name"] = "MG",
			["color"] = "105d3f",
			["left terminus"] = "North Pointe",
			["right terminus"] = "City Center"
		},

		
	},
	["aliases"] = {
		["201"] = "Red",
		["202"] = "Blue",
		["203"] = "Green",
		["red"] = "Red",
		["green"] = "Green",
		["blue"] = "Blue",
		["orange"] = "Orange",
		["yellow"] = "Yellow",
		["teal"] = "Teal",
		["purple"] = "Purple",
		["max green"] = "MAX Green",
		["301"] = "MAX Green",
	},
}

return p