開啟主選單

求真百科

變更

模块:Navbox

增加 893 位元組, 4 年前
导入1个版本
local args
local border
local listnums = {}
local ODD_EVEN_MARKER = '\127_ODDEVEN_\127'
local RESTART_MARKER = '\127_ODDEVEN0_\127'
args.name,
mini = 1,
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;'
})
end
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args.title))
:addClass(args.titleclass)
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:attr('id', args.title and nil or mw.uri.anchorEncode(args.above))
:wikitext(processItem(args.above, args.nowrapitems))
end
if args['group' .. listnum] then
local groupCell = row:tag('th')
 
-- id for aria-labelledby attribute, if lone group with no title or above
if listnum == 1 and not (args.title or args.above or args.group2) then
groupCell
:attr('id', mw.uri.anchorEncode(args.group1))
end
groupCell
:addClass(args.groupclass)
:cssText(args.basestyle)
:css('width', args.groupwidth or '1%') -- If groupwidth not specified, minimize width
groupCell
:addClass('navbox-' .. oddEven)
:addClass(args.listclass)
:addClass(args['list' .. listnum .. 'class'])
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
if args.state == 'collapsed' then args.state = 'mw-collapsed' end
tbl
:addClass('mw-collapsible')
:addClass(args.state or 'autocollapse')
end
function p._navbox(navboxArgs)
args = navboxArgs
listnums = {}
for k, _ in pairs(args) do
:attr('role', 'navigation')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group if args.title or args.above or (args.group1 and not args.group2) then nav:attr('aria-labelledby', mw.uri.anchorEncode(args.titleor args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.navboxclass)
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group if args.title or args.above or (args.group1 and not args.group2) then nav:attr('aria-labelledby', mw.uri.anchorEncode(args.titleor args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
if (args.nocat or 'false'):lower() == 'false' then renderTrackingCategories(res) end
return striped(tostring(res))
end
行政員使用者查核員拒收員巡檢員管理員、water、waterc、waterh、waterm、waterp、waters、watert、waterv、waterw、waterz
10,317
次編輯