Module:Side box: Difference between revisions

m
1 revision imported from wikipedia:Module:Side_box
m (1 revision imported from wikipedia:Module:Side_box)
m (1 revision imported from wikipedia:Module:Side_box)
 
(One intermediate revision by one other user not shown)
Line 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 36 ⟶ 45:
'role',
'labelledby',
-- Classes
'textclass',
 
-- Styles
Line 77 ⟶ 82:
if data.style then
root:cssText(data.style)
end
local frame = mw.getCurrentFrame()
if data.plainlist_templatestyles then
root:wikitext(frame:extensionTag{
name = 'templatestyles', args = { src = data.plainlist_templatestyles }
})
end
 
Line 105 ⟶ 117:
local text = body:newline():tag('div')
text:addClass('side-box-text')
:addClass(data.textclass or 'plainlist')
if data.textstyle then
text:cssText(data.textstyle)
Line 128 ⟶ 140:
 
root:newline()
local frame = mw.getCurrentFrame()
local templatestyles = ''
if data.templatestyles then
verified
2,504

edits