Module:AlbumFrame

From TwentyOneWiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:AlbumFrame/doc

local p = {}

function p.show(frame)
    local title = mw.title.getCurrentTitle().text or ""
    local album = ""
    
    if mw.ustring.match(title, "%.2011$") then
        album = "RAB"
    elseif mw.ustring.match(title, "%.2013$") then
        album = "Vessel"
    else
        album = "Unknown"
    end

    return string.format(
        '<div style="border:2px solid #A00; padding:10px; border-radius:14px; display:inline-block; background:#f9f9fa; margin:8px 0; font-size:120%%; font-weight:bold; text-align:center;">%s</div>',
        album
    )
end

return p