Module:Conflict: Difference between revisions

From roblox chads wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 23: Line 23:
     </tr>
     </tr>
     <tr>
     <tr>
         <td colspan="2" style="text-align:center;">
         <th>Side 1</th>
            ]] .. (args.combatants or '') .. [[
        <td>]] .. (args.side1 or '') .. [[</td>
        </td>
    </tr>
    <tr>
        <th>Side 2</th>
        <td>]] .. (args.side2 or '') .. [[</td>
     </tr>
     </tr>
]])
]])

Revision as of 21:48, 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 )
    :addWikitext([[
    <tr>
        <th colspan="2" style="text-align:center; background-color:grey;">
            Combatants
        </th>
    </tr>
    <tr>
        <th>Side 1</th>
        <td>]] .. (args.side1 or '') .. [[</td>
    </tr>
    <tr>
        <th>Side 2</th>
        <td>]] .. (args.side2 or '') .. [[</td>
    </tr>
	]])
	return retval
end

return p