Module:Infobox/Widget/Header: Difference between revisions
From TwogPedia
            No edit summary Tag: Reverted  | 
				No edit summary Tag: Reverted  | 
				||
| Line 1: | Line 1: | ||
local Header = {}  | local Header = {}  | ||
function Header.  | function Header.main(title, image)  | ||
	mw.log(title)  | 	mw.log(title)  | ||
	mw.log(image)  | 	mw.log(image)  | ||
Revision as of 09:02, 29 August 2022
Documentation for this module may be created at Module:Infobox/Widget/Header/doc
local Header = {}
function Header.main(title, image)
	mw.log(title)
	mw.log(image)
	mw.logObject(title)
	mw.logObject(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
No categories