Content deleted Content added
add collapsing for `text` |
we cookin with plainlist templatestyles now? |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1:
local yesno = require('Module:Yesno')
local p = {}
Line 24 ⟶ 21:
table.insert(data.classes, 'mw-collapsed')
end
data.collapsible = true
end
Line 31 ⟶ 29:
if args.image and args.image ~= 'none' then
data.image = args.image
end
-- we have to check to see if a downstream use has plainlist like
-- Template:Sister_project. also it's the default. wikitext is :(
if args.textclass == 'plainlist' or not args.textclass then
data.textclass = 'plainlist'
data.plainlist_templatestyles = 'Plainlist/styles.css'
else
data.textclass = args.textclass
end
Line 38 ⟶ 45:
'role',
'labelledby',
-- Styles
'style',
'textstyle',
'templatestyles',
-- Above row
Line 77 ⟶ 82:
if data.style then
root:cssText(data.style)
end
if data.plainlist_templatestyles then
root:wikitext(frame:extensionTag{
name = 'templatestyles', args = { src = data.plainlist_templatestyles }
})
end
Line 96 ⟶ 108:
local body = root:newline():tag('div')
body:addClass('side-box-flex')
:addClass(
:newline()
if data.image then
Line 105 ⟶ 117:
local text = body:newline():tag('div')
text:addClass('side-box-text')
:addClass(data.textclass
if data.textstyle then
text:cssText(data.textstyle)
Line 128 ⟶ 140:
root:newline()
local templatestyles = ''
▲ return mw.getCurrentFrame():extensionTag{
if data.templatestyles then
templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = data.templatestyles }
▲ }
end
return frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Side box/styles.css' }
} .. templatestyles .. tostring(root)
end
|