Module:Conflict: Difference between revisions

From roblox chads wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 16: Line 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
    :addHeader("Combatants")
     :addWikitext([[
     :addWikitext([[
    <tr>
        <th colspan="2" style="text-align:center; background-color:grey;">
            Combatants
        </th>
    </tr>
     <tr>
     <tr>
         <td style="text-align:center; width:50%;">
         <td style="text-align:center; width:50%;">

Revision as of 21:52, 2 November 2026

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:grey;'
	end
	local retval = capiunto.create( {
		title = args.title,
		headerStyle = headerStyle,
	} )
	:addImage( args.image, args.caption )
    :addHeader("Combatants")
    :addWikitext([[
    <tr>
        <td style="text-align:center; width:50%;">
            <b>Side 1</b><br />
            ]] .. (args.side1 or '') .. [[
        </td>
        <td style="text-align:center; width:50%;">
            <b>Side 2</b><br />
            ]] .. (args.side2 or '') .. [[
        </td>
    </tr>
	]])
	return retval
end

return p