Difference between revisions of "Module:Creature"

From The Banyan Times Wiki
Jump to navigation Jump to search
(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( 'Order (ordo)', args.ordo )...")
 
Line 16: Line 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
:addRow( 'Order (ordo)', args.ordo )
:addRow( 'Order', args.ordo )
:addRow( 'Family (familia)', args.familia )
:addRow( 'Family', args.familia )
:addRow( 'Genus (genus)', args.genus )
:addRow( 'Genus', args.genus )
:addRow( 'Species (species)', args.species )
:addRow( 'Species (Scientific name)', args.species )
return retval
return retval
end
end


return p
return p

Revision as of 06:41, 24 February 2022

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