Module:Mainpage title

local p = {} local title_data = require('Module:Mainpage title/data')

local function make_table(data) local grad, tag grad = 'linear-gradient(#111,#289197)' --'linear-gradient(#000,' .. data.grad_end .. ')' tag = mw.html.create('td') tag	 :addClass('mp-ctitle') :css({					color = 'black',					['font-family'] = "sans-serif",					['font-weight'] = "bold",					['letter-spacing'] = '1px',					['line-height'] = '2em',					['text-align'] = "center",					['padding-left'] = '15px',					['padding-right'] = '15px',					['text-fill-color'] = 'black',					['background-image'] = grad,					['background-clip'] = 'text',					['-webkit-background-clip'] = 'text',					['-webkit-text-fill-color'] = 'transparent',				}) :tag('span') :css('font-size', '14px') :wikitext('THE') :done :tag('br'):done :tag('span') :css('font-size', '30px') :wikitext('O') :done :tag('span') :css('font-size', '25px') :wikitext('PEN') :done :wikitext(' ') :tag('span') :css('font-size', '30px') :wikitext('F') :done :tag('span') :css('font-size', '25px') :wikitext('ALDON') :done :wikitext(' ') :tag('span') :css('font-size', '30px') :wikitext('W') :done :tag('span') :css('font-size', '25px') :wikitext('IKI') :done :done return mw.html.create('table') :addClass('mp-title') :attr('align', 'center') :tag('tr') :node(tag) --				:done :done end

p.main = function(frame) local seed = os.time + math.floor(os.clock * 1000000000) math.randomseed(seed) local t = make_table(title_data[math.random(#title_data)]) local d1, d2	d1 = mw.html.create('div') :addClass('center') :wikitext("The wiki devoted to Open Faldon that anyone can edit.") :done d2 = mw.html.create('div') :addClass('center') :wikitext(mw.getContentLanguage:formatNum(mw.site.stats.articles) .. " articles since 16 September 2020.") :done return tostring(t)..'\n'..tostring(d1)..'\n'..tostring(d2) end

return p