Module:Navbox: Difference between revisions

Ganaram inukshuk (talk | contribs)
m bg-color for dataless header rows
Ganaram inukshuk (talk | contribs)
todo; some bugfixing
Line 7: Line 7:
local p = {}
local p = {}


-- TODO (low priority): add an option for a dataless header row, to mirror the
-- TODO: bugfix headerless data row and dataless header row to make sure they
-- option of having a headerless data row. Requires changing row content from
-- work properly, especially with nested navboxes
-- a regular array to an associative array.


-- TODO (medium priority): nest and refactor helper functions
-- TODO (medium priority): nest and refactor helper functions
Line 37: Line 36:
-- 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; background-color: #eaecf0;" colspan="2" |\n' -- For nested navboxes; requires a newline for it to work
and '| style="padding: 0; background-color: colspan="2" |\n' -- For nested navboxes; requires a newline for it to work
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 45: Line 44:
-- 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;" colspan="2" |\n' -- For nested navboxes; requires a newline for it to work
and '! style="padding: 0; #eaecf0;"" colspan="2" |\n' -- For nested navboxes; requires a newline for it to work
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