Module:Infobox/Widget/Header

From TwogPedia
Revision as of 09:00, 29 August 2022 by Couchor (talk | contribs) (Created page with "local Header = {} function Header.main(title, image) local title = mw.html.create('div') :addClass('infobox-title') :wikitext(title) local imageDiv = mw.html.create('div') :addClass('infobox-image') :wikitext('250px') -- local image = mw.html.create('img') -- :attr('src', image) -- :attr() return { mw.html.create('div'):node(title):node(imageDiv) } end return Header")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Infobox/Widget/Header/doc

local Header = {}

function Header.main(title, image)
	local title = mw.html.create('div')
			:addClass('infobox-title')
			:wikitext(title)
	local imageDiv = mw.html.create('div')
			:addClass('infobox-image')
			:wikitext('[[File:'.. image .. '|250px]]')
	-- local image = mw.html.create('img')
	-- 		:attr('src', image)
	-- 		:attr()
	
	return {
		mw.html.create('div'):node(title):node(imageDiv)
	}
end


return Header