Diferencia entre revisiones de «Módulo:Ficha»

Deshecha la edición 67179539 de Miguillen (disc.)
Sin resumen de edición
Línea 73: Línea 73:


local function renderTitle()
local function renderTitle()
     if not args['titulo'] then return end
     if not args.titulo then return end


     root
     root
Línea 89: Línea 89:
             .tag('th')
             .tag('th')
                 .attr('colspan', 2)
                 .attr('colspan', 2)
                .addClass
                 .addClass(args.aboveclass)
                 .addClass(args.aboveclass)
                 .css('text-align', 'center')
                 .css('text-align', 'center')
                 .css('font-size', '155%')
                 .css('font-size', '125%')
                 .css('font-weight', 'bold')
                 .css('font-weight', 'bold')
                 .cssText(args.abovestyle)
                 .cssText(args.abovestyle)
Línea 115: Línea 114:
local function renderSubheaders()
local function renderSubheaders()
     if args.subheader then
     if args.subheader then
         args.subheader1 = args.subheader
         args.subheader1 = args.subtitulo
     end
     end
     if args.subheaderrowclass then
     if args.subheaderrowclass then
         args.subheaderrowclass1 = args.subheaderrowclass
         args.clasesubtitulo1 = args.clasesubtitulo
     end
     end
     local subheadernums = getArgNums('subtitulo')
     local subtitulonumero = getArgNums('subtitulo')
     for k, num in ipairs(subheadernums) do
     for k, num in ipairs(subtitulonumero) do
         addRow({
         addRow({
             data = args['subtitulo' .. num],
             datos = args['subtitulo' .. num],
             datastyle = args.subheaderstyle or args['estilosubtitulo' .. num],
             estilodatos = args.estilosubtitulo or args['estilosubtitulo' .. num],
             class = args.subheaderclass,
             clase = args.clasesubtiltulo,
             rowclass = args['clasesubtitulo' .. num]
             clasefila = args['clasesubtitulo' .. num]
         })
         })
     end
     end
Línea 132: Línea 131:


local function renderImages()
local function renderImages()
     if args['imagen'] then
     if args.imagen then
         args['imagen1'] = args['imagen']
         args.imagen1 = args.imagen
     end
     end
     if args.caption then
     if args.caption then
         args.caption1 = args.caption
         args.pie1 = args.pie
     end
     end
     local imagenums = getArgNums('imagen')
     local imagenums = getArgNums('imagen')
Línea 142: Línea 141:
         local caption = args['pie' .. num]
         local caption = args['pie' .. num]
         local data = HtmlBuilder.create().wikitext(args['imagen' .. num])
         local data = HtmlBuilder.create().wikitext(args['imagen' .. num])
         if caption then
         if pie then
             data
             data
                 .tag('br', {selfClosing = true})
                 .tag('br', {selfClosing = true})
Línea 151: Línea 150:
         end
         end
         addRow({
         addRow({
             data = tostring(data),
             datos = tostring(data),
             datastyle = args.imagestyle,
             estilodatos = args.estiloimagen,
             class = args.imageclass,
             clase = args.claseimagen,
             rowclass = args['claseimagen' .. num]
             clasefila = args['claseimagen' .. num]
         })
         })
     end
     end
Línea 164: Línea 163:
     for k, num in ipairs(rownums) do
     for k, num in ipairs(rownums) do
         addRow({
         addRow({
             header = args['seccion' .. num],
             seccion = args['seccion' .. num],
             label = args['etiqueta' .. num],
             etiqueta = args['etiqueta' .. num],
             data = args['datos' .. num],
             datos = args['datos' .. num],
             datastyle = args['estilodatos' .. num],
             estilodatos = args['estilodatos' .. num],
             class = args['clase' .. num],
             clase = args['clase' .. num],
             rowclass = args['clasefila' .. num]
             clasefila = args['clasefila' .. num]
         })
         })
     end
     end
Línea 175: Línea 174:


local function renderNavBar()
local function renderNavBar()
     if not args.name then return end
     if not args.nombre then return end
      
      
     root
     root
Línea 222: Línea 221:
         root = HtmlBuilder.create()
         root = HtmlBuilder.create()
          
          
         if args.title then
         if args.titulo then
             root.wikitext("'''" .. args.title .. "'''")
             root.wikitext("'''" .. args.title .. "'''")
         end
         end