Module:Test: Difference between revisions
From roblox chads wiki
Jump to navigationJump to search
No edit summary |
No edit summary Tag: Reverted |
||
| Line 16: | Line 16: | ||
} ) | } ) | ||
:addImage( args.image, args.caption ) | :addImage( args.image, args.caption ) | ||
for i,v in | for i,v in ipairs(args) do | ||
if string.sub(tostring(i),-6,-1) == "header" then | if string.sub(tostring(i),-6,-1) == "header" then | ||
retval:addHeader(v) | retval:addHeader(v) | ||
Revision as of 14:04, 2 November 2026
Documentation for this module may be created at Module:Test/doc
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local headerStyle
if args.headerstyle and args.headerstyle ~= '' then
headerStyle = string.format('background-color:%s;', args.headerstyle)
else
headerStyle = 'background-color:#60c2ff;'
end
local retval = capiunto.create( {
title = args.title,
headerStyle = headerStyle,
} )
:addImage( args.image, args.caption )
for i,v in ipairs(args) do
if string.sub(tostring(i),-6,-1) == "header" then
retval:addHeader(v)
elseif string.sub(tostring(i),-3,-1) == "row" then
retval:addRow(string.sub(tostring(i),1,#tostring(i)-3), v)
end
end
return retval
end
return p