Module:Road data/size

From PsiForum
< Module:Road data
Revision as of 03:29, 20 January 2022 by Tachyony (talk | contribs) (Created page with "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 == 'list' then return '25px' 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 =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 == 'list' then
		return '25px'
	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