Module:Sidebar: Difference between revisions

add templatestyles for hlist
Logan (talk | contribs)
m 44 revisions imported from wikipedia:Module:Sidebar
 
(2 intermediate revisions by 2 users not shown)
Line 96: Line 96:
end
end
local plainlist_styles = add_list_templatestyles('plainlist', 'Plainlist/styles.css')
local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles)
local hlist_styles = add_list_templatestyles('hlist', 'Hlist/styles.css')
local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles)
-- a second workaround for [[phab:T303378]]
-- a second workaround for [[phab:T303378]]
Line 104: Line 104:
if has_navbar(args.navbar, args.name) and hlist_styles == '' then
if has_navbar(args.navbar, args.name) and hlist_styles == '' then
hlist_styles = frame:extensionTag{
hlist_styles = frame:extensionTag{
name = 'templatestyles', args = { src = 'Hlist/styles.css' }
name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles}
}
}
end
end
 
-- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note]
-- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note]
return hlist_styles .. plainlist_styles
return hlist_styles .. plainlist_styles
Line 383: Line 383:
:cssText(args.basestyle)
:cssText(args.basestyle)
:cssText(args.listtitlestyle)
:cssText(args.listtitlestyle)
:cssText('color: var(--color-base)')
:cssText(args['list' .. num .. 'titlestyle'])
:cssText(args['list' .. num .. 'titlestyle'])
:node(title)
:node(title)