Diferencia entre revisiones de «Módulo:Ficha»
Sin resumen de edición |
|||
| Línea 73: | Línea 73: | ||
local function renderTitle() | local function renderTitle() | ||
if not args | 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(args.aboveclass) | .addClass(args.aboveclass) | ||
.css('text-align', 'center') | .css('text-align', 'center') | ||
.css('font-size', ' | .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. | args.subheader1 = args.subtitulo | ||
end | end | ||
if args.subheaderrowclass then | if args.subheaderrowclass then | ||
args. | args.clasesubtitulo1 = args.clasesubtitulo | ||
end | end | ||
local | local subtitulonumero = getArgNums('subtitulo') | ||
for k, num in ipairs( | for k, num in ipairs(subtitulonumero) do | ||
addRow({ | addRow({ | ||
datos = args['subtitulo' .. num], | |||
estilodatos = args.estilosubtitulo or args['estilosubtitulo' .. num], | |||
clase = args.clasesubtiltulo, | |||
clasefila = args['clasesubtitulo' .. num] | |||
}) | }) | ||
end | end | ||
| Línea 132: | Línea 131: | ||
local function renderImages() | local function renderImages() | ||
if args | if args.imagen then | ||
args | args.imagen1 = args.imagen | ||
end | end | ||
if args.caption then | if args.caption then | ||
args. | 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 | if pie then | ||
data | data | ||
.tag('br', {selfClosing = true}) | .tag('br', {selfClosing = true}) | ||
| Línea 151: | Línea 150: | ||
end | end | ||
addRow({ | addRow({ | ||
datos = tostring(data), | |||
estilodatos = args.estiloimagen, | |||
clase = args.claseimagen, | |||
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({ | ||
seccion = args['seccion' .. num], | |||
etiqueta = args['etiqueta' .. num], | |||
datos = args['datos' .. num], | |||
estilodatos = args['estilodatos' .. num], | |||
clase = args['clase' .. num], | |||
clasefila = args['clasefila' .. num] | |||
}) | }) | ||
end | end | ||
| Línea 175: | Línea 174: | ||
local function renderNavBar() | local function renderNavBar() | ||
if not args. | if not args.nombre then return end | ||
root | root | ||
| Línea 222: | Línea 221: | ||
root = HtmlBuilder.create() | root = HtmlBuilder.create() | ||
if args. | if args.titulo then | ||
root.wikitext("'''" .. args.title .. "'''") | root.wikitext("'''" .. args.title .. "'''") | ||
end | end | ||