「モジュール:Side box」の版間の差分

en:Module:Side box oldid=1096940545 より更新(MediaWiki‐ノート:Common.cssに伴う修正)
bsd>Izno
(we cookin with plainlist templatestyles now)
bsd>ネイ
(en:Module:Side box oldid=1096940545 より更新(MediaWiki‐ノート:Common.cssに伴う修正))
29行目: 29行目:
if args.image and args.image ~= 'none' then
if args.image and args.image ~= 'none' then
data.image = args.image
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
end


45行目: 36行目:
'role',
'role',
'labelledby',
'labelledby',
-- Classes
'textclass',


-- Styles
-- Styles
82行目: 77行目:
if data.style then
if data.style then
root:cssText(data.style)
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
end


117行目: 105行目:
local text = body:newline():tag('div')
local text = body:newline():tag('div')
text:addClass('side-box-text')
text:addClass('side-box-text')
:addClass(data.textclass)
:addClass(data.textclass or 'plainlist')
if data.textstyle then
if data.textstyle then
text:cssText(data.textstyle)
text:cssText(data.textstyle)
140行目: 128行目:


root:newline()
root:newline()
local frame = mw.getCurrentFrame()
local templatestyles = ''
local templatestyles = ''
if data.templatestyles then
if data.templatestyles then
匿名利用者