Jump to content

Module:Road data/size/sandbox

From Wikipedia, the free encyclopedia
require("strict")

local p = {}
local format = mw.ustring.format

local styles = {
	infobox = '72px',
	small = '40px',
	list = '32px',
	rdt = '17px',
	-- jct
	default = '24px'
}

local nonUpright = {
	rdt = true
}

-- Lua exports
function p._size(args)
	return styles[args.style] or styles.default
end

function p._ignoreUpright(style)
	return nonUpright[style] or false
end

-- Wikitext exports
function p.size(frame)
	local args = require('Module:Arguments').getArgs(frame)
	return p._size(args);
end

return p