Module:Creature

From The Banyan Times Wiki
Revision as of 06:41, 24 February 2022 by Banyantimes (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Creature/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( 'Order', args.ordo )
	:addRow( 'Family', args.familia )
	:addRow( 'Genus', args.genus )
	:addRow( 'Species (Scientific name)', args.species )
	return retval
end

return p