Module:Road data/size

From Lewis' Server Wiki
Revision as of 12:37, 28 May 2024 by Megalomart (talk | contribs) (1 revision imported from wikipedia:Module:Road_data/size)
(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

require("strict")

local p = {}

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

local function main(args)
	local style = args.style
	if style == 'infobox' then
		return '72px'
	elseif style == 'small' then
		return '40px'
	elseif style == 'list' then
		return '32px'
	elseif style == 'rdt' then
		return '17px'
	else return '24px'
	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