Module:Infobox/Widget/Header: Difference between revisions

From TwogPedia
No edit summary
Tag: Manual revert
No edit summary
Line 3: Line 3:
function Header.make(title, image)
function Header.make(title, image)
local title = mw.html.create('div')
local title = mw.html.create('div')
:addClass('infobox-title')
:addClass('ib-title')
:wikitext(title)
:wikitext(title)
local imageDiv = mw.html.create('div')
local imageDiv = mw.html.create('div')
:addClass('infobox-image')
:addClass('ib-image')
:wikitext('[[File:'.. image .. '|250px]]')
:wikitext('[[File:'.. image .. '|250px]]')
-- local image = mw.html.create('img')
-- :attr('src', image)
-- :attr()
return {
return {

Revision as of 16:17, 29 August 2022

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

local Header = {}

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


return Header