Module:Infobox monument

De WikiPerche

La documentation pour ce module peut être créée à Module:Infobox monument/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:#8a6b23;'
	end
	local retval = capiunto.create( {
		title = args.title,
		headerStyle = headerStyle, 
	} )
    :addHeader( 'Général' )
    :addImage( args.image, args.caption )
    :addRow( 'Construction', args.construction)
    :addRow( 'Propriété', args.propriete)
    :addHeader( 'Protection aux Monuments Historiques' )
	:addRow( 'Classé', args.mhclasse)
	:addRow( 'Inscrit', args.mhinscrit)
    :addRow( 'Objet', args.mhobjet)

	return retval
end

return p