Module talk:Infobox
跳转到导航
跳转到搜索
编辑请求 - 淮南皓月 - 2023.02.25
由淮南皓月提出的对模块:Infobox的编辑请求:
- 状态: 完成
将以下内容:
-- Line 2:
local inner_args = { ["wrapper"] = true, ["m-style"] = true, ["font-size"] = true, ["text-align"] = true, ["width"] = true, ["max-width"] = true, ["float"] = true, ["bg-color"] = true, ["m-bcolor"] = true, ["m-color"] = true,
-- Line 45:
:addClass("infobox")
-- Line 64:
local td_title = box:tag("tr"):tag("td"):attr("colspan", "2")
-- Line 73-74:
:wikitext(_chk_arg("Title", "title", "标题") or mw.title.getCurrentTitle().fullText)
end
-- Line 81:
local td_top = box:tag("tr"):tag("td"):attr("colspan", "2")
-- Line 94:
td_top:wikitext("[[Image:" .. arg_image .. "|" .. size .. "]]")修改为:
-- Line 2:
local inner_args = { ["wrapper"] = true, ["class"] = true, ["m-style"] = true, ["font-size"] = true, ["text-align"] = true, ["width"] = true, ["max-width"] = true, ["float"] = true, ["bg-color"] = true, ["m-bcolor"] = true, ["m-color"] = true,
-- Line 45:
:addClass("infobox"):addClass(_chk_arg("class") or "")
-- Line 64:
local td_title = box:tag("tr"):addClass("infobox-title"):tag("td"):css("padding", "0"):attr("colspan", "2")
-- Line 73-74:
end
td_title:wikitext(_chk_arg("Title", "title", "标题") or mw.title.getCurrentTitle().fullText)
-- Line 81:
local td_top = box:tag("tr"):tag("td"):attr("colspan", "2")
-- Line 94:
td_top:wikitext("[[Image:" .. arg_image .. "|" .. size .. "|class=infobox-image]]")- 修复
top-style不为空时没有标题文字的bug; - 给标题行和配图行添加与其他信息栏一致的class;
- 增加一个
class参数,允许给表格添加额外的class(比如运维喜欢的moe-infobox)。
主要是修bug,后两条是顺带的。〔巡〕淮南皓月 🌙 2023年2月25日 (六) 02:28 (CST)
编辑请求 - 淮南皓月 - 2023.05.23
由淮南皓月提出的对模块:Infobox的编辑请求:
- 状态: 完成
将以下内容:
td_title:wikitext(_chk_arg("Title", "title", "标题") or mw.title.getCurrentTitle().fullText)
修改为:
td_title:wikitext(_chk_arg("Title", "title", "标题", "標題") or mw.title.getCurrentTitle().fullText)
另外在第四行加一个["標題"] = true。
理由:
- 不合旁的参数名(如“标题背景色”)都支持繁简,单标题不支持。
附言: