Module:Sandbox/CAS222222221
Appearance
local getArgs = require('Module:Arguments').getArgs
local p = {}
local function color(args, year)
return '#FF6666'
end
local function titleItem(content)
local ret
if a ~= nil then
ret = mw.html.create( 'span' )
ret
:css( 'text-indent', '-1em')
:wikitext( '-' .. context )
end
return ret
end
local function left(args, year)
local ret
ret = mw.html.create( 'td' )
ret
:wikitext( year .. '-' )
return ret
end
local function middle(args, year)
local ret
ret = mw.html.create( 'td' )
ret
:wikitext( ' ' )
:css( 'width', '10px' )
:css( 'background-color', color(args, year) )
return ret
end
local function right(args, year)
local ret
local cont
ret = mw.html.create( 'td' )
for i = 98, 106 do
ret:node( titleItem(args[year .. string.char(i)]) )
end
ret
:css( 'padding-left', '1em')
return ret
end
local function row(args, year)
local ret
ret = mw.html.create('tr')
ret
:node( left(args, year) )
:node( middle(args, year) )
:node( right(args, year) )
return ret
end
--------------------------------------------------------------------------------
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
function p._main(args)
-- Main module code goes here.
local ret
ret = mw.html.create( 'table' )
for year = 1990, 2015 do
ret:node( row(args, year) )
end
return ret
end
return p