Jump to content

Module:RoundN

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Codehydro (talk | contribs) at 03:21, 25 December 2014 (begin priliminary work). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local defaultRounds = {'Finals' , 'Semi Finals', 'Quarter Finals'}
local output = mw.html.create('table')
local last = {row = nil, cell = nil}

function newRow()
	last.row = output:tag('tr')
	last.cell = last.row:tag('td')
	last.cell
		:attr('height', 5)
end

function RD(N, first)
	if first then
		newRow()
	else
		last.row
			:tag('td')
			:attr('colspan', 2)
	end
	last.row:tag('td')
		:attr('colspan', 2)
		:css('height', '5px')
end

function p._main(args)
	output
		:css('font-size', '90%')
		:css('margin', '1em 2em 1em 1em')
		:css('border-spacing', 0)
		:css('border', 0)
		:css('padding', 0)



	return output
end

function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {
		wrappers = WRAPPER_TEMPLATE
	})
	return p._main(args, frame)
end

return p