Module:Infobox faction: Difference between revisions

From the Garry's Mod Factions Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 16: Line 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
:addRow( 'Foo', args.foo )
-- :addRow( 'Foo', args.foo )
:addHeader( 'A header between the data rows' )
-- :addHeader( 'A header between the data rows' )
:addRow( 'Bar', args.bar )
-- :addRow( 'Bar', args.bar )
return retval
return retval
end
end


return p
return p

Revision as of 04:58, 13 October 2025

Documentation for this module may be created at Module:Infobox faction/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.name,
		headerStyle = headerStyle, 
	} )
	:addImage( args.image, args.caption )
	-- :addRow( 'Foo', args.foo )
	-- :addHeader( 'A header between the data rows' )
	-- :addRow( 'Bar', args.bar )
	return retval
end

return p