Module:Flags: Difference between revisions

Content deleted Content added
Abstracting size
Supporting size parameters "40px" or "32x48px" (not "size=" yet)
Line 8:
border = "border|"
-- Size of flag -- FIXME "size=" format isn't implemented yet because the parameter renders as a "{{{2}}}" string. Weird.
-- Providing parameter "size="
if territory.args[2]:find("px", -2) ~= nil then size = territory.args[2]
size = "22x20px"
if string.find(elseif territory.args[23], :find("px", -2 ) ~= nil then size = string.byte ( territory.args[23], 5else )size = "20x22px" end
-- Searching in the translation table.
Line 33:
if territory.args[1] == "Nepal" or territory.args[1] == "Ohio" then border = "" end
-- return '[[File:Flag_of_' .. commonsName .. '.svg|' .. border .. 'link=' .. link .. '|'.. size .. ']]'
return '[[File:Flag_of_' .. commonsName .. '.svg|' .. border .. 'link=' .. link .. '|'.. size .. ']]'
end