Module:Infobox: Difference between revisions
m todo |
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 | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
| 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 | ||
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 | ||