模块:Navbox:修订间差异

添加269字节 、​ 2022年10月6日 (星期四)
编辑“模块:Navbox” // 维基盐编辑器
(// Edit via Wikiplus)
(编辑“模块:Navbox” // 维基盐编辑器)
第1行: 第1行:
--
-- 此模块引用自维基百科同名页面,引用行为依据 CC BY-SA 3.0 条款
-- This module will implement {{Navbox}}
-- 部分内容因为本地化或其他修改,可能与原模块有出入
--
 
-- 此模块实现了 {{Navbox}}
 
local p = {}
local p = {}
   
   
第288行: 第289行:
     if needsHorizontalLists() then table.insert(cats, '没有使用水平列表的导航框') end
     if needsHorizontalLists() then table.insert(cats, '没有使用水平列表的导航框') end
     if hasBackgroundColors() then table.insert(cats, '使用背景颜色的导航框') end
     if hasBackgroundColors() then table.insert(cats, '使用背景颜色的导航框') end
     if argNameAndRealTitleAreDifferent() then table.insert(cats, 'name參數和實際不同的導航框') end
     if argNameAndRealTitleAreDifferent() then table.insert(cats, 'name参数和实际不同的导航框') end
     return cats
     return cats
end
end
第314行: 第315行:
     if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
     if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
         tbl
         tbl
             :addClass('collapsible')
             :addClass('mw-collapsible')
             :addClass(args.state or 'autocollapse')
             :addClass(args.state or 'autocollapse')
     end
     end
第382行: 第383行:
     end
     end
   
   
     renderTrackingCategories(res)
     -- renderTrackingCategories(res) -- 本 Wiki 暂不需要此功能
   
   
     return tostring(res)
     return tostring(res)
第391行: 第392行:
     getArgs = require('Module:Arguments').getArgs
     getArgs = require('Module:Arguments').getArgs
     end
     end
     args = getArgs(frame, {wrappers = '模板:Navbox'})
     -- args = getArgs(frame, {wrappers = 'Template:Navbox'}) -- 可能导致无法获取正确参数的问题
    args = getArgs(frame)


     -- Read the arguments in the order they'll be output in, to make references number in the right order.
     -- Read the arguments in the order they'll be output in, to make references number in the right order.