Module:Infobox: 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
 
(2 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.run()
} )
local capiunto = require 'capiunto'
:addRow( 'A label', 'some data' )
return capiunto.create( {
:addHeader( 'A header between the data rows' )
title = tostring(mw.title.getCurrentTitle()) ,
:addRow( 'Another label', 'more data' )
top = 'Above text',
topStyle = 'background:#cfc;',
bottom = 'Below text'
} )
:addRow('H', 'Hydrogen')
:addRow('He','Helium')
:addRow('Li','Lithium')
:addImage(
'[[File:Keyhole Nebula - Hubble 1999.jpg|200px|alt=Keyhole Nebula - Hubble 1999]]',  
'Caption displayed below'
)
end
return p

Latest revision as of 02:01, 12 June 2017

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

local p = {}
 
function p.run()
	local capiunto = require 'capiunto'
	return capiunto.create( {
		title = tostring(mw.title.getCurrentTitle()) ,
		top = 'Above text',
		topStyle = 'background:#cfc;',
		bottom = 'Below text'
	} )
	:addRow('H', 'Hydrogen')
	:addRow('He','Helium')
	:addRow('Li','Lithium')
	:addImage(
		'[[File:Keyhole Nebula - Hubble 1999.jpg|200px|alt=Keyhole Nebula - Hubble 1999]]', 
		'Caption displayed below'
	)
end
 
return p