更多操作
因为以下原因,您没有权限编辑该页面:
您可以查看和复制此页面的源代码。
local p = {}
function p.getBackgroundColor(i, perRow)
local isEvenColumn = ((math.floor((i-1)/perRow)%2)==0)
if not isEvenColumn then i = i + 1 end
if i % 2 == 1 then return nil end
return '#e5ded6'
end
function p.make()
local frame = mw.getCurrentFrame()
local parent = frame:getParent()
local itemsPerRow = tonumber(parent.args['row-items'])
if itemsPerRow == nil then
error('"row-items" is not a number')
end
local count = 0
local unnamed = {}
for k, v in pairs(parent.args) do
000
1:0
该页面使用的模板: