Jump to content

Module:Adjacent stations/S-Bahn Mitteldeutschland

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frietjes (talk | contribs) at 19:06, 7 July 2022. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local hbf = "[[%1 Hauptbahnhof|%1 hbf]]"

local icon = "<span style=\"font-size:88%%; background-color:#%s;border:.075em solid #%s; " ..
    "border-radius:.5em;padding:0 .3em\">[[S-Bahn Mitteldeutschland#Network of the S-Bahn Mitteldeutschland|<span " ..
    "style=\"color:#%s; font-weight:bold; font-size:inherit; " ..
    "white-space:nowrap\">%s</span>]]</span>"

local colors = {
	["1"] = {"FFFF00", "000000"},
	["2"] = {"009BD4", "FFFFFF"},
	["3"] = {"E10000", "FFFFFF"},
	["4"] = {"018243", "FFFFFF"},
	["5"] = {"FF8000", "FFFFFF"},
	["5x"] = {"EBBD00", "000000"},
	["6"] = {"772233", "FFFFFF"},
	["7"] = {"7A67EE", "FFFFFF"},
	["8"] = {"5E6DB3", "FFFFFF"},
	["9"] = {"A3238E", "FFFFFF"},
	["10"] = {"0000EE", "FFFFFF"},
	["11"] = {"FFFF00", "000000"}
}

local p = {
	["system title"] = "[[S-Bahn Mitteldeutschland]]",
	["station format"] = {
		"%1 railway station",
		["Dessau"] = hbf,
		["Lutherstadt Wittenberg"] = hbf,
		["Halle (Saale)"] = hbf,
		["Halle"] = "[[Halle (Saale) Hauptbahnhof|Halle (Saale) Hbf]]",
		["Leipzig"] = hbf
	},
	["lines"] = {
		["_default"] = {
			["title"] = "[[S-Bahn Mitteldeutschland#Network of the S-Bahn Mitteldeutschland|S %1]]",
		},
		["1"] = {
			["text color"] = colors["1"][2],
			["color"] = colors["1"][1],
			["icon"] = string.format(icon, colors["1"][1], colors["1"][1], colors["1"][2], "S 1"),
			["short name"] = "S 1",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["2"] = {
			["text color"] = colors["2"][2],
			["color"] = colors["2"][1],
			["icon"] = string.format(icon, colors["2"][1], colors["2"][1], colors["2"][2], "S 2"),
			["short name"] = "S 2",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["3"] = {
			["text color"] = colors["3"][2],
			["color"] = colors["3"][1],
			["icon"] = string.format(icon, colors["3"][1], colors["3"][1], colors["3"][2], "S 3"),
			["short name"] = "S 3",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["4"] = {
			["text color"] = colors["4"][2],
			["color"] = colors["4"][1],
			["icon"] = string.format(icon, colors["4"][1], colors["4"][1], colors["4"][2], "S 4"),
			["short name"] = "S 4",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["5"] = {
			["text color"] = colors["5"][2],
			["color"] = colors["5"][1],
			["icon"] = string.format(icon, colors["5"][1], colors["5"][1], colors["5"][2], "S 5"),
			["short name"] = "S 5",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["5x"] = {
			["text color"] = colors["5x"][2],
			["color"] = colors["5x"][1],
			["icon"] = string.format(icon, colors["5x"][1], colors["5x"][1], colors["5x"][2], "S 5X"),
			["short name"] = "S 5X",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["6"] = {
			["text color"] = colors["6"][2],
			["color"] = colors["6"][1],
			["icon"] = string.format(icon, colors["6"][1], colors["6"][1], colors["6"][2], "S 6"),
			["short name"] = "S 6",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["7"] = {
			["text color"] = colors["7"][2],
			["color"] = colors["7"][1],
			["icon"] = string.format(icon, colors["7"][1], colors["7"][1], colors["7"][2], "S 7"),
			["short name"] = "S 7",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["8"] = {
			["text color"] = colors["8"][2],
			["color"] = colors["8"][1],
			["icon"] = string.format(icon, colors["8"][1], colors["8"][1], colors["8"][2], "S 8"),
			["short name"] = "S 8",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["9"] = {
			["text color"] = colors["9"][2],
			["color"] = colors["9"][1],
			["icon"] = string.format(icon, colors["9"][1], colors["9"][1], colors["9"][2], "S 9"),
			["short name"] = "S 9",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["10"] = {
			["text color"] = colors["10"][2],
			["color"] = colors["10"][1],
			["icon"] = string.format(icon, colors["10"][1], colors["10"][1], colors["10"][2], "S 10"),
			["short name"] = "S 10",
			["left terminus"] = "",
			["right terminus"] = ""
		},
		["11"] = {
			["text color"] = colors["11"][2],
			["color"] = colors["11"][1],
			["icon"] = string.format(icon, colors["11"][1], colors["11"][1], colors["11"][2], "S 11"),
			["short name"] = "S 11",
			["left terminus"] = "",
			["right terminus"] = ""
		},
	},
	["aliases"] = {
		["s1"] = "1",
		["s2"] = "2",
		["s3"] = "3",
		["s4"] = "4",
		["s5"] = "5",
		["s5x"] = "5x",
		["s6"] = "6",
		["s7"] = "7",
		["s8"] = "8",
		["s9"] = "9",
		["s10"] = "10",
		["s11"] = "11",
	}
}

return p