Module:CareerList: Difference between revisions

no edit summary
No edit summary
No edit summary
 
-- Функция для создания ячейки таблицы
function p.makeCell(cellType, site, id, alias, notesargs)
local function getColor(index)
return (index % 2 == 0) and '#F3F3F3' or '#FFFFFF'
end
 
local site = args.site or mw.title.getCurrentTitle().text
local id = args.id or ''
local alias = args.alias or ''
local notes = args.notes or ''
local background = getBackground(site)
 
:css('background-color', background)
:css('padding', '8px')
:wikitext(id or '')
:done()
 
if config[site] then
local url = config[site].url
local id = mw.text.encode(site.id)
return string.format('[%s %s]', url:gsub('$1', id), site)
else