local p = local getArgs = require('Module:Arguments').getArgslocal colori = local soglia =
function p.tabella(frame)local args = getArgs(frame)
local count = 0for _ in pairs(args) do count = count + 1 end
local str = "
-\n" for i=1,count dostr = str .. "!" .. args[i]if i~=count thenstr = str .. " | "endend str = str .. "\n |
---|
return strend
function p.main(frame)local args = getArgs(frame)local res = args[1]local anno = tonumber(args[2])
if res
local res2 = string.gsub(res,"'","")
if anno < 1960 then format = 1elseif anno < 2003 then format = 2elseif anno < 2010 then format = 3else format = 4end
if tonumber(res2) ~= nil and tonumber(res2) > 3 then if tonumber(res2) < soglia[format]+1 then res2 = "punti" else res2 = "nopunti" endend
local colore = colori[res2]
if colore
return "style=\"padding-left:0px;padding-right:0px;background-color:#" .. colore .. "\""end
function p.render(frame)local args = getArgs(frame)local res = args[1]local apici = args[2]
if apici
"GV" thenres = "" .. res .. ""endif apici
"PP" thenres = "" .. res .. ""end
return res
end
function p.pippo(frame)local div = mw.html.create('td')div :attr('id', 'testdiv') :css('width', '100%') :wikitext('Some text')return tostring(div)end
return p