Jump to content

Module:Documentation: Difference between revisions

create new function to separate html rendering in the start box
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
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.