Module:FancyInfobox

From Wikidata
Jump to navigation Jump to search

Documentation for this module may be created at Module:FancyInfobox/doc

local p = {}

function p.fancy_infobox(frame)
	local fancy_table = mw.html.create('table')
	    :css({
				['background-color'] = '#94ff94',
				padding = '10px',
		})
		:tag('tr')
			:tag('th')
			:css({
				color = 'white',
				['font-size'] = '300%',
				['background-color'] = '#f56a3d',
				padding = '10px',
			})
				:wikitext('This is the table header')
	    	:done()
		:done()
		:tag('tr')
			:tag('td')
			:css({
				border = '5px dashed blue',
				['font-weight'] = 900,
				['text-align'] = 'right',
				['background-color'] = 'white',
				padding = '10px',
			})
				:wikitext('This is a table body cell')
			:done()
		:done()
	
	return tostring(fancy_table)
end

return p