Module

Infobox

From Glitchtale Wiki

Documentation for this module may be created at Module:Infobox/doc

local p = {} -- Defines a variable p as an empty table, but *not* nil.

function p.main( frame ) 
    local charName = frame.args.charName
    local soulTrait = frame.args.soulTrait
    local species = frame.args.species
    local gender = frame.args.gender
    local charStatus = frame.args.charStatus
    local theme = frame.args.theme
    local voiceActor = frame.args.voiceActor
    local imageStr= frame.args.imageStr

    local capiunto = require 'capiunto'
    local infobox = capiunto.create( 
        {
    		title = "" ,
    		top = charName,
    		topStyle = 'background:#00000;',
	    } 
	)
    infobox:addRow( "Soul/Trait" , soulTrait, "infoboxValues", "infoboxLabels")
    infobox:addRow( "Species" , species, "infoboxValues", "infoboxLabels")
    infobox:addRow( "Gender" , gender, "infoboxValues", "infoboxLabels")
    infobox:addRow( "Status" , charStatus, "infoboxValues", "infoboxLabels" )
    infobox:addRow( "Theme" , theme, "infoboxValues", "infoboxLabels" )
    infobox:addRow( "Voice Actor" , voiceActor, "infoboxValues", "infoboxLabels")

    infobox:addImage( imageStr)

    local html = tostring( infobox:getHtml() )

    return html
end 
return p