Module:Test: Difference between revisions
From roblox chads wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local capiunto = require 'capiunto' | local capiunto = require 'capiunto' | ||
| Line 5: | Line 4: | ||
function p.main(frame) | 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:grey;' | |||
end | |||
local retval = capiunto.create( { | |||
title = args.title, | |||
headerStyle = headerStyle, | |||
} ) | |||
:addImage( args.image, args.caption ) | |||
for i,v in pairs(args) do | |||
if string.sub(i,#tostring(i)-6,#tostring(i)-6) == "header" then | |||
retval:addHeader(v) | |||
elseif string.sub(i,#tostring(i)-3,#tostring(i)-3) == "row" then | |||
for i, v in pairs(args) do | retval:addRow( 'Account Made', v) | ||
elseif | |||
end | end | ||
end | end | ||
return retval | |||
end | end | ||
return p | return p | ||
Revision as of 14:58, 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:grey;'
end
local retval = capiunto.create( {
title = args.title,
headerStyle = headerStyle,
} )
:addImage( args.image, args.caption )
for i,v in pairs(args) do
if string.sub(i,#tostring(i)-6,#tostring(i)-6) == "header" then
retval:addHeader(v)
elseif string.sub(i,#tostring(i)-3,#tostring(i)-3) == "row" then
retval:addRow( 'Account Made', v)
end
end
return retval
end
return p