887
edits
Dicemonger (talk | contribs) (Created page with "local p = {} function p.hello(frame) return "Hello, world!" end return p") |
Dicemonger (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p. | function p.begin(frame) | ||
return " | local cols = getCols(frame) | ||
return "<div style=\"column-count:" + cols + "; column-width:" + getWidth(cols) + "; column-gap:40px; column-rule: 2px solid #d6d6d6;\">" | |||
end | |||
function p.div(frame) | |||
local cols = getCols(frame) | |||
return "</div><div style=\"column-count:" + cols + "; column-width:" + getWidth(cols) + "; column-gap:40px; column-rule: 2px solid #d6d6d6;\">" | |||
end | |||
function p.stop(frame) | |||
return "</div>" | |||
end | |||
function getCols(frame) | |||
local cols = frame.args['cols'] | |||
if cols == nil then | |||
return 2 | |||
end | |||
return cols | |||
end | |||
function getWidth(cols) | |||
if cols == 2 then | |||
return "300px" | |||
elseif cols == 3 then | |||
return "200px" | |||
elseif cols == 4 then | |||
return "150px" | |||
end | |||
end | end | ||
return p | return p |