跳转到内容

模組:Road data/size

维基百科,自由的百科全书

这是Module:Road data/size当前版本,由Uzume留言 | 贡献编辑于2024年7月11日 (四) 02:39 (strict)。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
local p = {}

require('strict')
local getArgs = require('Module:Arguments').getArgs
local format = mw.ustring.format

local function main(args)
	local style = args.style
	if style == 'infobox' then
		return '70px'
	elseif style == 'small' then
		return '40px'
	elseif style == 'list' then
		return '25px'
	elseif style == 'rdt' then
		return '17px'
	elseif style == 'jcttest' then
		return '24'
	else return '20px'
	end
end

function p._size(args)
	return main(args)
end

function p.size(frame)
	local args = getArgs(frame)
	return p._size(args);
end

return p