Editing Module:Navbox
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 10: | Line 10: | ||
local args | local args | ||
local border | local border | ||
local listnums | local listnums = {} | ||
local ODD_EVEN_MARKER = '\127_ODDEVEN_\127' | local ODD_EVEN_MARKER = '\127_ODDEVEN_\127' | ||
local RESTART_MARKER = '\127_ODDEVEN0_\127' | local RESTART_MARKER = '\127_ODDEVEN0_\127' | ||
Line 85: | Line 85: | ||
args.name, | args.name, | ||
mini = 1, | mini = 1, | ||
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;box-shadow:none; | fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;' | ||
}) | }) | ||
end | end | ||
Line 192: | Line 192: | ||
row | row | ||
:tag('td') | :tag('td') | ||
:addClass('navbox-image') | :addClass('navbox-image') | ||
:addClass(args.imageclass) | :addClass(args.imageclass) | ||
Line 217: | Line 216: | ||
:addClass(args.groupclass) | :addClass(args.groupclass) | ||
:cssText(args.basestyle) | :cssText(args.basestyle) | ||
:css('width', args.groupwidth or '1%') -- If groupwidth not specified, minimize width | |||
groupCell | groupCell | ||
Line 259: | Line 258: | ||
:addClass('navbox-' .. oddEven) | :addClass('navbox-' .. oddEven) | ||
:addClass(args.listclass) | :addClass(args.listclass) | ||
:tag('div') | :tag('div') | ||
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em') | :css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em') | ||
Line 267: | Line 265: | ||
row | row | ||
:tag('td') | :tag('td') | ||
:addClass('navbox-image') | :addClass('navbox-image') | ||
:addClass(args.imageclass) | :addClass(args.imageclass) | ||
Line 354: | Line 351: | ||
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(' | :addClass('collapsible') | ||
:addClass(args.state or 'autocollapse') | :addClass(args.state or 'autocollapse') | ||
end | end | ||
Line 385: | Line 381: | ||
function p._navbox(navboxArgs) | function p._navbox(navboxArgs) | ||
args = navboxArgs | args = navboxArgs | ||
for k, _ in pairs(args) do | for k, _ in pairs(args) do | ||
Line 427: | Line 422: | ||
:attr('role', 'navigation') | :attr('role', 'navigation') | ||
:addClass('navbox') | :addClass('navbox') | ||
:cssText(args.bodystyle) | :cssText(args.bodystyle) | ||
:cssText(args.style) | :cssText(args.style) | ||
Line 439: | Line 433: | ||
end | end | ||
renderTrackingCategories(res) | |||
return striped(tostring(res)) | return striped(tostring(res)) | ||
end | end | ||
Line 449: | Line 442: | ||
getArgs = require('Module:Arguments').getArgs | getArgs = require('Module:Arguments').getArgs | ||
end | end | ||
args = getArgs(frame, {wrappers = {'Template:Navbox'}}) | args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}}) | ||
if frame.args.border then | |||
-- This allows Template:Navbox_subgroup to use {{#invoke:Navbox|navbox|border=...}}. | |||
args.border = frame.args.border | |||
end | |||
-- 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. |