Module:Infobox monument

De WikiPerche
Version datée du 13 août 2025 à 16:04 par Admin (discussion | contributions) (Page créée avec « 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:maroon;' end local retval = capiunto.create( { title = args.title, headerStyle = headerStyle, } ) :addImage( args.image, args.caption ) :addRow( 'Constructi... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

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:maroon;'
	end
	local retval = capiunto.create( {
		title = args.title,
		headerStyle = headerStyle, 
	} )
    :addImage( args.image, args.caption )
    :addRow( 'Construction', args.construction)
    :addRow( 'Propriété', args.propriete)
    :addHeader( 'Classement ou inscription au titre des monuments historiques' )
	:addRow( 'Classé', args.mhclasse)
	:addRow( 'Inscrit', args.mhinscrit)
    :addRow( 'Inscrit', args.mhobjet)

	return retval
end

return p