Jump to content

Module:Clickable button and Module:Clickable button/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
 
renderTrackingCategories: possible new tracking category
 
Line 1: Line 1:
-- This module implements {{clickable button 2}}.
-- This module implements {{clickable button}}.


local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')
Line 72: Line 72:


-- Colours
-- Colours
-- For the merge with {{clickable button}}
-- For the merge of {{clickable button}} and {{clickable button 2}}
local colour = args.color and args.color:lower()
local colour = args.color and args.color:lower()


Line 98: Line 98:
elseif colour == 'red' then
elseif colour == 'red' then
class = 'mw-ui-destructive'
class = 'mw-ui-destructive'
elseif colour == 'green' then
class = 'mw-ui-constructive'
end
end
end
end
Line 130: Line 128:
if class == 'ui-button-blue'
if class == 'ui-button-blue'
or class == 'mw-ui-progressive'
or class == 'mw-ui-progressive'
or class == 'mw-ui-constructive'
then
then
data.backgroundColor = '#2962CB'
data.backgroundColor = '#2962CB'
Line 198: Line 195:
end
end
local class = args.class and args.class:lower()
local class = args.class and args.class:lower()
local colour = args.color and args.color:lower()
if class == 'ui-button-green'
if class == 'ui-button-green'
or class == 'ui-button-blue'
or class == 'ui-button-blue'
Line 203: Line 201:
then
then
return '[[Category:Pages using old style ui-button-color]]'
return '[[Category:Pages using old style ui-button-color]]'
elseif class == 'mw-ui-constructive'
or colour == 'green'
then
return '[[Category:Pages using old style mw-ui-constructive]]'
else
else
return ''
return ''