Content deleted Content added
fix class name |
test always generating color and background in _style |
||
Line 843:
local result = {}
local data = args.data
local default = 'background-color:#efefef; color: black;' -- Default background color for {{Infobox station}}
if system or data then
data = data or getData(system, true)
Line 858:
end
if style == 'header' or style == 'subheader' then
local nameFormat = ''
local tmp = data['name format'] and getValue(data['name format'])▼
if tmp then table.insert(result, tmp) end▼
▲ elseif style == 'subheader' then
local tmp = data['header background color'] and getValue(data['header background color'])▼
table.insert(result, 'background-color:#' .. tmp)▼
if not mw.ustring.match( nameFormat, 'background' ) then
local color = data['header text color'] and getValue(data['header text color'])▼
▲ local
if color then▼
if not background then background = '#efefef' end
table.insert(result, 'color:#' .. color)▼
if not ( mw.ustring.match( nameFormat, '^color' ) or mw.ustring.match( nameFormat, ' color' ) or mw.ustring.match( nameFormat, ';color' ) ) then
if data['header text color'] then
else
local greatercontrast = require('Module:Color contrast')._greatercontrast
end
▲ else
if color == '' then color = '#ffffff' end
end
end
|