Перейти к содержанию

Модуль:Football: различия между версиями

Исправлено отображение диагональных ячеек
Исправлено отображение домашних и гостевых результатов на разных строчках
Строка 912: Строка 912:
for _, homeCode in ipairs(teamOrder) do
for _, homeCode in ipairs(teamOrder) do


local row =
local homeRow =
mw.html.create("tr")
mw.html.create("tr")
local awayRow =
mw.html.create("tr")
local teamHeader =  
local teamHeader =  
Строка 925: Строка 927:
teamHeader:css("text-align", "right")
teamHeader:css("text-align", "right")
row:node(teamHeader)
homeRow:node(teamHeader)




Строка 933: Строка 935:
local diagonal = cell("td", "—", "football-diagonal")
local diagonal = cell("td", "—", "football-diagonal")
diagonal:attr("rowspan", 2)
diagonal:attr("rowspan", 2)
row:node(
homeRow:node(
diagonal
diagonal
)
)
Строка 994: Строка 996:
if match.played then
if match.played then
text = match.score
text = match.score
if match.homeGoals > match.awayGoals then
if match.homeGoals < match.awayGoals then
awayResultCell
awayResultCell
:addClass("ui")
:addClass("ui")
:addClass("green")
:addClass("green")
elseif match.homeGoals < match.awayGoals then
elseif match.homeGoals > match.awayGoals then
awayResultCell
awayResultCell
:addClass("ui")
:addClass("ui")
Строка 1032: Строка 1034:
end
end


row:node(homeResultCell)
homeRow:node(homeResultCell)
row:node(awayResultCell)
awayRow:node(awayResultCell)


end
end
Строка 1039: Строка 1041:
end
end


resultsTable:node(row)
resultsTable:node(homeRow)
resultsTable:node(awayRow)


end
end