Module:Infobox Test: Difference between revisions

From Bibliotheca Anonoma
(Created page with "local capiunto = require 'capiunto' capiunto.create( { title = 'Title of the Infobox' } ) :addRow( 'A label', 'some data' ) :addHeader( 'A header between the data rows' ) :ad...")
 
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
local capiunto = require 'capiunto'
local p = {}
capiunto.create( {
title = 'Title of the Infobox'
function p.default(frame)
} )
local capiunto = require 'capiunto'
:addRow( 'A label', 'some data' )
return capiunto.create( {
:addHeader( 'A header between the data rows' )
top = tostring(mw.title.getCurrentTitle()),
:addRow( 'Another label', 'more data' )
topStyle = 'background:#cfc;',
bottom = frame.args["description"]; -- description
} )
:addImage(
string.format('[[File:%s|200px]]', frame.args["img_url"]), -- featured image
frame.args["caption"] -- caption
)
:addRow('URL', frame.args["url"])
:addRow('Project Status', frame.args["project_status"])
:addRow('Archiving Status', frame.args["archiving_status"])
:addRow('Project Source', frame.args["project_source"])
end
 
return p

Latest revision as of 19:56, 8 January 2017

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

local p = {}
 
function p.default(frame)
	local capiunto = require 'capiunto'
	return capiunto.create( {
		top = tostring(mw.title.getCurrentTitle()),
		topStyle = 'background:#cfc;',
		bottom = frame.args["description"]; -- description
	} )
	:addImage(
		string.format('[[File:%s|200px]]', frame.args["img_url"]), -- featured image
		frame.args["caption"] -- caption
	)
	:addRow('URL', frame.args["url"])
	:addRow('Project Status', frame.args["project_status"])
	:addRow('Archiving Status', frame.args["archiving_status"])
	:addRow('Project Source', frame.args["project_source"])
end

return p