Diferencia entre revisiones de «Módulo:Infobox Industria»
Ir a la navegación
Ir a la búsqueda
(Página creada con «local p = {} function p.run(frame) local nombreimagen = frame.args['imagen'] or '' local fechacreacion = frame.args['fecha creacion'] or '' local fundador = frame.args…») |
(Sin diferencias)
|
Revisión actual - 08:58 21 sep 2020
La documentación para este módulo puede ser creada en Módulo:Infobox Industria/doc
local p = {} function p.run(frame) local nombreimagen = frame.args['imagen'] or '' local fechacreacion = frame.args['fecha creacion'] or '' local fundador = frame.args['fundador'] or '' local fechacierre = frame.args['fecha cierre'] or '' local sector = frame.args['sector'] or '' local tituloinfobox = frame.args['titulo infobox'] or '' local ubicaciones = frame.args['ubicaciones'] if nombreimagen ~= '' then imagen = '[[' .. nombreimagen .. '|width|300px]]' else imagen = '' end if tituloinfobox ~= '' then titulo = tituloinfobox else titulo = tostring(mw.title.getCurrentTitle()) end local capiunto = require 'capiunto' local infobox = capiunto.create( { top = titulo, topStyle = 'background:#c7c7c7; padding: 10px', headerStyle = 'background:#ffffa1;' } ) infobox:addImage(imagen) infobox:addHeader('Información') infobox:addRow('Período de actividad', fechacreacion .. ' - ' .. fechacierre) infobox:addRow('Fundador/es', fundador) infobox:addRow('Sector', sector) infobox:addRow('Ubicaciones', ubicaciones) return infobox end return p