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

+textclass parameter
mediawiki>Rxy
(「モジュール:Side box」を保護しました: 影響が特に大きいテンプレート: 現時点で 193441 ページからの読み込み ([編集=管理者のみに許可] (無期限) [移動=管理者のみに許可] (無期...)
 
mediawiki>Uzume
(+textclass parameter)
27行目: 27行目:
-- Main table classes
-- Main table classes
data.classes = {}
data.classes = {}
if yesno(args.metadata) ~= false then
table.insert(data.classes, 'metadata')
end
if args.position and args.position:lower() == 'left' then
if args.position and args.position:lower() == 'left' then
table.insert(data.classes, 'mbox-small-left')
table.insert(data.classes, 'mbox-small-left')
39行目: 42行目:
end
end


-- Copy over data that doesn't need adjusting
-- Copy over data that does not need adjusting
local argsToCopy = {
local argsToCopy = {
-- Classes
'textclass',
-- Styles
-- Styles
'style',
'style',
68行目: 74行目:
-- Table root
-- Table root
local root = mw.html.create('table')
local root = mw.html.create('table')
root:attr('role', 'presentation')
for i, class in ipairs(data.classes or {}) do
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
root:addClass(class)
end
end
root:css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9'}
root:css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9', color = '#000'}
if data.style then
if data.style then
root:cssText(data.style)
root:cssText(data.style)
103行目: 110行目:
end
end
local textCell = bodyRow:newline():tag('td')
local textCell = bodyRow:newline():tag('td')
textCell:addClass('mbox-text plainlist')
textCell:addClass('mbox-text')
textCell:addClass(data.textclass or 'plainlist')
if data.textstyle then
if data.textstyle then
textCell:cssText(data.textstyle)
textCell:cssText(data.textstyle)
126行目: 134行目:
end
end


root:newline()
return tostring(root)
return tostring(root)
end
end


return p
return p
匿名利用者