Module:Infobox Test: Difference between revisions

From Bibliotheca Anonoma
No edit summary
No edit summary
Line 4: Line 4:
local capiunto = require 'capiunto'
local capiunto = require 'capiunto'
return capiunto.create( {
return capiunto.create( {
top = 'Above text',
top = tostring(mw.title.getCurrentTitle()),
topStyle = 'background:#cfc;',
topStyle = 'background:#cfc;',
bottom = 'Below text'
bottom = frame.args[1]; -- description
} )
} )
:addRow('URL', frame.args[1])
:addImage(
:addRow('Project Status', frame.args[2])
-- featured image
:addRow('Archiving Status', frame.args[3])
'[[File:' + frame.args[2] + '|200px]]',
:addRow('Project Source', frame.args[4])
-- caption
frame.args[3]
)
:addRow('URL', frame.args[4])
:addRow('Project Status', frame.args[5])
:addRow('Archiving Status', frame.args[6])
:addRow('Project Source', frame.args[7])
end
end


return p
return p

Revision as of 19:35, 8 January 2017

Documentation for this module may be created at Module:Infobox Test/doc

local p = {}
 
function p.run(frame)
	local capiunto = require 'capiunto'
	return capiunto.create( {
		top = tostring(mw.title.getCurrentTitle()),
		topStyle = 'background:#cfc;',
		bottom = frame.args[1]; -- description
	} )
	:addImage(
		-- featured image
		'[[File:' + frame.args[2] + '|200px]]',
		-- caption
		frame.args[3]
	)
	:addRow('URL', frame.args[4])
	:addRow('Project Status', frame.args[5])
	:addRow('Archiving Status', frame.args[6])
	:addRow('Project Source', frame.args[7])
end

return p