Content deleted Content added
InfoboxImage |
apply infoboximage to map as well |
||
Line 3:
local data_module_prefix = "Module:Solar eclipse/db/"
local infobox_image = nil -- lazy load
local function InfoboxImage(image)
if (image and image ~= '') then
if infobox_image == nil then
end
return infobox_image{args = {
}}
end
return nil
end
local function ifnotempty(s,a,b)
Line 124 ⟶ 140:
local mapstr = ifnotempty(args['map'],
"<div style='padding-bottom:0.5em;'>" ..
(InfoboxImage(args['map']) or '') .. ifnotempty(args['map_caption'],
"<div style='line-height:1.2em; padding-top:0.1em;'>" ..
(args['map_caption'] or '') .. "</div>", '') .. '</div>')
Line 135 ⟶ 151:
["abovestyle"] = "padding-bottom:0.25em; background:" .. bgcolor .. "; line-height:1.2em; text-align:center; font-size:115%;",
------------------ Images and maps ------------------
["image"] =
▲ require('Module:InfoboxImage').InfoboxImage{args = {
▲ image = args['image'] or '',
▲ size = '320px',
▲ sizedefault = 'frameless',
▲ upright = 1
["imagestyle"] = "padding-bottom:0.5em;",
["caption"] = args['caption'] or '',
|