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:20, 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.size()
	local style = args["style"]
	standard = "x" .. defaultShieldSize(frame)
	upright = defaultShieldSize(frame)
	
--[[	if parser(route, 'shieldSize') == 'upright' then
		return upright
		else]] return standard
--	end
end



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)
	return p._main(args)
end

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

return p