Module:Documentation: Difference between revisions

Jump to navigation Jump to search
m>Mr. Stradivarius
m fix typo
m>Mr. Stradivarius
create new function to separate html rendering in the start box
Line 380: Line 380:
end
end


return tostring(sbox)
end
function p.renderStartBox(data)
-- Renders the start box html.
local sbox = htmlBuilder.create('div')
sbox
.css('padding-bottom', '3px')
.css('border-bottom', '1px solid #aaa')
.css('margin-bottom', '1ex')
.newline()
.tag('span')
.cssText(data.headingStyleText)
.css('font-weight', data.headingFontWeight)
.css('font-size', data.headingFontSize)
.wikitext(data.heading)
if data.showLinks then
sbox.tag('span')
.addClass(data.linksClass)
.attr('id', data.linksId)
.wikitext(data.links)
end
return tostring(sbox)
return tostring(sbox)
end
end