No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
retval:addImage( '[[File:'..args.cover..'|2000px]]', args.coverCaption, 'brand-md-cover-div' ) end | retval:addImage( '[[File:'..args.cover..'|2000px]]', args.coverCaption, 'brand-md-cover-div' ) end | ||
if args.industry and args.industry ~= '' then | if args.industry and args.industry ~= '' then | ||
retval:addRow( 'Industry', args.industry, 'brand-md-industry-div' ) end | retval:addRow( 'Industry', args.industry, 'brand-md-industry-div' ) | ||
else | |||
retval:addRow( 'Click on this box, then \'Edit\' to add information about this brand.' ) end | |||
if args.parent and args.parent ~= '' then | if args.parent and args.parent ~= '' then | ||
retval:addRow( 'Owner(s)', args.parent, 'brand-md-parent-div' ) end | retval:addRow( 'Owner(s)', args.parent, 'brand-md-parent-div' ) end |
Revision as of 04:01, 5 February 2024
Documentation for this module may be created at Module:BrandHeader/doc
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local retval = capiunto.create( {
title = frame.args.title,
headerStyle = 'background-color:grey;',
} )
if args.logo and args.logo ~= '' then
retval:addImage( '[[File:'..args.logo..'|160px]]', tostring(args.title)..tostring(' logo'), 'brand-md-logo-div' ) end
if args.cover and args.cover ~= '' then
retval:addImage( '[[File:'..args.cover..'|2000px]]', args.coverCaption, 'brand-md-cover-div' ) end
if args.industry and args.industry ~= '' then
retval:addRow( 'Industry', args.industry, 'brand-md-industry-div' )
else
retval:addRow( 'Click on this box, then \'Edit\' to add information about this brand.' ) end
if args.parent and args.parent ~= '' then
retval:addRow( 'Owner(s)', args.parent, 'brand-md-parent-div' ) end
if args.brands and args.brands ~= '' then
retval:addRow( 'Sub-Brands', args.brands, 'brand-md-brands-div' ) end
if args.products and args.products ~= '' then
retval:addRow( 'Products', args.products, 'brand-md-products-div' ) end
return retval
end
return p