Module:Infobox: Difference between revisions

Ganaram inukshuk (talk | contribs)
m todo
Sintel (talk | contribs)
Add infobox class
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:
-- TODO (medium priority):
-- TODO (medium priority):
-- - Use templatestyles
-- - Use templatestyles
-- - Bugfix infobox title so numlinks nests in properly


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 133: Line 132:
-- Infobox boilerplate
-- Infobox boilerplate
table.insert(lines,  
table.insert(lines,  
[[<div style="
[[<div class="infobox" style="
border: 1px solid #999;  
border: 1px solid #999;  
margin: 0;  
margin: 0;  
Line 214: Line 213:
local is_upper_lower_links_present =  
local is_upper_lower_links_present =  
any_keys_present(args, upper_links) or any_keys_present(args, lower_links)
any_keys_present(args, upper_links) or any_keys_present(args, lower_links)
local is_side_links_present = any_keys_present(args, side_links)
-- Build adjacent_links
-- Build adjacent_links
Line 234: Line 234:
args[key] = nil
args[key] = nil
end
end
else
elseif is_side_links_present then
-- Left and right links only
-- Left and right links only
for _, key in ipairs(side_links) do
for _, key in ipairs(side_links) do
Line 242: Line 242:
end
end
args["Adjacent Links"] = adjacent_links
args["Adjacent Links"] = adjacent_links
-- Preprocess rows
-- Preprocess rows