Открыть меню
Toggle preferences menu
Открыть персональное меню
Вы не представились системе
Your IP address will be publicly visible if you make any edits.

Модуль:InfoboxPerson: различия между версиями

Материал из Бебравикии
Новая страница: «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( 'Foo', args.fo...»
 
Нет описания правки
Метка: ручная отмена
 
(не показано 5 промежуточных версий этого же участника)
Строка 16: Строка 16:
} )
} )
:addImage( args.image, args.caption )
:addImage( args.image, args.caption )
:addRow( 'Foo', args.foo )
:addRow( 'Родился', args.birth )
:addHeader( 'A header between the data rows' )
:addRow( 'Место пребывания', args.place )
:addRow( 'Bar', args.bar )
--:addHeader( 'A header between the data rows' )
:addRow( 'Род деятельности', args.job )
return retval
return retval
end
end


return p
return p

Текущая версия от 03:23, 8 января 2025

Для документации этого модуля может быть создана страница Модуль:InfoboxPerson/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( 'Родился', args.birth )
	:addRow( 'Место пребывания', args.place )
	--:addHeader( 'A header between the data rows' )
	:addRow( 'Род деятельности', args.job )
	return retval
end

return p