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



900Articles

모듈:궤적시리즈/하늘의 궤적/캐릭터 스테이터스: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
5번째 줄: 5번째 줄:
     local value = frame.args.HP or ""
     local value = frame.args.HP or ""
     local rowIndex = tonumber(frame.args.row or 1)
     local rowIndex = tonumber(frame.args.row or 1)
    -- 행 배경: 홀수행 #EDF3FF, 짝수행 무색
    local rowBg = (rowIndex % 2 == 1) and "background-color:#EDF3FF;" or ""


     -- 능력치 이름 열
     -- 능력치 이름 열
     local tdStyleName = "background-color:#446DFF; color:white; padding:6px; text-align:left; width:30%;"
     local tdStyleName = "background-color:#446DFF; color:white; padding:6px; text-align:left; width:30%;"


     -- 입력값 열 배열
     -- 입력값 열 (성장치, Lv1, Lv50, Lv120)
    local inputValues = {value, "", "", ""} -- 성장치, Lv1, Lv50, Lv120 순서
    local tdStyleValue = "padding:6px; width:17.5%;"
     local html = mw.html.create("tr")
 
     local html = mw.html.create("tr"):attr("style", rowBg)
     html:tag("td"):attr("style", tdStyleName):wikitext(name)
     html:tag("td"):attr("style", tdStyleName):wikitext(name)
 
     html:tag("td"):attr("style", tdStyleValue):wikitext(value)
     for i, cellValue in ipairs(inputValues) do
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv1
        -- 홀수열: #EDF3FF, 짝수열: 무색 (셀 단위)
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv50
        local tdStyle = (i % 2 == 1) and "background-color:#EDF3FF; padding:6px; width:17.5%;" or "padding:6px; width:17.5%;"
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv120
        html:tag("td"):attr("style", tdStyle):wikitext(cellValue)
    end


     return tostring(html)
     return tostring(html)

2025년 11월 22일 (토) 02:27 판

이 모듈에 대한 설명문서는 모듈:궤적시리즈/하늘의 궤적/캐릭터 스테이터스/설명문서에서 만들 수 있습니다

local p = {}

function p.renderStatRow(frame)
    local name  = frame.args.name or ""
    local value = frame.args.HP or ""
    local rowIndex = tonumber(frame.args.row or 1)

    -- 행 배경: 홀수행 #EDF3FF, 짝수행 무색
    local rowBg = (rowIndex % 2 == 1) and "background-color:#EDF3FF;" or ""

    -- 능력치 이름 열
    local tdStyleName = "background-color:#446DFF; color:white; padding:6px; text-align:left; width:30%;"

    -- 입력값 열 (성장치, Lv1, Lv50, Lv120)
    local tdStyleValue = "padding:6px; width:17.5%;"

    local html = mw.html.create("tr"):attr("style", rowBg)
    html:tag("td"):attr("style", tdStyleName):wikitext(name)
    html:tag("td"):attr("style", tdStyleValue):wikitext(value)
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv1
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv50
    html:tag("td"):attr("style", tdStyleValue):wikitext("") -- Lv120

    return tostring(html)
end

return p