Jump to content

Module:Sidebar: Difference between revisions

add list-title-centered
use list to be consistent
Line 288: Line 288:
end
end


local function collapsible_title(args, is_centered_collapsible_titles, num)
local function list_title(args, is_centered_list_titles, num)
local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title']
local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title']
Line 294: Line 294:


local title
local title
if is_centered_collapsible_titles then
if is_centered_list_titles then
-- collapsible can be finicky, so provide some CSS/HTML to support
-- collapsible can be finicky, so provide some CSS/HTML to support
title = mw.html.create('div')
title = mw.html.create('div')
Line 333: Line 333:
local contentArgs = {}
local contentArgs = {}
local is_centered_collapsible_titles
local is_centered_list_titles
if args['centered collapsible titles'] and args['centered collapsible titles'] ~= '' then
if args['centered collapsible titles'] and args['centered collapsible titles'] ~= '' then
is_centered_collapsible_titles = true
is_centered_list_titles = true
else
else
is_centered_collapsible_titles = false
is_centered_list_titles = false
end
end


Line 353: Line 353:
:cssText(args.listframestyle)
:cssText(args.listframestyle)
:cssText(args['list' .. num .. 'framestyle'])
:cssText(args['list' .. num .. 'framestyle'])
:node(collapsible_title(args, is_centered_collapsible_titles, num))
:node(list_title(args, is_centered_list_titles, num))
:tag('div')
:tag('div')
:addClass(cfg.i18n.class.list_content)
:addClass(cfg.i18n.class.list_content)