അജ്ഞാത ഉപയോക്താവ്
തിരുത്തലിനു സംഗ്രഹമില്ല
(ചെ.) (ഒരു പതിപ്പ് ഇറക്കുമതി ചെയ്തു) |
mlwiki>Kiran Gopi No edit summary |
||
| വരി 6: | വരി 6: | ||
local p = {} | local p = {} | ||
local getArgs = require(' | local getArgs = require('ഘടകം:Arguments').getArgs | ||
local navbar = require(' | local navbar = require('ഘടകം:Navbar')._navbar | ||
local function trimAndAddAutomaticNewline(s) | local function trimAndAddAutomaticNewline(s) | ||
| വരി 19: | വരി 19: | ||
else | else | ||
return s | return s | ||
end | |||
end | |||
local function hasSubgroup(s) | |||
if mw.ustring.find(s, 'vertical%-navbox%-subgroup') then | |||
return true | |||
else | |||
return false | |||
end | end | ||
end | end | ||
| വരി 29: | വരി 37: | ||
local child = args.child and mw.text.trim(args.child) == 'yes' | local child = args.child and mw.text.trim(args.child) == 'yes' | ||
root = root:tag('table') | |||
if not child then | if not child then | ||
root | root | ||
:addClass('vertical-navbox') | :addClass('vertical-navbox') | ||
:addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil) | :addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil) | ||
| വരി 90: | വരി 98: | ||
:wikitext(args.pretitle) | :wikitext(args.pretitle) | ||
end | end | ||
else | |||
root | |||
:addClass('vertical-navbox-subgroup') | |||
:css('width', '100%') | |||
:css('margin', '0px') | |||
:css('border-spacing', '0px') | |||
:addClass(args.bodyclass or args.class) | |||
:cssText(args.bodystyle or args.style) | |||
end | end | ||
| വരി 97: | വരി 112: | ||
root | root | ||
:wikitext(args.title) | :wikitext(args.title) | ||
else | else | ||
root | root | ||
| വരി 179: | വരി 193: | ||
:tag('td') | :tag('td') | ||
:addClass(args.contentclass) | :addClass(args.contentclass) | ||
:css('padding', '0 0.1em 0.4em') | :css('padding', hasSubgroup(content) and '0.1em 0 0.2em' or '0 0.1em 0.4em') | ||
:cssText(args.contentstyle) | :cssText(args.contentstyle) | ||
:cssText(args['content' .. num .. 'style']) | :cssText(args['content' .. num .. 'style']) | ||
| വരി 218: | വരി 232: | ||
end | end | ||
return tostring(root) | return tostring(root) .. (child and '[[Category:Pages using sidebar with the child parameter]]' or '') | ||
end | end | ||
| വരി 227: | വരി 241: | ||
args.belowstyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.belowstyle or '') | args.belowstyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.belowstyle or '') | ||
args.navbarstyle = 'padding-top: 0.6em;' .. (args.navbarstyle or args.tnavbarstyle or '') | args.navbarstyle = 'padding-top: 0.6em;' .. (args.navbarstyle or args.tnavbarstyle or '') | ||
if not args.name and frame:getParent():getTitle():gsub('/sandbox$', '') == ' | if not args.name and frame:getParent():getTitle():gsub('/sandbox$', '') == 'ഫലകം:Sidebar with collapsible lists' then | ||
args.navbar = 'none' | args.navbar = 'none' | ||
end | end | ||