模块:设定页v2:修订间差异

无编辑摘要
无编辑摘要
第62行: 第62行:
     local parent, name
     local parent, name
     base, sub = PageName.split(pagename)
     base, sub = PageName.split(pagename)
     local out = ""
     local root = mw.html.create(nil)
     if isIndexPage or not base then
     if isIndexPage or not base then
         if type == "世界观设定" then
         if type == "世界观设定" then
             out = out .. (renderLiteInfoBox(frame, "WorldItem.svg", "世界观介绍页"))
             root:wikitext(renderLiteInfoBox(frame, "WorldItem.svg", "世界观介绍页"))
         elseif type == "联动设定" then
         elseif type == "联动设定" then
             local text = ""
             local text = ""
             out = out .. (renderLiteInfoBox(frame, "联动.svg", "联动介绍页"))
             root:wikitext(renderLiteInfoBox(frame, "联动.svg", "联动介绍页"))
         else -- 公共设定
         else -- 公共设定
             out = out .. (renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页"))
             root:wikitext(renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页"))
         end
         end
     else
     else
         if type == "世界观设定" then
         if type == "世界观设定" then
             out = out .. (renderLiteInfoBox(frame, "WorldItem.svg", "本页面属于世界观: [[" .. base .. "]]"))
             root:wikitext(renderLiteInfoBox(frame, "WorldItem.svg", "本页面属于世界观: [[" .. base .. "]]"))
         elseif type == "联动设定" then
         elseif type == "联动设定" then
             local text = ""
             local text = ""
             out = out .. (renderLiteInfoBox(frame, "联动.svg", "本页面属于联动: [["..base.."]"))
             root:wikitext(renderLiteInfoBox(frame, "联动.svg", "本页面属于联动: [["..base.."]"))
         else -- 公共设定
         else -- 公共设定
             out = out .. (renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页"))
             root:wikitext(renderLiteInfoBox(frame, "SharedItem.svg", "公共设定页"))
         end
         end
     end
     end
     return out
     return root:done()
end
end


第97行: 第97行:
     end
     end
     local isIndexPage = props["设定集核心页"][1] == 't'
     local isIndexPage = props["设定集核心页"][1] == 't'
     root:wikitext(renderType(frame, isIndexPage, props["设定类型"][1] or "公共设定"), props["依赖设定集"])
     root:wikitext(renderType(frame, isIndexPage, props["设定类型"][1] or "公共设定", props["依赖设定集"]))
     root:wikitext(renderStage(frame, props["创作阶段"][1] or "空白"))
     root:wikitext(renderStage(frame, props["创作阶段"][1] or "空白"))
     return root:done()
     return root:done()