Module:Infobox: Difference between revisions

Jump to navigation Jump to search
435 bytes added ,  15:54, 23 August 2019
add 'class' and 'style' parameters for applying custom class or style to infobox wrapper div
imported>CaptainTechnicality54384
No edit summary
(add 'class' and 'style' parameters for applying custom class or style to infobox wrapper div)
Line 68: Line 68:
footer = '| class="infobox-footer" colspan="2" | ' .. footer
footer = '| class="infobox-footer" colspan="2" | ' .. footer
end
end
        local infoboxStartDiv = '<div class="moduleinfobox'
        local class = args.class
        if class then
                infoboxStartDiv = infoboxStartDiv .. ' ' .. class
        end
        infoboxStartDiv = infoboxStartDiv .. '"'
        local style = args.style
        if style then
                infoboxStartDiv = infoboxStartDiv .. ' style="' .. style .. '"'
        end
       
        infoboxStartDiv = infoboxStartDiv .. '>'
local html = {
local html = {
'<div class="moduleinfobox">',
infoboxStartDiv,
'<div class="infobox-title">' .. title .. '</div>',
'<div class="infobox-title">' .. title .. '</div>',
imageArea,
imageArea,

Navigation menu