Content deleted Content added
Per edit request |
per edit request on talk page - fix the node_function{orphan} bug |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 6:
'Third place'
},
-- The text and background colors are paired and when you set one, you should set the other (accessibility)
textColor = {head = '#202122', '#202122', '#202122', '#202122', '#202122'},
bgColor = {head = '#f2f2f2', 'gold', 'silver', '#C96', '#f9f9f9'},
reuseStr = {},
Line 175 ⟶ 177:
['text-align'] = 'center',
border = '1px solid #aaa',
['background-color'] = p.bgColor.head,
color = p.textColor.head
}
end
Line 265 ⟶ 268:
end
p.teamBoxPadTab = {padding = '0 ' .. p.teamBoxPadding()}
p.teamBoxNormal = {border = '1px solid #aaa', ['background-color'] = p.bgColor[4], color = p.textColor[4]}
local function teamBox(v, r, f)
if p.flex_tree.merge and not v and f.phase == 2 then
Line 291 ⟶ 294:
else
cell = p.teamBoxPadTab
local text = v or f[1] and '' or ' '
if f.bold then
text = mw.ustring.gsub(text, '(%(%[%[[^%[%]]*%]%]%))', '<span style="font-weight:normal">%1</span>')
end
tab.r = rowNum[r]:tag'td'
Line 296 ⟶ 303:
:css(cell)
:attr{rowspan = 2}
:node(mw.html.create(f.bold and 'b'):wikitext(
end
end
Line 345 ⟶ 352:
for _, v in ipairs({--more args to boolean
'widescore',
'color',
'color_repechage',
Line 451 ⟶ 456:
setmetatable(scoreWidth, _scoreWidth)
end
▲ end
local head_br = {
count = 0,
Line 483 ⟶ 484:
or p.RD[#p.RD + k - p.tCols - 1]
or ('Round of ' .. math.pow(2, p.tCols - k + 1))
drawHead(head.wt)
end
end
Line 524 ⟶ 520:
rowNum[1]:node(c < p.cols and
mw.clone(bumpBase):attr{rowspan = bump}
)
end
Line 665 ⟶ 656:
end
p.teamBoxCSS = (colorFinal or col.color_repechage) and
{border = p.teamBoxNormal.border, ['background-color'] = p.bgColor[color_index], color = p.textColor[color_index]}
or p.teamBoxNormal
else
p.teamBoxCSS = (colorFinal or col.color_repechage) and
{border = p.teamBoxNormal.border, ['background-color'] = p.bgColor[m.phase + (col.show3rd or 0) + (col.color_repechage or 0)], color = p.textColor[m.phase + (col.show3rd or 0) + (col.color_repechage or 0)]}
or p.teamBoxNormal
end
Line 740 ⟶ 731:
end
col.n = 0
col.t2 = nil
for r = bumps + 1, rows, p.unit * 2 do
tab.r = rowNum[r]:tag'td'
Line 748 ⟶ 740:
col.n = col.n + 2
col.t2 = skipMatch[col.tot + col.n / 2 + 1] and 3 or ((skipMatch[col.top + col.n] and 1 or 0) + (skipMatch[col.top + col.n + 1] and 2 or 0))
if col.t == 0 then --draws the ']' when a PAIR of matches needs lines
tab.r
:attr{rowspan = maxSpan(p.unit * 2, r, rows)}
Line 755 ⟶ 747:
['border-left'] = 0
})
else --draws the lines when only top OR bottom match need lines
tab.r
:attr{rowspan = maxSpan(p.unit, r, rows)}
Line 853 ⟶ 845:
['background-color'] = p.bgColor.head,
border = '1px solid #aaa',
color = p.textColor.head,
['text-align'] = 'center',
width = width
|