Module:High-use: Difference between revisions
Jump to navigation
Jump to search
no edit summary
m (1 revision imported) |
imported>Compooper No edit summary |
||
Line 118: | Line 118: | ||
function p.main(frame) | function p.main(frame) | ||
local count = _fetch(frame) | local count = _fetch(frame) | ||
local image = "[[File: | local image = "[[File:Warning new icon.png|40px|alt=Warning|link=]]" | ||
local type_param = "style" | local type_param = "style" | ||
local epilogue = '' | local epilogue = '' | ||
local style = "background:#fcfcfc;border: 0px solid #a2a9b1;border-left: 25px solid #ffa800;padding: 10px 0 10px 0.5em; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" | |||
if frame.args['system'] and frame.args['system'] ~= '' then | if frame.args['system'] and frame.args['system'] ~= '' then | ||
image = "[[File: | image = "[[File:Warning new icon.png|40px|alt=Warning|link=]]" | ||
type_param = "content" | type_param = "content" | ||
local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] | local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] | ||
Line 130: | Line 131: | ||
end | end | ||
elseif (frame.args[1] == "risk" or (count and count >= 100000)) then | elseif (frame.args[1] == "risk" or (count and count >= 100000)) then | ||
image = "[[File: | image = "[[File:Warning new icon.png|40px|alt=Warning|link=]]" | ||
type_param = "content" | type_param = "content" | ||
end | end | ||
Line 140: | Line 141: | ||
["image"] = image, | ["image"] = image, | ||
["text"] = p.text(frame, count), | ["text"] = p.text(frame, count), | ||
["expiry"] = (frame.args["expiry"] or "") | ["expiry"] = (frame.args["expiry"] or ""), | ||
["style"] = style | |||
} | } | ||
} .. epilogue | } .. epilogue | ||
else | else | ||
return require('Module:Message box').main(' | return require('Module:Message box').main('ambox', { | ||
type = type_param, | type = type_param, | ||
image = image, | image = image, | ||
style = style, | |||
text = p.text(frame, count), | text = p.text(frame, count), | ||
expiry = (frame.args["expiry"] or "") | expiry = (frame.args["expiry"] or "") |