Module:Infobox: Difference between revisions
increased font size for title |
more rounded; editable title color |
||
| Line 4: | Line 4: | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local root = mw.html.create('table') | local root = mw.html.create('table') | ||
:addClass('infobox') | |||
:css('border', '1px solid var(--vw-border)') | |||
:css('border-radius', '4px') | |||
:css('overflow', 'hidden') | |||
:css('font-size', '90%') | |||
:css('background', 'var(--vw-bg-subtle)') | |||
:css('padding-bottom', '4px') | |||
local titlebg = (args.titlebg and args.titlebg ~= '') and args.titlebg or 'var(--vw-accent-subtle)' | |||
if args.title and args.title ~= '' then | if args.title and args.title ~= '' then | ||
root:tag('tr') | |||
:tag('th') | |||
:attr('colspan', '2') | |||
:css('width', '100%') | |||
:css('text-align', 'center') | |||
:css('font-size', '125%') | |||
:css('background', titlebg) | |||
:css('padding', '6px') | |||
:wikitext(args.title) | |||
end | end | ||