Editing Module:Sidebar
Appearance
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 53: | Line 53: | ||
end | end | ||
-- do we want a navbar | |||
-- will be wanted later for finding hlist | |||
local function has_navbar(navbar_mode, sidebar_name) | local function has_navbar(navbar_mode, sidebar_name) | ||
return navbar_mode ~= cfg.i18n.navbar_none and | return navbar_mode ~= cfg.i18n.navbar_none and | ||
Line 85: | Line 87: | ||
-- there are a lot of list classes in the wild, so we add their TemplateStyles | -- there are a lot of list classes in the wild, so we add their TemplateStyles | ||
local function add_list_styles(args) | local function add_list_styles(args) | ||
local function add_list_templatestyles(htmlclass, templatestyles) | local function add_list_templatestyles(htmlclass, templatestyles) | ||
local frame = mw.getCurrentFrame() | |||
if has_list_class(args, htmlclass) then | if has_list_class(args, htmlclass) then | ||
return frame:extensionTag{ | return frame:extensionTag{ | ||
Line 95: | Line 97: | ||
end | end | ||
end | end | ||
-- TODO: get hlist to the point where we can turn this on | |||
-- see [[MediaWiki talk:Common.css/to do#Hlist]] | |||
local plainlist_styles = add_list_templatestyles('plainlist', 'Plainlist/styles.css') | |||
-- | |||
return plainlist_styles | |||
return | |||
end | end | ||
Line 348: | Line 340: | ||
return table.concat({ | return table.concat({ | ||
base_templatestyles, | base_templatestyles, | ||
templatestyles, | templatestyles, | ||
child_templatestyles, | child_templatestyles, | ||
grandchild_templatestyles, | grandchild_templatestyles, | ||
add_list_styles(args), | |||
hiding_templatestyles, | hiding_templatestyles, | ||
tostring(root), | tostring(root), | ||
Line 383: | Line 375: | ||
:cssText(args.basestyle) | :cssText(args.basestyle) | ||
:cssText(args.listtitlestyle) | :cssText(args.listtitlestyle) | ||
:cssText(args['list' .. num .. 'titlestyle']) | :cssText(args['list' .. num .. 'titlestyle']) | ||
:node(title) | :node(title) |