Moduł:Portal: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
(nowa strona)
 
M
Linia 1: Linia 1:
local tools = require('Moduł:Narzędzia')
local p = {}
local p = {}

local function makePanel(title, text)
--todo
return title .. text
end

local function doSubpanel(args, stack, num)
title = args['ptytuł' .. num]
text = args['panel' .. num]
table.append(stack, makePanel(title, 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
--todo
return ''
end


return p
return p

Wersja z 17:05, 30 maj 2020


local tools = require('Moduł:Narzędzia')
local p = {}

local function makePanel(title, text)
	--todo
	return title .. text
end

local function doSubpanel(args, stack, num)
	title = args['ptytuł' .. num]
	text = args['panel' .. num]
	table.append(stack, makePanel(title, 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
	
	--todo
	return ''
end

return p