Modul:Sports series: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
opsi pewarnaan pemenang agregat serta keterangan/legenda warnanya
Baris 150:
end
return false
end
 
local function createFBRLegend()
return mw.html.create('div')
:css('font-size', '90%')
:css('margin-bottom', '0.5em')
:wikitext("Legenda: Biru = tim kandang menang; Kuning = imbang; Merah = tim tandang menang.")
end
 
Baris 224 ⟶ 231:
local boldWinner = args.bold_winner and (args.bold_winner == 'y' or args.bold_winner == 'yes' or args.bold_winner == '1' or args.bold_winner == 'true')
local colorWinner = args.color_winner and (args.color_winner == 'y' or args.color_winner == 'yes' or args.color_winner == '1' or args.color_winner == 'true')
local matchesStyle = args.matches_style
local isFBRStyle = matchesStyle and matchesStyle:upper() == "FBR"
 
local tableClass = 'wikitable'
Baris 244 ⟶ 253:
if args.id then
table:attr('id', args.id) -- Optional id parameter to allow anchor to table
end
-- Add FBR legend if isFBRStyle is true
if isFBRStyle then
root:node(createFBRLegend())
end
 
Baris 381 ⟶ 395:
-- Create aggregate score cell with conditional styling
local aggregateStyle = 'text-align: center;'
if legs == 0 and isDraw and colorWinner then
if isFBRStyle then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
if team1Winner then
aggregateStyle = aggregateStyle .. '; background-color: #BBF3FF;'
elseif team2Winner then
aggregateStyle = aggregateStyle .. '; background-color: #FFBBBB;'
elseif isDraw then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
end
elseif isDraw and colorWinner then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
end
end
-- Create rows for aggregate score and team names, bolded if set by user
Baris 423 ⟶ 447:
-- Create aggregate score cell with conditional styling
local aggregateStyle = 'text-align: center;'
if legs == 0 and isDraw and colorWinner then
if isFBRStyle then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
if team1Winner then
aggregateStyle = aggregateStyle .. '; background-color: #BBF3FF;'
elseif team2Winner then
aggregateStyle = aggregateStyle .. '; background-color: #FFBBBB;'
elseif isDraw then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
end
elseif isDraw and colorWinner then
aggregateStyle = aggregateStyle .. '; background-color: #FFFFBB;'
end
end
-- Create rows for aggregate score and team names, bolded if set by user