Jump to content

Module:Road data/size/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Backwards compat with current format
rdt
Line 16: Line 16:


local nonUpright = {
local nonUpright = {
jdt = true
rdt = true
}
}



Revision as of 08:36, 26 August 2024

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

return p