FANDOM


local infobox = {}
 
local navigationMap = {
    ["라이트 노벨"] = {
        id = "novel",
        index = { "1권", "2권", "3권", "4권", "5권", "6권", "7권", "8권", "9권", "10권", "11권", "12권" }
    },
    ["코믹스"] = {
        id = "comics",
        index = { "1권", "2권", "3권", "4권" }
    },
    ["내 후배가 이렇게 귀여울 리가 없어"] = {
        id = "spinoff",
        index = { "1권", "2권", "3권", "4권", "5권", "6권" }
    },
    ["애니메이션/1기"] = {
        id = "anime1",
        index = { "1화", "2화", "3화", "4화", "5화", "6화", "7화", "8화", "9화", "10화", "11화", "12화 GOODEND♥", "12화 TRUE ROUTE", "13화", "14화", "15화" }
    },
    ["애니메이션/2기"] = {
        id = "anime2",
        index = { "1화", "2화", "3화", "4화", "5화", "6화", "7화", "8화", "9화", "10화", "11화", "12화", "13화", "14화", "15화", "16화" }
    },
    ["드라마 CD"] = {
        id = "dramacd",
        index = { "1화", "2화", "3화" }
    }
}
 
function infobox.multipleValue( frame )
    local args = {}
 
    for i = 1, #frame.args do
        table.insert( args, frame.args[i] )
    end
 
    return table.concat( args, ", " )
end
 
function infobox.format3Size( frame )
    local args = frame.args
    local tbl = {}
 
    table.insert( tbl, args[1] .. ( args[4] ~= "" and "(" .. args[4] .. ")" or "" ) )
    table.insert( tbl, args[2] )
    table.insert( tbl, args[3] )
 
    return table.concat( tbl, " / " ) .. " (cm)"
end
 
function infobox.navigation( frame )
    local name = frame.args[1]
    local index = navigationMap[ name ][ "index" ]
    local container = mw.html.create( "div" )
    local span = ""
 
    container:addClass( "pi-navigation__gallery group " )
 
    for i = 1, #index do
        span = "<span class=\"pi-navigation__thumb "  .. navigationMap[ name ][ "id" ] .. "\">[[" .. name .. "/" .. index[i] .. "|<span>" .. string.gsub( index[i], "%s([A-Z]).*", "%1" ) .. "</span>]]</span>"
        container:wikitext( span )
 
        if i ~= #index then
            container:wikitext( "&nbsp;·&nbsp;" );
        end
    end
 
    return container
end
 
return infobox

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