Changes
Jump to navigation
Jump to search
Line 19:
Line 19:
+
+
+
+
+
+
+
+
Line 29:
Line 37:
+
− +
− :tag('table')
Line 90:
Line 98:
− +
+
+
+
+
+
+
+
Line 97:
Line 112:
− :wikitext('</th></tr>') -- @todo replace this with unclosed again once mw.html gets it
Line 179:
Line 193:
− +
Line 218:
Line 232:
− +
update from sandbox per discussion on talk page
else
else
return s
return s
end
end
local function hasSubgroup(s)
if mw.ustring.find(s, 'vertical%-navbox%-subgroup') then
return true
else
return false
end
end
end
end
local child = args.child and mw.text.trim(args.child) == 'yes'
local child = args.child and mw.text.trim(args.child) == 'yes'
root = root:tag('table')
if not child then
if not child then
root = root
root
:addClass('vertical-navbox')
:addClass('vertical-navbox')
:addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil)
:addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil)
:wikitext(args.pretitle)
:wikitext(args.pretitle)
end
end
else
root
:addClass('vertical-navbox-subgroup')
:css('width', '100%')
:css('margin', '0px')
:css('border-spacing', '0px')
:addClass(args.bodyclass or args.class)
:cssText(args.bodystyle or args.style)
end
end
root
root
:wikitext(args.title)
:wikitext(args.title)
else
else
root
root
:tag('td')
:tag('td')
:addClass(args.contentclass)
:addClass(args.contentclass)
:css('padding', '0 0.1em 0.4em')
:css('padding', hasSubgroup(content) and '0.1em 0 0.2em' or '0 0.1em 0.4em')
:cssText(args.contentstyle)
:cssText(args.contentstyle)
:cssText(args['content' .. num .. 'style'])
:cssText(args['content' .. num .. 'style'])
end
end
return tostring(root)
return tostring(root) .. (child and '[[Category:Pages using sidebar with the child parameter]]' or '')
end
end