"मोड्युल:Userbox" का संशोधनहरू बिचको अन्तर

Content deleted Content added
imported>De728631
Undid revision 616610939 by Jackmcbarn (talk): apparently this broke the <div> formatting resulting in the template content not being rendered as a box
use mw.html from sandbox
पङ्क्ति २:
 
local getArgs = require('Module:Arguments').getArgs
local htmlBuilder = require('Module:HtmlBuilder')
local categoryHandler = require('Module:Category handler').main
 
Line २१३ ⟶ २१२:
-- Renders the userbox html using the content of the data table.
-- Render the div tag html.
local root = htmlBuildermw.html.create('div')
root
.:css('float', data.float)
.:css('border', (data.borderWidth or '') .. ' solid ' .. (data.borderColor or ''))
.:css('margin', '1px')
.:css('width', data.width)
.:addClass('wikipediauserbox')
.:addClass(data.bodyClass)
 
-- Render the table tag html.
local tableroot = root.:tag('table')
tableroot
.:css('border-collapse', 'collapse')
.:css('width', data.width)
.:css('margin-bottom', '0')
.:css('background', data.backgroundColor)
-- Render the id html.
local tablerow = tableroot.:tag('tr')
if data.showId then
tablerow.:tag('th')
.:css('border', '0')
.:css('width', data.idWidth)
.:css('height', data.idHeight)
.:css('background', data.idBackgroundColor)
.:css('text-align', data.idTextAlign)
.:css('font-size', data.idFontSize)
.:css('color', data.idColor)
.:css('padding', data.idPadding)
.:css('line-height', data.idLineHeight)
.:css('vertical-align', 'middle')
.:cssText(data.idOtherParams)
.:addClass(data.idClass)
.:wikitext(data.id)
end
 
-- Render the info html.
tablerow.:tag('td')
.:css('border', '0')
.:css('text-align', data.infoTextAlign)
.:css('font-size', data.infoFontSize)
.:css('padding', data.infoPadding)
.:css('height', data.infoHeight)
.:css('line-height', data.infoLineHeight)
.:css('color', data.infoColor)
.:css('vertical-align', 'middle')
.:cssText(data.infoOtherParams)
.:addClass(data.infoClass)
.:wikitext(data.info)
-- Render the second id html.
if data.showId2 then
tablerow.:tag('th')
.:css('border', '0')
.:css('width', data.id2Width)
.:css('height', data.id2Height)
.:css('background', data.id2BackgroundColor)
.:css('text-align', data.id2TextAlign)
.:css('font-size', data.id2FontSize)
.:css('color', data.id2Color)
.:css('padding', data.id2Padding)
.:css('line-height', data.id2LineHeight)
.:css('vertical-align', 'middle')
.:cssText(data.id2OtherParams)
.:wikitext(data.id2)
end
 
"https://ne.wikipedia.org/wiki/मोड्युल:Userbox" बाट अनुप्रेषित