RiceEmpress (talk | contribs) No edit summary |
RiceEmpress (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
} ) | } ) | ||
:addImage( args.image1, args.caption ) | :addImage( args.image1, args.caption ) | ||
local rows = | |||
{ | |||
{'Voice', args.voice }, | |||
{ 'JP Name', args.jpname }, | |||
{ 'Also known as', args.also_known_as }, | |||
{ 'Eye Colour', args.eye_colour }, | |||
{ 'Hair Colour', args.hair_colour }, | |||
{ 'Height', args.height }, | |||
{ 'Age', args.age }, | |||
{ 'Birthday', args.birthday }, | |||
{ 'Likes', args.likes }, | |||
{ 'Dislikes', args.dislikes }, | |||
{ 'Relationships', args.relationships } | |||
} | |||
for a, b in ipairs(rows) do | |||
local label, value = row[1], row[2] | |||
if value and value ~= '' then | |||
infobox:addRow(label, value) | |||
end | |||
end | |||
return infobox | return infobox | ||
end | end | ||
return p | return p |
Revision as of 08:23, 3 June 2025
Documentation for this module may be created at Module:Character Infobox/doc
local capiunto = require 'capiunto' local p = {} function p.main(frame) local args = frame:getParent().args local infobox = capiunto.create( { title1 = args.title1 } ) :addImage( args.image1, args.caption ) local rows = { {'Voice', args.voice }, { 'JP Name', args.jpname }, { 'Also known as', args.also_known_as }, { 'Eye Colour', args.eye_colour }, { 'Hair Colour', args.hair_colour }, { 'Height', args.height }, { 'Age', args.age }, { 'Birthday', args.birthday }, { 'Likes', args.likes }, { 'Dislikes', args.dislikes }, { 'Relationships', args.relationships } } for a, b in ipairs(rows) do local label, value = row[1], row[2] if value and value ~= '' then infobox:addRow(label, value) end end return infobox end return p