Moduł:Portal: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
Ostrzyciel (dyskusja • edycje) M |
Ostrzyciel (dyskusja • edycje) M |
||
Linia 25: | Linia 25: | ||
end |
end |
||
lstack = table. |
lstack = table.concat(lstack, '\n') |
||
rstack = table. |
rstack = table.concat(rstack, '\n') |
||
return '<tr><td width="50%">' .. lstack .. '</td><td width="50%">' .. rstack .. '</td></tr>' |
return '<tr><td width="50%">' .. lstack .. '</td><td width="50%">' .. rstack .. '</td></tr>' |
||
end |
end |
Wersja z 17:11, 30 maj 2020
local tools = require('Moduł:Narzędzia')
local p = {}
local function makePanel(args, stack, num)
title = args['ptytuł' .. num]
text = args['panel' .. num]
table.append(stack, '==' .. title .. '==\n' .. text)
end
function p.desktop(frame)
local args = tools.getArgs(frame)
local lstack, rstack = {}, {}
local function subpanel(num)
if num % 2 == 1 then
doSubpanel(args, lstack, num)
else
doSubpanel(args, rstack, num)
end
end
for i = 1, 50 do
if args['panel' .. i] ~= nil then subpanel(i)
else break end
end
lstack = table.concat(lstack, '\n')
rstack = table.concat(rstack, '\n')
return '<tr><td width="50%">' .. lstack .. '</td><td width="50%">' .. rstack .. '</td></tr>'
end
return p