Дополнительные действия
Gapp (обсуждение | вклад) м Gapp переименовал страницу Модуль:Infobox в Модуль:InfoboxPerson |
Gapp (обсуждение | вклад) Нет описания правки |
||
| Строка 16: | Строка 16: | ||
} ) | } ) | ||
:addImage( args.image, args.caption ) | :addImage( args.image, args.caption ) | ||
:addRow( ' | :addRow( 'Родился', args.birth ) | ||
:addHeader( 'A header between the data rows' ) | :addRow( 'Место пребывания', args.place ) | ||
:addRow( ' | --:addHeader( 'A header between the data rows' ) | ||
:addRow( 'Род деятельности', args.job ) | |||
return retval | return retval | ||
end | end | ||
return p | return p | ||
Версия от 20:34, 7 января 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