"ഘടകം:Navbox" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
Content deleted Content added
Jacob.jose (സംവാദം | സംഭാവനകൾ) വിവർത്തനം |
update from Module:Navbox/sandbox per Template talk:Navbox#Merging nowrap navbox to implement nowrapitems=yes to nowrap listN + above + below text |
||
വരി 57:
end
local function
if
-- Applying nowrap to lines in a table does not make sense.
return '\n' .. s ..'\n'▼
-- Add newlines to compensate for trim of x in |parm=x in a template.
return
end
if nowrapitems == 'yes' then
local lines = {}
for line in (item .. '\n'):gmatch('([^\n]*)\n') do
local prefix, content = line:match('^([*:;#]+)%s*(.*)')
if prefix and not content:match('^<span class="nowrap">') then
line = prefix .. '<span class="nowrap">' .. content .. '</span>'
end
table.insert(lines, line)
end
item = table.concat(lines, '\n')
end
if item:match('^[*:;#]') then
end
return item
end
Line 82 ⟶ 97:
local function renderNavBar(titleCell)
if args.navbar ~= 'off' and args.navbar ~= 'plain' and not (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == '
titleCell:wikitext(navbar{
args.name,
Line 139 ⟶ 154:
:css('font-size', '114%')
:css('margin', '0 4em')
:wikitext(
end
Line 164 ⟶ 179:
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(
end
Line 178 ⟶ 193:
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(
end
Line 197 ⟶ 212:
:attr('rowspan', 2 * #listnums - 1)
:tag('div')
:wikitext(
end
Line 257 ⟶ 272:
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
:wikitext(
if index == 1 and args.image then
Line 269 ⟶ 284:
:attr('rowspan', 2 * #listnums - 1)
:tag('div')
:wikitext(
end
end
Line 325 ⟶ 340:
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end
for
builder:wikitext('[[Category:' .. cat .. ']]')
end
Line 371 ⟶ 386:
args = navboxArgs
for k,
if type(k) == 'string' then
if listnum then table.insert(listnums, tonumber(listnum)) end
end
end
table.sort(listnums)
Line 428 ⟶ 445:
getArgs = require('Module:Arguments').getArgs
end
args = getArgs(frame, {wrappers = '
-- Read the arguments in the order they'll be output in, to make references number in the right order.
|