Content deleted Content added
wrap in scrollbox |
working on self documentation, probably has bugs |
||
Line 23:
default = { ['background-color'] = 'white' }
}
function p.doc(frame)
local desc = {
{'r', 'red'},
{'d', 'down'},
{'g', 'green'},
{'u', 'up'},
{'y', 'yellow'},
{'npr', 'not previously ranked'},
{'tg', 'tie green'},
{'tu', 'tie up'},
{'tr', 'tie red'},
{'td', 'tie down'},
{'ty', 'tie yellow'},
{'tnpr', 'tie not previously ranked'},
{'tw', 'tie white'},
{'-', 'default'}
}
local ret = mw.html.create('table'):addClass('wikitable')
ret:tag('tr')
:tag('th'):wikitext('Code'):done()
:tag('th'):wikitext('Abbreviation for'):done()
:tag('th'):wikitext('Result'):done()
for i=1,#desc do
local d = desc[i]
ret:tag('tr')
:tag('td'):wikitext(d[1]):done()
:tag('td'):wikitext(d[2]):done()
:tag('td'):css(CC_backgrounds[d[1]]):done()
end
return ret
end
function p.main(frame)
|