Difference between revisions of "Module:Creature"
Jump to navigation
Jump to search
Banyantimes (talk | contribs) (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 )...") |
Banyantimes (talk | contribs) |
||
| Line 16: | Line 16: | ||
} ) | } ) | ||
:addImage( args.image, args.caption ) | :addImage( args.image, args.caption ) | ||
:addRow( 'Order | :addRow( 'Order', args.ordo ) | ||
:addRow( 'Family | :addRow( 'Family', args.familia ) | ||
:addRow( 'Genus | :addRow( 'Genus', args.genus ) | ||
:addRow( '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