Module:Infobox: Difference between revisions

Jump to navigation Jump to search
916 bytes added ,  19:28, 22 December 2021
m
no edit summary
imported>Kittymmeow
No edit summary
mNo edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 8: Line 8:
if not imageArea and imageArea ~= 'none' then
if not imageArea and imageArea ~= 'none' then
local images = {}
local images = {}
local defaultImageSize = args.defaultimagesize or '150px'
local defaultImageSize = args.defaultimagesize or '160px'
args.image1 = args.image1 or args.image or 'title'
args.image1 = args.image1 or args.image or 'title'
args.image1size = args.image1size or args.imagesize
args.image1size = args.image1size or args.imagesize
Line 68: Line 68:
footer = '| class="infobox-footer" colspan="2" | ' .. footer
footer = '| class="infobox-footer" colspan="2" | ' .. footer
end
end
local gameversion = args.gameversion
if gameversion then
        local frame = mw.getCurrentFrame()
        frame:callParserFunction{ name = '#cargo_store', args = { '',
            _table = 'VersHistInfobox', Version = gameversion
        } }
gameversion = '| class="infobox-gameversion-postfooter" colspan="2" | <div class="qud-infobox-version">Infobox data from game version <span class="qud-version-num">' .. gameversion .. '</span></div>'
    end
        local infoboxStartDiv = '<div class="moduleinfobox'
        local class = args.class
        if class then
                infoboxStartDiv = infoboxStartDiv .. ' ' .. class
        end
        infoboxStartDiv = infoboxStartDiv .. '"'
        local style = args.style
        if style then
                infoboxStartDiv = infoboxStartDiv .. ' style="' .. style .. '"'
        end
       
        infoboxStartDiv = infoboxStartDiv .. '>'
local html = {
local html = {
'<div class="notaninfobox">',
infoboxStartDiv,
'<div class="infobox-title">' .. title .. '</div>',
'<div class="infobox-title">' .. title .. '</div>',
imageArea,
imageArea,
Line 77: Line 100:
args.rows or '',
args.rows or '',
footer or '',
footer or '',
gameversion or '',
'|}',
'|}',
'</div>'
'</div>'

Navigation menu