Module:CapiuntoTest

From Grotto Beasts
Jump to navigation Jump to search

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 )
	:addHeader( 'Stats and Types' )
	:addRow( 'Epic', args.yepic )
	:addRow( 'Card Type', args.cinfo )
	:addRow( 'Beast Type', args.btype )
	:addRow( 'Summoning Cost', args.summn )
	:addRow( 'Power', args.power )
	:addRow( 'Goal', args.goals )
	:addHeader( 'Card Information' )
	:addRow( 'Card Number', args.numbr )
	:addRow( 'Card Rarity', args.rarty )
	:addRow( 'Artist', args.artst )
	:addRow( 'Foil Style', args.foils )
	return retval
end

return p