FANDOM


local p = {}
local getArgs = getArgs or require("Module:Arguments").getArgs
 
function p.main(frame)
    local args = getArgs(frame)
    local formatDate = require("Module:Date")._formatDate
 
    local container, image, caption
    local company, name, fullname, filename = "", "", "", ""
    local companyLink, productLink, dateText = "", "", "", ""
 
    if args["제조사"] and args["상품명"] then
        company = args["제조사"]
        name = args["상품명"]
        fullname = company .. " " .. name
        filename = args["파일명"] or fullname
        image = "[[파일:" .. filename .. ".png|x130px|링크=" .. fullname .. "]]"
        companyLink = "[[:분류:" .. company .. " 피규어|" .. company .. "]]" or company
        productLink = "[[" .. fullname .. "]]" or fullname
    else
        image = "<i class='text-muted text-smaller'>제조사와 상품명을 입력해 주세요.</span>"
    end
 
    dateText = formatDate(args["발매시기/년"], args["발매시기/월"], args["발매시기/일"])
 
    container = mw.html.create("div"):addClass("flex-gallery__item oi-figure")
 
    container
        :tag("div")
            :addClass("oi-figure__thumb")
            :wikitext(image)
 
    caption = container:tag("div"):addClass("oi-figure__caption")
 
    caption
        :tag("div")
            :addClass("text-smaller")
            :wikitext(companyLink)
 
    caption
        :tag("div")
            :addClass("text-smaller")
            :wikitext(dateText)
 
    caption
        :tag("div")
            :wikitext(productLink)
 
    return container:done()
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on FANDOM

Random Wiki