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 imgBottomPad = caption ~= '' and '6px 6px 2px 6px' or '6px' | |||
root:tag('tr') | |||
:tag('td') | |||
:attr('colspan', '2') | |||
:css('text-align', 'center') | |||
:css('padding', imgBottomPad) | |||
:wikitext('[[File:' .. args.image .. '|300px]]') | |||
if caption ~= '' then | |||
root:tag('tr') | |||
:tag('td') | |||
:attr('colspan', '2') | |||
:css('text-align', 'center') | |||
:css('padding', '0px 6px 4px 6px') | |||
:wikitext(caption) | |||
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') | ||
:wikitext(header) | :wikitext(header) | ||
elseif data and data ~= '' then | elseif data and data ~= '' then | ||