کاربر ناشناس
پودمان:List: تفاوت میان نسخهها
جز
Changed protection settings for "Module:List": High-risk Lua module: Used in MediaWiki interface ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
جز (۱ نسخه واردشده) |
جز (Changed protection settings for "Module:List": High-risk Lua module: Used in MediaWiki interface ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))) |
||
خط ۱: | خط ۱: | ||
-- This module outputs different kinds of lists. At the moment, bulleted, | -- This module outputs different kinds of lists. At the moment, bulleted, | ||
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. | -- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. | ||
خط ۳۸: | خط ۳۷: | ||
indent = indent and indent * 1.6 or 0 | indent = indent and indent * 1.6 or 0 | ||
if indent > 0 then | if indent > 0 then | ||
data.marginLeft = indent .. 'em' | |||
data. | |||
end | end | ||
end | end | ||
خط ۱۱۵: | خط ۱۱۳: | ||
root:addClass(class) | root:addClass(class) | ||
end | end | ||
root:css{['margin-left'] = data.marginLeft} | |||
root:css{['margin- | |||
if data.style then | if data.style then | ||
root:cssText(data.style) | root:cssText(data.style) | ||
خط ۱۶۱: | خط ۱۵۸: | ||
local ret = '' | local ret = '' | ||
if isDeprecated then | if isDeprecated then | ||
ret = ret .. '[[ | ret = ret .. '[[Category:List templates with deprecated parameters]]' | ||
end | end | ||
return ret | return ret | ||
خط ۱۶۹: | خط ۱۶۶: | ||
if not listType or not listTypes[listType] then | if not listType or not listTypes[listType] then | ||
error(string.format( | error(string.format( | ||
" | "bad argument #1 to 'makeList' ('%s' is not a valid list type)", | ||
tostring(listType) | tostring(listType) | ||
), 2) | ), 2) |