« Module:Infobox coursdeau » : différence entre les versions
De WikiPerche
Aucun résumé des modifications |
Aucun résumé des modifications Balise : Révoqué |
||
Ligne 9 : | Ligne 9 : | ||
headerStyle = string.format('background-color:%s;', args.headerstyle) | headerStyle = string.format('background-color:%s;', args.headerstyle) | ||
else | else | ||
headerStyle = 'background-color: | headerStyle = 'background-color:#3366c;' | ||
end | end | ||
local titleStyle | local titleStyle | ||
Ligne 15 : | Ligne 15 : | ||
titleStyle = string.format('background-color:%s;', args.titleStyle) | titleStyle = string.format('background-color:%s;', args.titleStyle) | ||
else | else | ||
titleStyle= 'background-color: | titleStyle= 'background-color:#3366c;' | ||
end | end | ||
local retval = capiunto.create( { | local retval = capiunto.create( { |
Version du 13 août 2025 à 16:51
La documentation pour ce module peut être créée à Module:Infobox coursdeau/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:#3366c;'
end
local titleStyle
if args.titleStyle and args.titleStyle ~= '' then
titleStyle = string.format('background-color:%s;', args.titleStyle)
else
titleStyle= 'background-color:#3366c;'
end
local retval = capiunto.create( {
title = args.title,
titleStyle = titleStyle,
headerStyle = headerStyle,
} )
:addImage( args.image, args.caption )
:addRow( 'Code SANDRE', args.codesandre )
:addRow( 'Longueur', args.longueur)
:addRow( 'Communes traversées', args.communestraversees )
:addHeader( 'Hydrographie' )
:addRow( 'Source', args.source )
:addRow( '· Localisation', args.localisationsource )
:addRow( '· Altitude', args.altitudesource )
:addRow( 'Confluence', args.confluence )
:addRow( '· Localisation', args.pointdeconfluence )
:addRow( 'Bassin collecteur', args.bassincollecteur )
return retval
end
return p