Изменения

Перейти к навигации Перейти к поиску
переход от разделения строк строками к разделению с помощью CSS: спасибо en:Special:Diff/783327286
Строка 95: Строка 95:  
return s
 
return s
 
end
 
end
end
  −
  −
local function addTableRow(tbl)
  −
-- If any other rows have already been added, then we add a 2px gutter row.
  −
if tableRowAdded then
  −
tbl
  −
:tag('tr')
  −
:css('height', '2px')
  −
:tag('td')
  −
:attr('colspan',2)
  −
end
  −
  −
tableRowAdded = true
  −
  −
return tbl:tag('tr')
   
end
 
end
   Строка 144: Строка 129:  
if not maintitle then return end
 
if not maintitle then return end
   −
local titleRow = addTableRow(tbl)
+
local titleRow = tbl:tag('tr')
    
if args.titlegroup then
 
if args.titlegroup then
Строка 202: Строка 187:  
if not above then return end
 
if not above then return end
   −
addTableRow(tbl)
+
tbl:tag('tr')
 
:tag('td')
 
:tag('td')
 
:addClass('navbox-abovebelow')
 
:addClass('navbox-abovebelow')
Строка 216: Строка 201:  
if not below then return end
 
if not below then return end
   −
addTableRow(tbl)
+
tbl:tag('tr')
 
:tag('td')
 
:tag('td')
 
:addClass('navbox-abovebelow')
 
:addClass('navbox-abovebelow')
Строка 241: Строка 226:     
local function renderListRow(tbl, index, listnum)
 
local function renderListRow(tbl, index, listnum)
local row = addTableRow(tbl)
+
local row = tbl:tag('tr')
    
if index == 1 and imageleft then
 
if index == 1 and imageleft then
Строка 248: Строка 233:  
:addClass('navbox-image')
 
:addClass('navbox-image')
 
:addClass(imageclass)
 
:addClass(imageclass)
:css('width', '1%')
+
:css('width', '1px')
 
:css('padding', '0px 7px 0px 0px')
 
:css('padding', '0px 7px 0px 0px')
 
:cssText(imageleftstyle)
 
:cssText(imageleftstyle)
:attr('rowspan', 2 * #listnums - 1)
+
:attr('rowspan', #listnums)
 
:tag('div')
 
:tag('div')
 
:wikitext(addNewline(imageleft))
 
:wikitext(addNewline(imageleft))
Строка 264: Строка 249:  
:addClass(groupclass)
 
:addClass(groupclass)
 
:cssText(basestyle)
 
:cssText(basestyle)
 
+
:css('width', args.groupwidth or '1px') -- If groupwidth not specified, minimize width
 +
 
-- заголовки без списков - для обратной совместимости, только в нашем разделе
 
-- заголовки без списков - для обратной совместимости, только в нашем разделе
 
if not (args['list' .. listnum] or args['список' .. listnum]) then
 
if not (args['list' .. listnum] or args['список' .. listnum]) then
Строка 272: Строка 258:  
groupCell:attr('colspan', 2)
 
groupCell:attr('colspan', 2)
 
end
 
end
end
  −
  −
if groupwidth then
  −
groupCell:css('width', groupwidth)
   
end
 
end
   Строка 334: Строка 316:  
:addClass('navbox-image')
 
:addClass('navbox-image')
 
:addClass(imageclass)
 
:addClass(imageclass)
:css('width', '1%')
+
:css('width', '1px')
 
:css('padding', '0px 0px 0px 7px')
 
:css('padding', '0px 0px 0px 7px')
 
:cssText(imagestyle)
 
:cssText(imagestyle)
:attr('rowspan', 2 * #listnums - 1)
+
:attr('rowspan', #listnums)
 
:tag('div')
 
:tag('div')
 
:wikitext(addNewline(image))
 
:wikitext(addNewline(image))
Строка 420: Строка 402:  
if border == 'subgroup' or border == 'none' then
 
if border == 'subgroup' or border == 'none' then
 
tbl
 
tbl
:addClass('navbox-subgroup')
+
:addClass('navbox-subgroup navbox-spacing-temp')
 
:cssText(bodystyle)
 
:cssText(bodystyle)
 
:cssText(style)
 
:cssText(style)
Строка 528: Строка 510:  
local nav = res:tag('div')
 
local nav = res:tag('div')
 
:attr('role', 'navigation')
 
:attr('role', 'navigation')
:addClass('navbox')
+
:addClass('navbox navbox-spacing-temp')
 
:cssText(bodystyle)
 
:cssText(bodystyle)
 
:cssText(style)
 
:cssText(style)
Анонимный участник

Реклама:

Навигация