익명
×
새 문서 만들기
여기에 문서 제목을 쓰세요:
We currently have 900 articles on 루리위키. Type your article name above or click on one of the titles below and start writing!



900Articles

모듈:푸른 저편의 포리듬/ 캐릭터 프로필

4767561 (토론 | 기여)님의 2025년 12월 5일 (금) 03:12 판

이 모듈에 대한 설명문서는 모듈:푸른 저편의 포리듬/ 캐릭터 프로필/설명문서에서 만들 수 있습니다

local p = {}

function p.main(frame)
    local args = frame:getParent().args

    local color = args["색상"] or "#444"

    local html = mw.html.create("div")
    html:addClass("profile-card")
    html:css({
        ["border"] = "2px solid "..color,
        ["border-radius"] = "10px",
        ["padding"] = "12px",
        ["width"] = "100%",
        ["box-sizing"] = "border-box",
        ["background"] = "#fafafa",
        ["font-family"] = "'Noto Sans KR', sans-serif"
    })

    -- 이름 영역
    local nameBlock = mw.html.create("div")
    nameBlock:css({["text-align"] = "center", ["margin-bottom"] = "10px"})

    nameBlock:tag("div"):css({["font-size"] = "20px", ["font-weight"] = "bold", ["color"] = color})
        :wikitext(args["이름"] or "")

    nameBlock:tag("div"):css({["font-size"] = "13px", ["color"] = "#555"})
        :wikitext((args["이름_일어"] or "").." / "..(args["이름_영어"] or ""))

    html:node(nameBlock)

    -- 이미지 + 탭
    local images = {}
    if args["이미지_VN"] and args["이미지_VN"]~="" then
        table.insert(images,'|비주얼 노벨=[[File:'..args["이미지_VN"]..'|200px]]')
    end
    if args["이미지_애니"] and args["이미지_애니"]~="" then
        table.insert(images,'|애니메이션=[[File:'..args["이미지_애니"]..'|200px]]')
    end
    if args["이미지_추가"] and args["이미지_추가"]~="" then
        table.insert(images,'|추가='..args["이미지_추가"])
    end

    if #images > 0 then
        html:wikitext('<div style="text-align:center; margin:10px 0;"><tabber>'..table.concat(images,"\n")..'</tabber></div>')
    end

    -- 테이블 생성 함수
    local function addRow(tbl, label, value)
        if value and value ~= "" then
            tbl:tag("tr")
                :tag("th"):wikitext(label).done()
                :tag("td"):wikitext(value)
        end
    end

    -- ▶ 기본정보 영역
    local infoTable = mw.html.create("table")
    infoTable:css({
        ["width"]="100%",
        ["border-collapse"]="collapse",
        ["font-size"]="13px"
    })

    addRow(infoTable,"성별",args["성별"])
    addRow(infoTable,"나이", (args["나이_VN"]~="" and "VN: "..args["나이_VN"] or "").." / "..(args["나이_애니"]~="" and "애니: "..args["나이_애니"] or ""))    
    addRow(infoTable,"생일",args["생일"])
    addRow(infoTable,"신장",args["신장"])
    addRow(infoTable,"체중",args["체중"])
    addRow(infoTable,"머리색",args["머리색"])
    addRow(infoTable,"눈색",args["눈색"])
    addRow(infoTable,"학교",args["학교"])

    -- ▶ FC 프로필
    addRow(infoTable,"소속 팀",args["소속_팀"])
    addRow(infoTable,"포지션",args["포지션"])

    for i=1,5 do
        addRow(infoTable,"시그니처 기술 "..i,args["시그니처기술"..i])
    end

    -- ▶ 기타
    addRow(infoTable,"거주지",args["거주지"])
    addRow(infoTable,"취미",args["취미"])
    addRow(infoTable,"좋아하는 음식",args["좋아하는음식"])

    -- ▶ 성우 및 출연
    addRow(infoTable,"성우(JP)",args["성우_JP"])
    addRow(infoTable,"성우(EN)",args["성우_EN"])
    addRow(infoTable,"애니 데뷔",args["애니_데뷔"])
    addRow(infoTable,"게임 데뷔",args["게임_데뷔"])
    addRow(infoTable,"만화 데뷔",args["만화_데뷔"])

    html:node(infoTable)

    return tostring(html)
end

return p