Module:Navbox: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
சி htmlbuilder moved
fix title centering
வரிசை 81:
function renderNavBar(titleCell)
-- Depending on the presence of the navbar and/or show/hide link, we may need to add a spacer div on the left
local addStateLinkPlaceholder = false
-- or right to keep the title centered.
if args.navbar == 'plain' or args.navbar == 'off' or (not args.name and (border == 'subgroup' or border == 'child' or border == 'none')) then
local spacerSide = nil
if args.navbar == 'off' then
 
addStateLinkPlaceholder = (args.state == 'plain')
if args.navbar == 'off' elsethen
-- No navbar, and client wants no spacer, i.e. wants the title to be shifted to the left. If there's
addStateLinkPlaceholder = (args.state ~= 'plain')
-- also no show/hide link, then we need a spacer on the right to achieve the left shift.
end
if args.navbarstate == 'offplain' then spacerSide = 'right' end
ifelseif args.navbar == 'plain' or args.navbar == 'off' or (not args.name and (border == 'subgroup' or border == 'child' or border == 'none')) then
-- No navbar. Need a spacer on the left to balance out the width of the show/hide link.
if args.state ~= 'plain' then spacerSide = 'left' end
else
-- Will render navbar (or error message). If there's no show/hide link, need a spacer on the right
-- to balance out the width of the navbar.
if args.state == 'plain' then spacerSide = 'right' end
 
if args.name then
titleCell.wikitext(mw.getCurrentFrame():expandTemplate{ title = 'navbar', args = {
வரி 102 ⟶ 110:
.css('white-space', 'nowrap')
.wikitext('Error: No name provided')
addStateLinkPlaceholder = (args.state == 'plain')
end
end
-- Render the spacer div.
if addStateLinkPlaceholder then
if spacerSide then
titleCell
.tag('span')
.css('float', 'right'spacerSide)
.css('width', '6em')
.wikitext(' ')
"https://tamilar.wiki/w/Module:Navbox" இலிருந்து மீள்விக்கப்பட்டது