▶️
Planeshift.
Документацию для этого шаблона или модуля можно найти в Шаблон:Talents.
Вы можете быть перенаправлены на другой язык вики, если перевод недоступен.
Зависимости
local p = {}
local get_args = require('Модуль:Arguments').getArgs
local i18n = {
talents_article = 'Таланты',
table_title = 'Таланты героя',
}
function p.main(frame)
local args = get_args(frame, {
wrappers = {
'Шаблон:Talents'
}
})
local talents = mw.html.create('table')
:addClass('wikitable')
:css('text-align', 'center')
:css('margin-right', '15px')
-- Add the table header.
:tag('tr')
:tag('th')
:attr('colspan', 3)
:css('height', '40px')
:css('background-color', '#0C2A5A')
:wikitext(string.format('[[%s|<span style="color:white; font-size:14pt;">%s</span>]]', i18n.talents_article, i18n.table_title))
:done()
:done()
:newline()
for i=4,1,-1 do
talents
:tag('tr')
:tag('td')
:css('width', '240px')
:wikitext(frame:expandTemplate({ title = 'Talent class', args = { args['t'..i..'left'], args['v'..i..'left'] }}))
:done()
:tag('th')
:css('padding', '10px')
:css('background-color', string.format('hsl(217, 76%%, %i%%)', 60-10*i))
:css('font-size', '13pt')
:css('color', 'white')
:wikitext(5+5*i)
:done()
:tag('td')
:css('width', '240px')
:wikitext(frame:expandTemplate({ title = 'Talent class', args = { args['t'..i..'right'], args['v'..i..'right'] }}))
:done()
:done()
:newline()
end
return talents
end
return p