Module:Sports table/WDL: Difference between revisions

Content deleted Content added
Undid revision 967676631 by Frietjes (talk) (moving to main)
Line 5:
-- Load relevant modules
local yesno = require('Module:Yesno')
local floatstyle = {
['left'] = 'float:left;clear:left;margin-right:1em;',
['right'] = 'float:right;clear:right;margin-left:1em;',
['center'] = 'margin-left:auto; margin-right:auto;',
['none'] = ''
}
-- Create table header
Line 19 ⟶ 12:
local show_played = not yesno(Args['hide_played'] or 'no')
local rounds_won = yesno(Args['show_rw'] or Args['rounds_won'] or 'no')
table.insert(t,'{| class="wikitable'..sort_text..'" style="text-align:center;' ..align_text..'"\n') -- Open table
local align_text = floatstyle[Args['float'] or 'none'] or ''
table.insert(t,'{| class="wikitable'..sort_text..'" style="text-align:center;' ..align_text..'"\n') -- Open table
-- Table title
if Args['title'] or Args['table_header'] then
table.insert(t,'|+ ' .. (Args['title'] or Args['table_header']) .. (Args['title_ref'] or '') .. '\n')
end
-- Custom header options