模块:Vertical Rail Route Map Stations:修订间差异
来自RIA | Wiki
更多操作
无编辑摘要 标签:手工回退 |
无编辑摘要 |
||
| 第25行: | 第25行: | ||
local vrmn = '{{VRMN|' .. typeParam .. '|' .. lineColor .. '|' .. trans .. '|length=' .. length .. '}}' | local vrmn = '{{VRMN|' .. typeParam .. '|' .. lineColor .. '|' .. trans .. '|length=' .. length .. '}}' | ||
table.insert(output, '<nowiki>') | |||
table.insert(output, '| ' .. trans .. '\n') | table.insert(output, '| ' .. trans .. '\n') | ||
table.insert(output, '| ' .. vrmn .. '\n') | table.insert(output, '| ' .. vrmn .. '\n') | ||
table.insert(output, '| <span style="font-size:1em;">' .. (zhName or '') .. '</span><br><span style="font-size:0.66em;">' .. (enName or '') .. '</span>' .. '\n') | table.insert(output, '| <span style="font-size:1em;">' .. (zhName or '') .. '</span><br><span style="font-size:0.66em;">' .. (enName or '') .. '</span>' .. '\n') | ||
table.insert(output, '|-' .. '\n') | table.insert(output, '|-' .. '\n') | ||
table.insert(output, '</nowiki>') | |||
i = i + 1 | i = i + 1 | ||
2026年3月5日 (四) 11:43的版本
此模块的文档可以在模块:Vertical Rail Route Map Stations/doc创建
local p = {}
function p.render(frame)
local args = frame:getParent().args
local lineColor = args['line-color'] or '#7f7f7f'
local length = args.length or '40'
local output = {}
local i = 1
while true do
local typeParam = args['type' .. i]
if not typeParam or typeParam == '' then
break
end
local transParam = args['trans' .. i]
local zhName = args['station-zh-name' .. i]
local enName = args['station-en-name' .. i]
local trans = transParam or ''
local vrmn = '{{VRMN|' .. typeParam .. '|' .. lineColor .. '|' .. trans .. '|length=' .. length .. '}}'
table.insert(output, '<nowiki>')
table.insert(output, '| ' .. trans .. '\n')
table.insert(output, '| ' .. vrmn .. '\n')
table.insert(output, '| <span style="font-size:1em;">' .. (zhName or '') .. '</span><br><span style="font-size:0.66em;">' .. (enName or '') .. '</span>' .. '\n')
table.insert(output, '|-' .. '\n')
table.insert(output, '</nowiki>')
i = i + 1
end
return table.concat(output, '\n')
end
return p