Module:InfoBoxCharacter: Difference between revisions
From SWEE.codes wiki
More actions
|  Created page with "local capiunto = require 'capiunto'  local p = {}  function p.main(frame) 	local args = frame:getParent().args 	local retval = capiunto.create( { 		title = args.title, 		headerStyle = 'background-color:#232323;', 		bodyStyle = 'background-color:#232323; color: white;', 	} ) 	:addImage( args.image, args.caption ) 	:addRow( 'Type', args.chartype) 	:addRow( 'Relativity', args.relatives ) 	:addRow( 'Referenced in', args.ref ) 	:addRow( 'Created at', args.dates ) 	:addRow( 'C..." | No edit summary | ||
| (3 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
| 	local args = frame:getParent().args | 	local args = frame:getParent().args | ||
| 	local retval = capiunto.create( { | 	local retval = capiunto.create( { | ||
| 		title = args.title, | 		--title = args.title, | ||
| 		headerStyle = 'background-color:#232323;', | 		--headerStyle = 'background-color:#232323;', | ||
| 		bodyStyle = 'background-color:#232323; color: white;', | 		--bodyStyle = 'background-color:#232323; color: white;', | ||
| 	} ) | 	} ) | ||
| 	:addImage( args.image, args.caption ) | 	:addImage( args.image, args.caption ) | ||
| 	:addRow( 'Type', args.chartype) | 	:addRow( 'Type', args.chartype) | ||
| 	:addRow( 'Relativity', args.relatives ) | 	:addRow( 'Relativity', args.relatives ) | ||
| 	:addRow( 'Referenced in', args.ref ) | 	:addRow( 'Referenced in/as', args.ref ) | ||
| 	:addRow( 'Created at', args.dates ) | 	:addRow( 'Created at', args.dates ) | ||
| 	:addRow( 'Created by', args.dev ) | 	:addRow( 'Created by', args.dev ) | ||
| 	:addRow( 'Gender', args.gender ) | |||
| 	:addRow( 'Sexuality', args.sexuality ) | |||
| 	:addRow( 'Status', args.stats ) | |||
| 	return retval | 	return retval | ||
Latest revision as of 00:34, 10 March 2025
Documentation for this module may be created at Module:InfoBoxCharacter/doc
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
	local args = frame:getParent().args
	local retval = capiunto.create( {
		--title = args.title,
		--headerStyle = 'background-color:#232323;',
		--bodyStyle = 'background-color:#232323; color: white;',
	} )
	:addImage( args.image, args.caption )
	:addRow( 'Type', args.chartype)
	:addRow( 'Relativity', args.relatives )
	:addRow( 'Referenced in/as', args.ref )
	:addRow( 'Created at', args.dates )
	:addRow( 'Created by', args.dev )
	:addRow( 'Gender', args.gender )
	:addRow( 'Sexuality', args.sexuality )
	:addRow( 'Status', args.stats )
	
	return retval
end
return p
