Module:Navbox: Difference between revisions

Ganaram inukshuk (talk | contribs)
m bugfix
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 34: Line 34:
table.insert(row, data_style .. data)
table.insert(row, data_style .. data)
elseif data and not header then
elseif data and not header then
-- Row is a headerless data row...
-- Row is a headerless data row
local data_style = is_content_navbox
local data_style = is_content_navbox
and '| style="padding: 0; colspan="2" |\n' -- For nested navboxes
and '| style="padding: 0; colspan="2" |\n' -- For nested navboxes
or  '| style="font-size: 0.9em; padding: 0.25em 0.5em;" colspan="2" |' -- For normal content
or  '| style="font-size: 0.9em; padding: 0.25em 0.5em;" colspan="2" |' -- For normal content
Line 42: Line 42:
table.insert(row, data_style .. data)
table.insert(row, data_style .. data)
elseif header and not data then
elseif header and not data then
-- Row is a dataless header row...
-- Row is a dataless header row
local data_style = is_content_navbox
local data_style = is_content_navbox
and '! style="padding: 0; background-color: #eaecf0;" colspan="2" |\n' -- For nested navboxes
and '! style="padding: 0;" colspan="2" |\n' -- For nested navboxes
or  '! style="font-size: 0.9em; padding: 0.25em 0.5em;" colspan="2" |' -- For normal content
or  '! style="font-size: 0.9em; padding: 0.25em 0.5em; background-color: #eaecf0;" colspan="2" |' -- For normal content
table.insert(row, "|-")
table.insert(row, "|-")