Jump to content

Module:Road data/size

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fredddie (talk | contribs) at 07:31, 14 February 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local getArgs = require('Module:Arguments').getArgs
local p = {}

local concat = table.concat
local insert = table.insert
local format = mw.ustring.format
local parserModule = require("Module:Road data/parser")
local parser = parserModule.parser

function p._main(args)
	local style = args.style
	if style == 'infobox' then
		return tostring('70')
	elseif style == 'small' then
		return tostring('40')
	elseif style == 'list' then
		return tostring('25')
	else return tostring('20')
	end
end

function p.size(frame)
	local args = getArgs(frame)
	if parser('shieldsize') == "upright" then
		return p._main(args)
	else return p._main(args)
	end
end

function p.banner(frame)
	local args = getArgs(frame)
	return p._main(args)
end

return p