Module:Sports series: Difference between revisions

Content deleted Content added
add legend
improve logic
Line 237:
local matchesStyle = args.matches_style
local isFBRStyle = matchesStyle and matchesStyle:upper() == "FBR"
local isHA = args.h_a == 'y' or args.h_a == 'yes' or args.h_a == '1' or args.h_a == 'true'
 
local tableClass = 'wikitable'
Line 260 ⟶ 261:
 
-- Add FBR legend if isFBRStyle is true
if isFBRStyle and legs == 0 then
root:node(createFBRLegend())
isHA = true
end
 
Line 284 ⟶ 286:
-- Create the header row with team and score columns
local header = table:tag('tr')
local defaultTeam1 = (args.h_a == 'y' or args.h_a == 'yes' or args.h_a == '1' or args.h_a == 'true')isHA and 'Home' or 'Team 1'
local defaultTeam2 = (args.h_a == 'y' or args.h_a == 'yes' or args.h_a == '1' or args.h_a == 'true')isHA and 'Away' or 'Team 2'
header:tag('th')
:attr('scope', 'col')