Module:CapiuntoTest: Difference between revisions
Appearance
2pacalypse (talk | contribs) No edit summary Tag: Reverted |
2pacalypse (talk | contribs) m Reverted edit by 2pacalypse (talk) to last revision by M0x0n Tag: Rollback |
||
| Line 4: | Line 4: | ||
function p.main(frame) | 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( 'Also Known As', args.foo ) | |||
:addHeader( 'Social Media Links' ) | |||
:addRow( 'Links', args.bar ) | |||
:addHeader( 'Status' ) | |||
:addRow( 'Current Status', args.sta ) | |||
return retval | |||
end | end | ||
return p | return p | ||
Latest revision as of 06:29, 13 March 2026
Documentation for this module may be created at Module:CapiuntoTest/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( 'Also Known As', args.foo )
:addHeader( 'Social Media Links' )
:addRow( 'Links', args.bar )
:addHeader( 'Status' )
:addRow( 'Current Status', args.sta )
return retval
end
return p