FANDOM


-- <nowiki>
-- TODO: Clean up to only use one builder; shouldn't use mw.html.create more than once
local p = {}
local title_data = require('Module:Mainpage title/data')
 
local function make_table(data)
	local grad, tag
	grad = 'linear-gradient(#000,' .. data.grad_end .. ')'
	tag = mw.html.create('td')
	tag	 :addClass('mp-ctitle')
			:css({
					color = 'black',
					['font-family'] = "'League Spartan', sans-serif",
					['font-weight'] = 790,
					['letter-spacing'] = '2px',
					['line-height'] = '2em',
					['padding-left'] = '15px',
					['padding-right'] = '15px',
					['background-image'] = '-webkit-'..grad,
					['-webkit-background-clip'] = 'text',
					['-webkit-text-fill-color'] = 'transparent',
					['-moz-text-fill-color'] = 'black',
					['text-fill-color'] = 'black',
				})
			:tag('span')
				:css('font-size', '34px')
				:wikitext('THE')
			:done()
			:tag('br'):done()
			:tag('span')
				:css('font-size', '50px')
				:wikitext('ZA')
			:done()
			:tag('span')
				:css('font-size', '50px')
				:wikitext('MO')
			:done()
			:tag('span')
				:css('font-size', '50px')
				:wikitext('RAK')
			:done()
			:wikitext('&nbsp;&nbsp;')
			:tag('span')
				:css('font-size', '50px')
				:wikitext('W')
			:done()
			:tag('span')
				:css('font-size', '45px')
				:wikitext('IKI')
			:done()
		:done()
 
 
	return mw.html.create('table')
				:addClass('mp-title')
				:attr('align', 'center')
				:tag('tr')
					:tag('td')
						:addClass('mp-ltitle')
						:wikitext('[[File:' .. data.icon_left .. '.png|link=' .. data.icon_left .. ']]')
					:done()
					:node(tag)
					:tag('td')
						:addClass('mp-rtitle')
						:wikitext('[[File:' .. data.icon_right .. '.png|link=' .. data.icon_right .. ']]')
					:done()
				:done()
			:done()
end
 
p.main = function(frame)
	math.randomseed(os.time())
	local t = make_table(title_data[math.random(#title_data)])
	local d1
	d1 = mw.html.create('div')
			:addClass('center')
			:wikitext(mw.getContentLanguage():formatNum(mw.site.stats.articles) .. " articles since 5th of May 2016.")
		:done()
	return tostring(t)..'\n'..tostring(d1)
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.