Module:Conflict

From roblox chads wiki
Revision as of 22:02, 2 November 2026 by Swobodap (talk | contribs)
Jump to navigationJump to search

Documentation for this module may be created at Module:Conflict/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:#9accff;'
	end
	local retval = capiunto.create( {
		title = args.title,
		headerStyle = headerStyle,
	} )
	:addImage( args.image, args.caption )
    :addHeader("Combatants")
    :addWikitext([[
    <tr>
        <td style="width:50%; text-align:left;">
            <div style="font-weight:bold; margin-bottom:2px;">Side 1</div>
            ]]..(args.side1 or '')..[[
        </td>
        <td style="width:50%; text-align:left;">
            <div style="font-weight:bold; margin-bottom:2px;">Side 2</div>
            ]]..(args.side2 or '')..[[
        </td>
    </tr>
    ]])
	return retval
end

return p