Content deleted Content added
convert entirety of rest of the args |
start converting keywords |
||
Line 16:
-- where a child navbox is not contained in a parent navbox.
local orphanCat = '[[Category:Navbox orphans]]'
if border ==
-- No change; striping occurs in outermost navbox.
return wikitext .. orphanCat
Line 57:
return '\n' .. item ..'\n'
end
if nowrapitems ==
local lines = {}
for line in (item .. '\n'):gmatch('([^\n]*)\n') do
Line 76:
local function renderNavBar(titleCell)
if args[cfg.arg.navbar] ~=
(not args[cfg.arg.name] and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == 'Template:Navbox') then titleCell:wikitext(navbar{
args[cfg.arg.name],
Line 288 ⟶ 289:
local function needsHorizontalLists(border)
if border ==
return false
end
-- TODO: This should be finding the relevant classes, *not* checking equality
return not (
▲ return not (listClasses[args[cfg.arg.listclass]] or listClasses[args[cfg.arg.bodyclass]])
end
local function hasBackgroundColors()
-- TODO: this list does not match the hasBorders list
for _, key in ipairs({'titlestyle', 'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do▼
-- (it has titlestyle). why?
▲ for _, key in ipairs({
cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do
if tostring(args[key]):find('background', 1, true) then
return true
Line 308:
local function hasBorders()
for _, key in ipairs({
cfg.arg.abovestyle if tostring(args[key]):find('border', 1, true) then
return true
Line 364 ⟶ 365:
tbl:css('border-spacing', 0)
if border ==
tbl
:addClass('navbox-subgroup')
Line 402 ⟶ 403:
local border = mw.text.trim(args[cfg.arg.border] or args[1] or '')
if border == 'child' then
border =
end
Line 420 ⟶ 421:
nav:attr('aria-label', 'Navbox')
end
elseif border ==
-- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
-- therefore inside a div with padding:0em 0.25em. We start with a </div> to avoid the
|