Module:Sidebar and Module:Sidebar/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
Fixes https://phabricator.wikimedia.org/F54694313 |
oops |
||
Line 1: | Line 1: | ||
require('strict') |
require('strict') |
||
local cfg = mw.loadData('Module:Sidebar/configuration') |
local cfg = mw.loadData('Module:Sidebar/configuration/sandbox') |
||
local p = {} |
local p = {} |
||
Line 96: | Line 96: | ||
end |
end |
||
local plainlist_styles = add_list_templatestyles('plainlist', |
local plainlist_styles = add_list_templatestyles('plainlist', 'Plainlist/styles.css') |
||
local hlist_styles = add_list_templatestyles('hlist', |
local hlist_styles = add_list_templatestyles('hlist', 'Hlist/styles.css') |
||
-- 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 = |
name = 'templatestyles', args = { src = 'Hlist/styles.css' } |
||
} |
} |
||
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 309: | Line 309: | ||
end |
end |
||
local navbar_templatestyles = '' |
|||
if not child and has_navbar(args.navbar, args.name) then |
if not child and has_navbar(args.navbar, args.name) then |
||
-- work around [[phab:T303378]] |
|||
navbar_templatestyles = frame:extensionTag{ |
|||
name = 'templatestyles', args = { src = 'Module:Navbar/styles.css' } |
|||
} |
|||
root |
root |
||
:tag('tr') |
:tag('tr') |
||
Line 349: | Line 354: | ||
return table.concat({ |
return table.concat({ |
||
add_list_styles(args), -- see [hlist_note] above about ordering |
add_list_styles(args), -- see [hlist_note] above about ordering |
||
navbar_templatestyles, |
|||
base_templatestyles, |
base_templatestyles, |
||
templatestyles, |
templatestyles, |
||
Line 383: | Line 389: | ||
: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) |