Module:Adjacent stations/CTrain

From blackwiki
< Module:Adjacent stations
Revision as of 14:22, 6 July 2019 by blackwiki>Blaixx (Initial creation for Calgary LRT system)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 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",
		["39 Avenue"] = cal,
		["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 St",
			["right terminus"] = "Saddletowne",
		},
		["Green"] = {
			["title"] = "[[Green Line (Calgary)|Green Line]]",
			["color"] = "948a4c",
		},
	},
	["aliases"] = {
		["1 St"] = "1 Street Southwest",
		["3 St"] = "3 Street Southwest",
		["4 St"] = "4 Street Southwest",
		["6 St"] = "6 Street Southwest",
		["7 St"] = "7 Street Southwest",
		["8 St"] = "8 Street Southwest",
		["10 St"] = "10 Street Southwest",
		["39 Ave"] = "39 Avenue",
		["45 St"] = "45 Street Southwest",
		["69 St"] = "69 Street Southwest",
	}
}

return p