Modul:Sports series: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
transklusi/penyisipan bagian
opsi perubahan ukuran tabel; nama tim kosong namun dengan bendera
Baris 175:
local noFlagIcons = false
local fillBlanks = args.fill_blanks and (args.fill_blanks == 'y' or args.fill_blanks == 'yes' or args.fill_blanks == '1' or args.fill_blanks == 'true')
-- Process the size parameter
local size
if args.size then
-- Remove trailing '%' if present and convert to number
size = tonumber((args.size:gsub('%s*%%$', '')))
if size then
size = math.max(size, 85) -- Ensure size is at least 85
end
end
 
-- Process flag parameter to determine flag template and variant
Baris 224 ⟶ 234:
if args.nowrap and (args.nowrap == 'y' or args.nowrap == 'yes' or args.nowrap == '1' or args.nowrap == 'true') then
tableStyle = tableStyle .. ' white-space: nowrap;'
end
if size then
tableStyle = tableStyle .. ' font-size: ' .. size .. '%;'
end
 
Baris 337 ⟶ 350:
local team1Text, team2Text
if flagParam1 then -- Check whether youth team flag template with age level is used
team1Text = (not team1Asterick and team1 ~= "" and team1 ~= nil) and (expandTemplate(frame, flagTemplate .. '-rt', {flagParam1, team1, variant = team1Variant})) or (team1 ~= nil and team1 or "")
team2Text = (not team2Asterick and team2 ~= "" and team2 ~= nil) and (expandTemplate(frame, flagTemplate, {flagParam1, team2, variant = team2Variant})) or (team2 ~= nil and team2 or "")
else -- Use standard national team flag template without age level
team1Text = (not team1Asterick and team1 ~= "" and team1 ~= nil) and (expandTemplate(frame, flagTemplate .. '-rt', {team1, variant = team1Variant})) or (team1 ~= nil and team1 or "")
team2Text = (not team2Asterick and team2 ~= "" and team2 ~= nil) and (expandTemplate(frame, flagTemplate, {team2, variant = team2Variant})) or (team2 ~= nil and team2 or "")
end
-- When set by user, adds blank flags when string is used for a team instead of national team flag template
Baris 353 ⟶ 366:
end
-- Create rows for aggregate score and team names, bolded if set by user
row:tag('td'):cssText(team1Style):wikitext((team1Winner and (boldWinner or manualBold) and team1Text ~= '') and ('<strong>' .. team1Text .. '</strong>') or team1Text)
row:tag('td'):css('text-align', 'center'):css('width', scoreWidth):wikitext(aggregateScore)
row:tag('td'):cssText(team2Style):wikitext((team2Winner and (boldWinner or manualBold) and team2Text ~= '') and ('<strong>' .. team2Text .. '</strong>') or team2Text)
else
-- Process rows for club matches
Baris 376 ⟶ 389:
local team2Style = team2Winner and ((colorWinner or manualColor) and 'background-color: #CCFFCC;' or '') .. 'text-align: left;' or 'text-align: left;'
-- Generate text, and flags (if not disabled), to display for each team
local team1Text = noFlagIcons and (team1 or '') or ((team1Icon ~= "" and team1Icon ~= nil) and ((team1 or '') .. ' ' .. expandTemplate(frame, flagTemplate, {team1Icon, variant = team1Variant})) or (team1 or ''))
local team2Text = noFlagIcons and (team2 or '') or ((team2Icon ~= "" and team2Icon ~= nil) and (expandTemplate(frame, flagTemplate, {team2Icon, variant = team2Variant}) .. ' ' .. (team2 or '')) or (team2 or ''))
-- When set by user, adds blank flags when country code parameter is left blank
if fillBlanks then