Module:MLB standings: Difference between revisions

Content deleted Content added
Update to ___location of data subpage in production version of module
moved navbar into table heading
Line 13:
end
 
local Navbar = require('Module:Navbar')
 
-- Temporary workaround for missing mw.text utility functions
Line 117 ⟶ 118:
local year = mw.text.trim(frame.args.year)
local division = mw.text.trim(frame.args.division)
local divisionForNavbox = division
 
local divisionForNavbox = division
if (mlbData.abbreviationForDivision[division] ~= nil) then
divisionForNavbox = mlbData.abbreviationForDivision[division]
end
 
local standingsPage = year .. ' ' .. divisionForNavbox .. ' standings',
 
local seedInfo = {}
Line 151 ⟶ 154:
 
local outputSeq = { }
 
 
local navbarText =
Navbar.navbar({
mini = 1standingsPage,
mini = }} .. '\n'1,
style = 'float:left;width:0',
})
 
table.insert(outputSeq,
'{| class="wikitable" width="6075%" style="text-align:center;"\
frame:expandTemplate{ title = 'navbar', args = {
! width="3850%" | ' .. navbarText .. division .. '\
year .. ' ' .. divisionForNavbox .. ' standings',
mini = 1,
}} .. '\n'
)
table.insert(outputSeq,
'{| class="wikitable" width="60%" style="text-align:center;"\
! width="38%" | ' .. division .. '\
! width="7%" | [[Win (baseball)|W]]\
! width="7%" | [[Loss (baseball)|L]]\
! width="9%" | [[Winning percentage|Pct.]]\
! width="7%" | [[Games behind|GB]]\
! width="910%" | [[Home (sports)|Home]]\
! width="910%" | [[Road (sports)|Road]]\
'
)