« Module:Infobox commune » : différence entre les versions
De WikiPerche
Aucun résumé des modifications Balise : Révocation manuelle |
Aucun résumé des modifications |
||
Ligne 20 : | Ligne 20 : | ||
:addRow( 'Densité de population', args.densite ) | :addRow( 'Densité de population', args.densite ) | ||
:addRow( 'Gentilé', args.gentile ) | :addRow( 'Gentilé', args.gentile ) | ||
:addRow( 'Bassin de vie', args.bassin ) | |||
:addHeader( 'Informations administratives' ) | :addHeader( 'Informations administratives' ) | ||
:addRow( 'Région', args.region ) | :addRow( 'Région', args.region ) |
Version du 23 décembre 2023 à 18:42
La documentation pour ce module peut être créée à Module:Infobox commune/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:grey;'
end
local retval = capiunto.create( {
title = args.title,
headerStyle = headerStyle,
} )
:addImage( args.image, args.caption )
:addRow( 'Nombre d\'habitants', args.habitants )
:addRow( 'Superficie', args.superficie )
:addRow( 'Densité de population', args.densite )
:addRow( 'Gentilé', args.gentile )
:addRow( 'Bassin de vie', args.bassin )
:addHeader( 'Informations administratives' )
:addRow( 'Région', args.region )
:addRow( 'Département', args.departement )
:addRow( 'Code postal', args.codepostal )
:addRow( 'Code INSEE', args.codeinsee )
return retval
end
return p