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 06:54, 14 February 2021 (Restored revision 1006406098 by Fredddie (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

local SANDBOX = false
local SANDBOX_SUFFIX = SANDBOX and '/sandbox' or ''

local concat = table.concat
local insert = table.insert
local format = mw.ustring.format
local getArgs = require('Module:Arguments').getArgs -- Import module function to work with passed arguments
local parserModule = require("Module:Road data/parser" .. SANDBOX_SUFFIX)
local parser = parserModule.parser

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

function p.size()
	local args = getArgs(frame)
	standard = "x" .. defaultShieldSize(frame)
	upright = defaultShieldSize(frame)
	
--[[	if parser(route, 'shieldSize') == 'upright' then
		return upright
		else]] return standard
--	end
end

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

return p