Jump to content

Module:CapiuntoTest: Difference between revisions

From The Commentary Community Wiki
Created page with "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 ) :addRow( 'Foo', args.foo ) :addHead..."
 
m Reverted edit by 2pacalypse (talk) to last revision by M0x0n
Tag: Rollback
 
(8 intermediate revisions by 2 users not shown)
Line 16: Line 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
:addRow( 'Foo', args.foo )
:addRow( 'Also Known As', args.foo )
:addHeader( 'A header between the data rows' )
:addHeader( 'Social Media Links' )
:addRow( 'Bar', args.bar )
:addRow( 'Links', args.bar )
    :addHeader( 'Status' )
    :addRow( 'Current Status', args.sta )
return retval
return retval
end
end


return p
return p

Latest revision as of 06:29, 13 March 2026

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 )
	:addRow( 'Also Known As', args.foo )
	:addHeader( 'Social Media Links' )
	:addRow( 'Links', args.bar )
    :addHeader( 'Status' )
    :addRow( 'Current Status', args.sta )
	return retval
end

return p