Halo Esports Wiki

We are currently performing extensive maintenance to this wiki and as a result there will likely be errors. Please be patient while we work to fix all problems.

READ MORE

Halo Esports Wiki
Advertisement

To edit the documentation or categories for this module, click here.


local p = {} -- teamexceptionstyles

-- size is forced to be defined for this one

function p.styleNames(style)
	local lookup = {
		leftshortlinked = { style = "left", suffix = '', size = 38 },
		leftshort = { style = "left", suffix = '', size = 38 },
		leftmediumlinked = { style = "left", suffix = '', size = 45 },
		leftmedium = { style = "left", suffix = '', size = 45 },
		leftlonglinked = { style = "left", suffix = '', size = 60 },
		leftlong = { style = "left", suffix = '', size = 60 },
		
		rightshortlinked = { style = "right", suffix = '', size = 38 },
		rightshort = { style = "right", suffix = '', size = 38 },
		rightmediumlinked = { style = "right", suffix = '', size = 45 },
		rightmedium = { style = "right", suffix = '', size = 45 },
		rightlonglinked = { style = "right", suffix = '', size = 60 },
		rightlong = { style = "right", suffix = '', size = 60 },
		
		onlyimagelinked = { style = "onlyimage", suffix = '', size = 60 },
		onlyimage = { style = "onlyimage", suffix = '', size = 60 },
		
		teamlinkname = { style = "teamname" },
		teammediumname = { style = "teamname" },
		mediumplainlinked = { style = "teamname" },
		plainlinked = { style = "teamname" },
		teamname= { style = "teamname" },
	}
	
	return lookup[style]
end

--------------------------------------
-- variable names
--------------------------------------

function p.teamname(namevars, settings)
	return settings.text or namevars.text
end

--------------------------------------
-- image
--------------------------------------

function p.onlyimage(namevars, settings)
	local size = settings.size
	return '<span title="' .. namevars.hover .. '">[[File:' .. namevars.image .. 'logo std.png|link=|' .. size .. 'px]]</span>'
end

--------------------------------------
-- text to the right
--------------------------------------

function p.right(namevars, settings)
	local text = settings.text or namevars.text
	return '<span title="' .. namevars.hover .. '">[[File:' .. namevars.image .. 'logo std.png|link=|' .. settings.size .. 'px]]</span> ' .. text
end

--------------------------------------
-- text to the left
--------------------------------------

function p.left(namevars, settings) -- this one is default
	return namevars.text .. ' <span title="' .. namevars.hover .. '">[[File:' .. namevars.image .. 'logo std.png|link=|' .. settings.size .. 'px]]</span>'
end

return p
Advertisement