Module:Road data/size: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
m (Changed protection settings for "Module:Road data/size": Highly visible template: 32,000+ transclusions ([Edit=Require template editor access] (indefinite)))
 
m (1 revision imported)
 
(No difference)

Latest revision as of 11:46, 7 September 2021

Documentation for this module may be created at Module:Road data/size/doc

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 == 'test' then
		return '24'
	elseif style == 'list' then
		return '24px'
	elseif style == 'jcttest' then
		return '20'
	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