Jump to content

Module:Sports color and Module:Sports color/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
m Undid revision 1251613370 by Dissident93 (talk)
 
sync
 
Line 40: Line 40:
colors = {"DCDCDC", "000000", "DCDCDC", "000000"}
colors = {"DCDCDC", "000000", "DCDCDC", "000000"}
else
else
local all_colors = mw.loadData(data_module)
local all_colors = mw.loadData(data_module .. '/sandbox')
colors = all_colors[team]
colors = all_colors[team]
if ( colors and type(colors) == 'string' ) then
if ( colors and type(colors) == 'string' ) then
Line 79: Line 79:
if bordercolor ~= 'FFFFFF' then
if bordercolor ~= 'FFFFFF' then
if simple then
if simple then
border = 'border: ' .. borderwidth .. 'px solid #' .. bordercolor .. ' !important;'
border = 'border: ' .. borderwidth .. 'px solid #' .. bordercolor .. ';'
else
else
border = bordercss(bordercolor, borderwidth)
border = bordercss(bordercolor, borderwidth)
border = border .. ' !important;'
end
end
end
end
end
end
return 'background-color: #' .. stripwhitespace(colors[bg]) .. ' !important; ' .. 'color: #' .. stripwhitespace(colors[fg]) .. ' !important; ' .. border
return 'background-color: #' .. stripwhitespace(colors[bg]) .. '; color: #' .. stripwhitespace(colors[fg]) .. '; ' .. border
end
end