Module:Navbox/configuration: Difference between revisions
Jump to navigation
Jump to search
m 1 revision imported |
m 1 revision imported |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
aria_label = 'Navbox', | aria_label = 'Navbox', | ||
nowrap_item = '%s<span class="nowrap">%s</span>', | nowrap_item = '%s<span class="nowrap">%s</span>', | ||
templatestyles = mw.getCurrentFrame():extensionTag{ | |||
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } | |||
}, | |||
-- do not localize marker table | |||
marker = { | |||
oddeven = '\127_ODDEVEN_\127', | |||
restart = '\127_ODDEVEN0_\127', | |||
regex = '\127_ODDEVEN(%d?)_\127' | |||
}, | |||
category = { | category = { | ||
orphan = '[[Category:Navbox orphans]]', | orphan = '[[Category:Navbox orphans]]', | ||
Line 7: | Line 16: | ||
background_colors = 'Navboxes using background colours', | background_colors = 'Navboxes using background colours', | ||
illegible = 'Potentially illegible navboxes', | illegible = 'Potentially illegible navboxes', | ||
borders = 'Navboxes using borders' | borders = 'Navboxes using borders', | ||
}, | }, | ||
keyword = { | keyword = { | ||
Line 39: | Line 48: | ||
navbox_inner = 'navbox-inner', | navbox_inner = 'navbox-inner', | ||
navbox_list = 'navbox-list', | navbox_list = 'navbox-list', | ||
navbox_part = 'navbox-', -- | navbox_list_with_group = 'navbox-list-with-group', | ||
navbox_part = 'navbox-', -- do not l10n | |||
navbox_styles = 'navbox-styles', | |||
navbox_subgroup = 'navbox-subgroup', | navbox_subgroup = 'navbox-subgroup', | ||
navbox_title = 'navbox-title', | navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below | ||
navbox_odd_part = 'odd', -- | navbox_odd_part = 'odd', -- do not l10n | ||
navbox_even_part = 'even', -- | navbox_even_part = 'even', -- do not l10n | ||
nomobile = 'nomobile', | |||
nowraplinks = 'nowraplinks', | nowraplinks = 'nowraplinks', | ||
noviewer = 'noviewer' -- used to remove images from MediaViewer | noviewer = 'noviewer' -- used to remove images from MediaViewer | ||
}, | }, | ||
pattern = { | pattern = { | ||
listnum = '^list(%d+)$', | |||
sandbox = '/sandbox$', | sandbox = '/sandbox$', | ||
navbox = 'Template:Navbox', | navbox = 'Template:Navbox', | ||
nowrap = '^<span class="nowrap">', | nowrap = '^<span class="nowrap">', | ||
style = 'style$', | style = 'style$', | ||
navbox_title = '<th[^>]*"navbox%-title"' | navbox_title = '<th[^>]*"navbox%-title"', | ||
hlist = 'hlist', | |||
plainlist = 'plainlist' | |||
}, | }, | ||
arg = { | arg = { | ||
above = 'above', | above = 'above', | ||
Line 77: | Line 80: | ||
belowclass = 'belowclass', | belowclass = 'belowclass', | ||
belowstyle = 'belowstyle', | belowstyle = 'belowstyle', | ||
evenodd = 'evenodd', | evenodd = 'evenodd', | ||
evenstyle = 'evenstyle', | evenstyle = 'evenstyle', | ||
group1 = 'group1', | group1 = 'group1', | ||
group2 = 'group2', | group2 = 'group2', | ||
group_and_num = 'group%d', | |||
groupstyle_and_num = 'group%dstyle', | |||
groupclass = 'groupclass', | groupclass = 'groupclass', | ||
groupstyle = 'groupstyle', | groupstyle = 'groupstyle', | ||
Line 92: | Line 95: | ||
imageleftstyle = 'imageleftstyle', | imageleftstyle = 'imageleftstyle', | ||
imagesetyle = 'imagestyle', | imagesetyle = 'imagestyle', | ||
list_and_num = 'list%d', | |||
listclass_and_num = 'list%dclass', | |||
liststyle_and_num = 'list%dstyle', | |||
list1padding = 'list1padding', | list1padding = 'list1padding', | ||
listclass = 'listclass', | listclass = 'listclass', | ||
Line 106: | Line 111: | ||
state = 'state', | state = 'state', | ||
style = 'style', | style = 'style', | ||
templatestyles = 'templatestyles', | |||
child_templatestyles = 'child templatestyles', | |||
title = 'title', | title = 'title', | ||
titleclass = 'titleclass', | titleclass = 'titleclass', | ||
titlestyle = 'titlestyle', | titlestyle = 'titlestyle', | ||
tracking = 'tracking' | tracking = 'tracking' | ||
Line 117: | Line 120: | ||
-- names of navbar arguments | -- names of navbar arguments | ||
navbar = { | navbar = { | ||
name = 1, | |||
fontstyle = 'fontstyle', | fontstyle = 'fontstyle', | ||
mini = 'mini' | mini = 'mini' | ||
} | } | ||
} | } |
Latest revision as of 16:41, 2 March 2022
Documentation for this module may be created at Module:Navbox/configuration/doc
return {
aria_label = 'Navbox',
nowrap_item = '%s<span class="nowrap">%s</span>',
templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
},
-- do not localize marker table
marker = {
oddeven = '\127_ODDEVEN_\127',
restart = '\127_ODDEVEN0_\127',
regex = '\127_ODDEVEN(%d?)_\127'
},
category = {
orphan = '[[Category:Navbox orphans]]',
horizontal_lists = 'Navigational boxes without horizontal lists',
background_colors = 'Navboxes using background colours',
illegible = 'Potentially illegible navboxes',
borders = 'Navboxes using borders',
},
keyword = {
border_subgroup = 'subgroup',
border_child = 'child',
border_none = 'none',
evenodd_swap = 'swap',
navbar_off = 'off',
navbar_plain = 'plain',
nocat_false = 'false',
nowrapitems_yes = 'yes',
orphan_yes = 'yes',
state_collapsed = 'collapsed',
state_off = 'off',
state_plain = 'plain',
subpage_doc = 'doc',
subpage_sandbox = 'sandbox',
subpage_testcases = 'testcases',
tracking_no = 'no'
},
class = {
autocollapse = 'autocollapse',
collapsible = 'mw-collapsible',
collapsed = 'mw-collapsed',
-- Warning
navbox = 'navbox', -- WMF currently hides 'navbox' from mobile,
-- so you probably shouldn't change the navbox class.
navbox_abovebelow = 'navbox-abovebelow',
navbox_group = 'navbox-group',
navbox_image = 'navbox-image',
navbox_inner = 'navbox-inner',
navbox_list = 'navbox-list',
navbox_list_with_group = 'navbox-list-with-group',
navbox_part = 'navbox-', -- do not l10n
navbox_styles = 'navbox-styles',
navbox_subgroup = 'navbox-subgroup',
navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below
navbox_odd_part = 'odd', -- do not l10n
navbox_even_part = 'even', -- do not l10n
nomobile = 'nomobile',
nowraplinks = 'nowraplinks',
noviewer = 'noviewer' -- used to remove images from MediaViewer
},
pattern = {
listnum = '^list(%d+)$',
sandbox = '/sandbox$',
navbox = 'Template:Navbox',
nowrap = '^<span class="nowrap">',
style = 'style$',
navbox_title = '<th[^>]*"navbox%-title"',
hlist = 'hlist',
plainlist = 'plainlist'
},
arg = {
above = 'above',
aboveclass = 'aboveclass',
abovestyle = 'abovestyle',
basestyle = 'basestyle',
bodyclass = 'bodyclass',
bodystyle = 'bodystyle',
border = 'border',
below = 'below',
belowclass = 'belowclass',
belowstyle = 'belowstyle',
evenodd = 'evenodd',
evenstyle = 'evenstyle',
group1 = 'group1',
group2 = 'group2',
group_and_num = 'group%d',
groupstyle_and_num = 'group%dstyle',
groupclass = 'groupclass',
groupstyle = 'groupstyle',
groupwidth = 'groupwidth',
innerstyle = 'innerstyle',
image = 'image',
imageclass = 'imageclass',
imageleft = 'imageleft',
imageleftstyle = 'imageleftstyle',
imagesetyle = 'imagestyle',
list_and_num = 'list%d',
listclass_and_num = 'list%dclass',
liststyle_and_num = 'list%dstyle',
list1padding = 'list1padding',
listclass = 'listclass',
listpadding = 'listpadding',
liststyle = 'liststyle',
name = 'name',
navbar = 'navbar',
navboxclass = 'navboxclass',
nocat = 'nocat',
nowrapitems = 'nowrapitems',
oddstyle = 'oddstyle',
orphan = 'orphan',
state = 'state',
style = 'style',
templatestyles = 'templatestyles',
child_templatestyles = 'child templatestyles',
title = 'title',
titleclass = 'titleclass',
titlestyle = 'titlestyle',
tracking = 'tracking'
},
-- names of navbar arguments
navbar = {
name = 1,
fontstyle = 'fontstyle',
mini = 'mini'
}
}