"ഘടകം:Sidebar" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

407 ബൈറ്റുകൾ കൂട്ടിച്ചേർത്തിരിക്കുന്നു ,  29 ഓഗസ്റ്റ് 2020
തിരുത്തലിനു സംഗ്രഹമില്ല
(ചെ.) (ഒരു പതിപ്പ് ഇറക്കുമതി ചെയ്തു)
 
mlwiki>Kiran Gopi
No edit summary
വരി 6: വരി 6:
local p = {}
local p = {}


local getArgs = require('Module:Arguments').getArgs
local getArgs = require('ഘടകം:Arguments').getArgs
local navbar = require('Module:Navbar')._navbar
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
root  
:tag('table')
: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)
:wikitext('</th></tr>') -- @todo replace this with unclosed again once mw.html gets it
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$', '') == 'Template:Sidebar with collapsible lists' then
if not args.name and frame:getParent():getTitle():gsub('/sandbox$', '') == 'ഫലകം:Sidebar with collapsible lists' then
args.navbar = 'none'
args.navbar = 'none'
end
end
അജ്ഞാത ഉപയോക്താവ്
"https://schoolwiki.in/പ്രത്യേകം:മൊബൈൽവ്യത്യാസം/1060621" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്