Module:Infobox: Difference between revisions

ehh we're going back to 100%
spacing
Line 24: Line 24:
-- Image
-- Image
if args.image and args.image ~= '' then
if args.image and args.image ~= '' then
local caption = args.caption or ''
    local caption = args.caption or ''
root:tag('tr')
    local imgBottomPad = caption ~= '' and '6px 6px 2px 6px' or '6px'
:tag('td')
    root:tag('tr')
:attr('colspan', '2')
        :tag('td')
:css('text-align', 'center')
            :attr('colspan', '2')
:css('padding', '6px')
            :css('text-align', 'center')
:wikitext('[[File:' .. args.image .. '|300px]]')
            :css('padding', imgBottomPad)
if caption ~= '' then
            :wikitext('[[File:' .. args.image .. '|300px]]')
root:tag('tr')
    if caption ~= '' then
:tag('td')
        root:tag('tr')
:attr('colspan', '2')
            :tag('td')
:css('text-align', 'center')
                :attr('colspan', '2')
:css('font-size', '90%')
                :css('text-align', 'center')
:css('padding', '0px 6px 4px 6px')
                :css('padding', '0px 6px 4px 6px')
:wikitext(caption)
                :wikitext(caption)
end
    end
end
end


Line 57: Line 57:
:css('background', 'var(--vw-bg-heading)')
:css('background', 'var(--vw-bg-heading)')
:css('padding', '4px 6px')
:css('padding', '4px 6px')
:css('margin', '8px 0px')
:css('font-size', '95%')
:wikitext(header)
:wikitext(header)
elseif data and data ~= '' then
elseif data and data ~= '' then