Module:InfoboxTitle

local p = {} local siteColor = require('Module:SiteColor') -- Import the SiteColor module

function p.main(frame) local args = frame:getParent.args -- content is first unnamed argument local content = args[1] or '' -- color argument or default to Generic local color = args['color'] or siteColor.getSiteColor("Generic") -- Get any additional styles local style = args['style'] or ''

return p.getTitle(content, color, style) end

-- Function to render the div with styles function p.getTitle(content, color, style) -- Start the HTML div string local result = '<div style="'

-- Add the styles result = result .. 'padding: 10px; ' result = result .. 'background: rgba(' .. color .. ', 0.3); ' result = result .. 'border-width: 1px 5px 1px 5px; ' result = result .. 'border-style: solid; ' result = result .. 'border-color: rgba(' .. color .. ', 0.5); ' result = result .. 'border-radius: 5px 5px 5px 5px; ' result = result .. 'text-align: center; ' result = result .. 'font-size: 20px; '

-- Add any additional styles if style ~= '' then result = result .. style end

-- Close the style attribute and add the content result = result .. '">' .. "" .. content .. "" .. ' '

return result end

return p