« Module:Infobox ferroviaire » : différence entre les versions
De WikiPerche
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:green;' end local retval = capiunto.create( { title = args.title, headerStyle = headerStyle, } ) :addRow( 'Numéro Officiel', args.numeroofficiel ) :addRow(... » |
Aucun résumé des modifications |
||
Ligne 15 : | Ligne 15 : | ||
headerStyle = headerStyle, | headerStyle = headerStyle, | ||
} ) | } ) | ||
:addRow( 'Numéro | :addRow( 'Numéro officiel', args.numeroofficiel ) | ||
:addRow( 'Propriétaire', args.proprietaire ) | :addRow( 'Propriétaire', args.proprietaire ) | ||
:addHeader( 'Historique' ) | :addHeader( 'Historique' ) |
Version du 30 décembre 2023 à 12:09
La documentation pour ce module peut être créée à Module:Infobox ferroviaire/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:green;'
end
local retval = capiunto.create( {
title = args.title,
headerStyle = headerStyle,
} )
:addRow( 'Numéro officiel', args.numeroofficiel )
:addRow( 'Propriétaire', args.proprietaire )
:addHeader( 'Historique' )
:addRow( 'Mise en service', args.miseenservice )
:addRow( 'Fermeture', args.fermeture )
:addRow( 'Concessionnaire original', args.concessionnaireoriginal )
:addHeader( 'Caractéristiques techniques' )
:addRow( 'Longueur', args.longueur )
:addRow( 'Ecartement', args.ecartement)
:addRow( 'Electrification', args.electrification)
:addRow( 'Nombre de voies', args.nbvoies)
return retval
end
return p