Module:AlbumFrame

From TwentyOneWiki
Revision as of 04:12, 11 July 2025 by Buburka Rinderbuy (talk | contribs) (Created page with "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-si...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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