Jump to content

Module:CapiuntoTest: Difference between revisions

From The Commentary Community Wiki
No edit summary
No edit summary
Tag: Reverted
Line 16: Line 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
    :addImage1( args.image1, args.caption1 )
:addRow( 'Also Known As', args.foo )
:addRow( 'Also Known As', args.foo )
:addHeader( 'A header between the data rows' )
:addHeader( 'A header between the data rows' )

Revision as of 05:56, 30 March 2025

Documentation for this module may be created at Module:CapiuntoTest/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 )
    :addImage1( args.image1, args.caption1 )
	:addRow( 'Also Known As', args.foo )
	:addHeader( 'A header between the data rows' )
	:addRow( 'Links', args.bar )
	return retval
end

return p