模块:Adjacent stations/KLRT
跳转到导航
跳转到搜索
File:Test Template Info-Icon - Version (2).svg 模块文档[查看] [编辑] [历史] [清除缓存]
此模块是用于颜色用途,不适用于前任继任车站用途,请根据各运营商使用对的adjacent模板
This template can be used to call the color of Klang Valley Rail Transit lines in and around Kuala Lumpur. The following are included in this template.
In order to call a line's color, the code {{rcr|KLRT|line}} is used (where line is replaced by the actual line number or color). Note that this template is not case sensitive: i.e. {{rcr|KLRT|Red}} produces the same result as {{rcr|KLRT|red}}.
| 路线 | 代码 | 颜色 | 十六进制颜色 | 图标 |
|---|---|---|---|---|
| 芙蓉线 | 1或 blue或Seremban或 KB 或KC |
1964b7 |
1 | |
| 巴生港线 | 2或 red或Port Klang或 KA 或KD |
dc241f |
2 | |
| 安邦线 | 3或 orange或LRT1或 Ampang 或AG |
fe8e10 |
3 | |
| 大城堡线 | 4或 maroon或Sri Petaling或SP |
721422 |
4 | |
| 格拉那再也线 | 5或 ruby或LRT2或 Kelana Jaya 或KJ |
e0115f |
5 | |
| 吉隆坡机场快线 | 6或 purple或Klia Express或KE |
8c238f |
6 | |
| 吉隆坡机场支线 | 7或 teal或Klia Transit或KT |
33a8b5 |
7 | |
| 吉隆坡单轨列车 | 8或 lightgreen或Monorail或MR |
7dba00 |
8 | |
| 加影线 | 9或 green或MRT1或 Kajang 或KG |
11753a |
9 | |
| 天空花园线 | 10或 brown或Skypark或KS |
e47443 |
10 | |
| 莎阿南线 | 11或 skyblue或LRT3或 Shah Alam 或SA |
59b8e6 |
11 | |
| 布城线 | 12或 yellow或MRT2或 Putrajaya 或PY |
faca05 |
12 | |
| 环状线 | 13或 MRT3或CC |
635FAA |
13 | |
| 布城单轨或电车 | 14或 olive或PM |
808000 |
14 | |
| 双威BRT | B1或 darkgreen或21或 Sunway 或SB |
1e4d2b |
B1 | |
| 联邦BRT | B2或 violet或22或 Federal 或FB |
4b0082 |
B2 |
Source[编辑]
Colors were obtained from the Greater KL / Klang Valley Integrated Transit Map at www.spad.gov.my: Suruhanjaya Pengangkutan Awam Darat (Land Public Transport Commission).
local format = mw.ustring.format
local frame = mw.getCurrentFrame()
local function linken(a, b, c)
if c == '' or c == nil then
return frame:expandTemplate ({title='Internal link helper/en', args = {a, b}})
else
return frame:expandTemplate ({title='Internal link helper/en', args = {a, b, c}})
end
end
local colors = {
["1"] = "1964b7",
["2"] = "dc241f",
["3"] = "fe8e10",
["4"] = "721422",
["5"] = "e0115f",
["6"] = "8c238f",
["7"] = "33a8b5",
["8"] = "7dba00",
["9"] = "11753a",
["10"] = "e47443",
["11"] = "59b8e6",
["12"] = "faca05",
["13"] = "635FAA",
["14"] = "808000",
["21"] = "1e4d2b",
["22"] = "4b0082"
}
local icon = "[[%s|<span style=\"display: inline-block; vertical-align: middle; "
.. "position: relative; border-radius: 3.3px; height: 20px; width: 22px; "
.. "line-height: 100%%; background: #%s; text-align: center; font-weight: bold; "
.. "font-size: 5px;\"><span style=\"position: absolute; top: 6.67px; left: 2px; "
.. "border: 1.67px solid white; border-radius: 10%%; height: 8.33px; width: 15px; "
.. "color: black; background: white; text-align: center; line-height: 8.89px; "
.. "font-weight: bold; font-size: 11.11px;%s\";>%s</span></span>]]"
local x = "%1站 (吉隆坡)"
local s = "%1站 (雪兰莪)"
local p = {
["system title"] = "[[File:Rapid KL Logo.svg|70px|link=Rapid KL]]",
["system icon"] = "",
["lines"] = {
["_default"] = {
["color"] = "000000",
["text color"] = "ffffff"
},
-- 已开通
["1"] = {
["title"] = "[[芙蓉线]]",
["color"] = colors["1"],
["icon"] = string.format(icon, "芙蓉线", colors["1"], "", "1"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["2"] = {
["title"] = "[[巴生港线]]",
["color"] = colors["2"],
["icon"] = string.format(icon, "巴生港线", colors["2"], "", "2"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["3"] = {
["title"] = "[[安邦线]]",
["color"] = colors["3"],
["icon"] = string.format(icon, "安邦线", colors["3"], "", "3"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["4"] = {
["title"] = "[[大城堡线]]",
["color"] = colors["4"],
["icon"] = string.format(icon, "大城堡线", colors["4"], "", "4"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["5"] = {
["title"] = "[[格拉那再也线]]",
["color"] = colors["5"],
["icon"] = string.format(icon, "格拉那再也线", colors["5"], "", "5"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["6"] = {
["title"] = "[[吉隆坡机场快线]]",
["color"] = colors["6"],
["icon"] = string.format(icon, "吉隆坡机场快线", colors["6"], "", "6"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["7"] = {
["title"] = "[[吉隆坡机场支线]]",
["color"] = colors["7"],
["icon"] = string.format(icon, "吉隆坡机场支线", colors["7"], "", "7"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["8"] = {
["title"] = "[[吉隆坡单轨列车]]",
["color"] = colors["8"],
["icon"] = string.format(icon, "吉隆坡单轨列车", colors["8"], "", "8"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["9"] = {
["title"] = "[[加影线]]",
["color"] = colors["9"],
["icon"] = string.format(icon, "加影线", colors["9"], "", "9"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["10"] = {
["title"] = "[[天空花园线]]",
["color"] = colors["10"],
["icon"] = string.format(icon, "天空花园线", colors["10"], "", "10"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["12"] = {
["title"] = "[[布城线]]",
["color"] = colors["12"],
["text color"] = "000000",
["icon"] = string.format(icon, "布城线", colors["12"], "", "12"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["21"] = {
["title"] = "[[双威线|双威BRT]]",
["short name"] = "B1",
["color"] = colors["21"],
["icon"] = string.format(icon, "双威线", colors["21"], "", "B1"),
["left terminus"] = "?",
["right terminus"] = "?",
},
-- 未开通
["11"] = {
["title"] = "[[莎阿南线]]",
["color"] = colors["11"],
["icon"] = string.format(icon, "莎阿南线", colors["11"], " font-style: italic;", "11"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["13"] = {
["title"] = "[[环状线 (吉隆坡)|环状线]]",
["color"] = colors["13"],
["icon"] = string.format(icon, "环状线 (吉隆坡)", colors["13"], " font-style: italic;", "13"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["14"] = {
["title"] = "[[布城单轨|布城单轨或电车]]",
["color"] = colors["14"],
["icon"] = string.format(icon, "布城单轨", colors["14"], " font-style: italic;", "14"),
["left terminus"] = "?",
["right terminus"] = "?",
},
["22"] = {
["title"] = linken("联邦线 (吉隆坡)", "BRT Federal Line", "联邦BRT"),
["short name"] = "B2",
["color"] = colors["22"],
["icon"] = string.format(icon, "联邦线", colors["22"], " font-style: italic;", "B2"),
["left terminus"] = "?",
["right terminus"] = "?",
}
},
-- 站名格式数据
["station format"] = {
"%1站",
-- 消歧义
-- 芙蓉线
["吉隆坡中央"] = "吉隆坡中央车站",
["冼都(KTM)"] = "冼都站 (马来亚铁道)",
["沙叻秀(KTM)"] = "沙叻秀站 (马来亚铁道)",
-- 巴生港线
["巴生(KTM)"] = "巴生站 (马来亚铁道)",
-- 安邦线
["冼都"] = "冼都站 (轻快铁)",
["人民广场"] = x,
["丽阳(安邦)"] = "丽阳站 (安邦)",
-- 大城堡线
["沙叻秀"] = "沙叻秀站 (轻快铁)",
-- 格拉那再也线
["大学"] = x,
-- 机场快线
["布城/赛城"] = "布城中央车站",
-- 莎亚南线
["丽阳(八打灵再也)"] = "丽阳站 (八打灵再也)",
["中路"] = s,
["巴生(轻快铁)"] = "巴生站 (轻快铁)",
-- 布城线
["布城中央"] = "布城中央车站",
["科技园"] = x,
-- 双威线
["双威-斯迪亚再也"] = "斯迪亚再也站",
-- 模板格式需要
},
["aliases"] = {
["芙蓉"] = "1",
["blue"] = "1",
["kb"] = "1",
["kc"] = "1",
["seremban"] = "1",
["seremban line"] = "1",
["巴生港"] = "2",
["red"] = "2",
["ka"] = "2",
["kd"] = "2",
["port klang"] = "2",
["port klang line"] = "2",
["安邦"] = "3",
["orange"] = "3",
["lrt1"] = "3",
["ag"] = "3",
["ampang"] = "3",
["ampang line"] = "3",
["大城堡"] = "4",
["maroon"] = "4",
["sp"] = "4",
["ph"] = "4",
["sri petaling"] = "4",
["putra heights"] = "4",
["sri petaling line"] = "4",
["格拉那再也"] = "5",
["ruby"] = "5",
["lrt2"] = "5",
["kj"] = "5",
["Kelana Jaya"] = "5",
["kelana jaya"] = "5",
["kelana jaya line"] = "5",
["机场快线"] = "6",
["purple"] = "6",
["ke"] = "6",
["klia express"] = "6",
["express"] = "6",
["klia ekspres"] = "6",
["机场支线"] = "7",
["teal"] = "7",
["kt"] = "7",
["transit"] = "7",
["klia transit"] = "7",
["单轨列车"] = "8",
["lightgreen"] = "8",
["mr"] = "8",
["monorail"] = "8",
["kl monorail"] = "8",
["加影"] = "9",
["green"] = "9",
["mrt1"] = "9",
["kg"] = "9",
["sbk"] = "9",
["sungai buloh kajang"] = "9",
["sungai buloh kajang line"] = "9",
["sungai buloh-kajang line"] = "9",
["mrt kajang line"] = "9",
["kajang"] = "9",
["天空花园"] = "10",
["brown"] = "10",
["ks"] = "10",
["skypark"] = "10",
["莎阿南"] = "11",
["skyblue"] = "11",
["lrt3"] = "11",
["sa"] = "11",
["bk"] = "11",
["buk"] = "11",
["js"] = "11",
["johan setia line"] = "11",
["bandar utama-klang line"] = "11",
["shah alam"] = "11",
["s"] = "11",
["布城"] = "12",
["yellow"] = "12",
["mrt2"] = "12",
["ssp"] = "12",
["py"] = "12",
["mrt putrajaya line"] = "12",
["putrajaya"] = "12",
["环状"] = "13",
["grey"] = "13",
["mrt3"] = "13",
["cc"] = "13",
["circle mrt"] = "13",
["布城单轨或电车"] = "14",
["olive"] = "14",
["pm"] = "14",
["双威BRT"] = "21",
["darkgreen"] = "21",
["b1"] = "21",
["sb"] = "21",
["brt sunway"] = "21",
["brt sunway line"] = "21",
["sunway"] = "21",
["sunway line"] = "21",
["联邦BRT"] = "22",
["violet"] = "22",
["b2"] = "22",
["fb"] = "22",
["federal"] = "22",
["federal line"] = "22",
["brt federal"] = "22",
["brt federal line"] = "22"
}
}
local stationAliases = {
-- 简繁转换
["火車東站"] = "火车东站",
["Kakusei Homura"] = "Pneuma",
["Kakusei Hikari"] = "Pneuma",
}
for k, v in pairs(stationAliases) do
p["station format"][k] = p["station format"][v]
end
local lineAliases = {
['B1'] = '21',
['B2'] = '22',
['KA'] = '2',
['KB'] = '1',
['KC'] = '1',
['KD'] = '2',
['AG'] = '3',
['SP'] = '4',
['KJ'] = '5',
['Kelana Jaya Line'] = '5',
['KE'] = '6',
['KT'] = '7',
['MR'] = '8',
['KG'] = '9',
['Sungai Buloh-Kajang Line'] = '9',
['KS'] = '10',
['SA'] = '11',
['PY'] = '12',
['Sungai Buloh-Serdang-Putrajaya Line'] = '12',
['CC'] = '13',
['PM'] = '14',
['SB'] = '21',
['FB'] = '22',
}
for k, v in pairs(lineAliases) do
p.lines[k] = p.lines[v]
end
return p