Module:Qud look: Difference between revisions

Jump to navigation Jump to search
287 bytes added ,  20:47, 27 October 2019
no edit summary
(can now parse notxml)
No edit summary
Line 70: Line 70:


--[Return html]--
--[Return html]--
local html = {
local html = mw.html.create('div')
  '<div class="qud-box-wrapper ' ..bordercolor..'"><div class="qud-box"><span class="qud-box-header"><b>' .. title .. '</b></span><div class="qud-box-content" style="font-weight:bold; line-height:1.5em; padding:0em '..padding..'em;">'..qudtext..'</div><span class="qud-box-footer-left">'..parsedbottomtext..'</span></div></div>'
html
  }
    :addClass('qud-box-wrapper ' .. bordercolor)
    :node(mw.html.create('div')
        :addClass('qud-box')
        :node(mw.html.create('span')
              :addClass('qud-box-header')
              :wikitext('<b>' .. title .. '</b>'))
        :node(mw.html.create('div')
              :addClass('qud-box-content')
              :css({['font-weight']='bold', ['line-height']='1.5em', ['padding']='0em' .. padding .. 'em'})
              :wikitext(qudtext))
        :node(mw.html.create('span')
              :addClass('qud-box-footer-left')
              :wikitext(parsedbottomtext))
    )


return table.concat(html , '\n')
return tostring(html) .. '\n'
end
end


return p
return p

Navigation menu