跳转到内容

模組:Road data/size

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

这是本页的一个历史版本,由StevenK234留言 | 贡献2021年5月25日 (二) 11:56 (From en:Special:permalink/1014909872编辑。这可能和当前版本存在着巨大的差异。

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

require('Module:No globals')
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 == 'jct' or style == 'list' then
		return '24px'
	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