Jump to content

Module:Road data/size/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 08:32, 26 August 2024 (Backwards compat with current format). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
require("strict")

local p = {}

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

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

local nonUpright = {
	jdt = 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 = getArgs(frame)
	return p._size(args);
end

return p