الفرق بين الصفحتين: «وحدة:Clickable button 2» و«وحدة:Clickable button 2/ملعب»

(الفرق بين الصفحتين)
اذهب إلى التنقل اذهب إلى البحث
صفحة 1
صفحة 2
ط (بوت: تعريب V2.0)
 
(أنشأ الصفحة ب'-- This module implements {{clickable button 2}}. local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = require('Module:Arguments')....')
 
سطر 1: سطر 1:
-- This module implements {{زر للنقر 2}}.
-- This module implements {{clickable button 2}}.


local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')
سطر 7: سطر 7:
function p.main(frame)
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'قالب:زر للنقر 2'
wrappers = 'قالب:زر للنقر 2/ملعب'
})
})
return p.luaMain(args)
return p.luaMain(args)
سطر 48: سطر 48:
local class = args.class and args.class:lower()
local class = args.class and args.class:lower()
data.classes = {}
data.classes = {}
if class == 'ui-button-red'
if class == 'ui-button-green'
or class == 'ui-button-pink'
or class == 'ui-button-purple'
or class == 'ui-button-deep-purple'
or class == 'ui-button-indigo'
or class == 'ui-button-blue'
or class == 'ui-button-blue'
or class == 'ui-button-light-blue'
or class == 'ui-button-red'
or class == 'ui-button-cyan'
or class == 'ui-button-teal'
    or class == 'ui-button-green'
    or class == 'ui-button-light-green'
    or class == 'ui-button-lime'
    or class == 'ui-button-yellow'
    or class == 'ui-button-amber'
or class == 'ui-button-orange'
or class == 'ui-button-deep-orange'
or class == 'ui-button-brown'
or class == 'ui-button-grey'
or class == 'ui-button-blue-grey'
or class == 'ui-button-black'
then
then
table.insert(
table.insert(
سطر 99: سطر 82:
and mw.title.equals(currentTitle, linkTitle)
and mw.title.equals(currentTitle, linkTitle)
then
then
if class == 'ui-button-red'
if class == 'ui-button-blue'
or class == 'mw-ui-progressive'
or class == 'mw-ui-progressive'
then
data.backgroundColor = '#F44336'
elseif class == 'ui-button-pink'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#E91E63'
elseif class == 'ui-button-purple'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#9C27B0'
elseif class == 'ui-button-deep-purple'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#673AB7'
elseif class == 'ui-button-indigo'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#3F51B5'
elseif class == 'ui-button-blue'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#2196F3'
elseif class == 'ui-button-light-blue'
or class == 'mw-ui-constructive'
or class == 'mw-ui-constructive'
then
then
data.backgroundColor = '#03A9F4'
data.backgroundColor = '#2962CB'
elseif class == 'ui-button-cyan'
elseif class == 'ui-button-green' then
or class == 'mw-ui-constructive'
data.backgroundColor = '#008B6D'
then
elseif class == 'ui-button-red' or class == 'mw-ui-destructive' then
data.backgroundColor = '#00BCD4'
data.backgroundColor = '#A6170F'
elseif class == 'ui-button-teal'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#009688'
elseif class == 'ui-button-green'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#4CAF50'
elseif class == 'ui-button-light-green'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#8BC34A'
elseif class == 'ui-button-lime'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#CDDC39'
elseif class == 'ui-button-yellow'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#FFEB3B'
elseif class == 'ui-button-amber'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#FFC107'
elseif class == 'ui-button-orange'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#FF9800'
elseif class == 'ui-button-deep-orange'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#FF5722'
elseif class == 'ui-button-brown'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#795548'
elseif class == 'ui-button-grey'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#9E9E9E'
elseif class == 'ui-button-blue-grey'
or class == 'mw-ui-destructive'
then
data.backgroundColor = '#607D8B'
elseif class == 'ui-button-black'
or class == 'mw-ui-destructive'
then
data.backgroundColor = '#000000'
else
else
data.backgroundColor = '#CCC'
data.backgroundColor = '#CCC'
سطر 200: سطر 112:
end
end
displaySpan
displaySpan
:attr('role', 'button')
:attr('aria-disabled', 'false')
:css{
:css{
['background-color'] = data.backgroundColor,
['background-color'] = data.backgroundColor,
سطر 229: سطر 139:
end
end
local class = args.class and args.class:lower()
local class = args.class and args.class:lower()
if class == 'ui-button-red'
if class == 'ui-button-green'
or class == 'ui-button-pink'
or class == 'ui-button-purple'
or class == 'ui-button-deep-purple'
or class == 'ui-button-indigo'
or class == 'ui-button-blue'
or class == 'ui-button-blue'
or class == 'ui-button-light-blue'
or class == 'ui-button-red'
or class == 'ui-button-cyan'
or class == 'ui-button-teal'
    or class == 'ui-button-green'
    or class == 'ui-button-light-green'
    or class == 'ui-button-lime'
    or class == 'ui-button-yellow'
    or class == 'ui-button-amber'
or class == 'ui-button-orange'
or class == 'ui-button-deep-orange'
or class == 'ui-button-brown'
or class == 'ui-button-grey'
or class == 'ui-button-blue-grey'
or class == 'ui-button-black'
then
then
return '[[Category:Pages using old style ui-button-color]]'
return '[[Category:Pages using old style ui-button-color]]'