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

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
imported>Sukanthi
"-- implements template:multiple image local p = {} local autoscaledimages local nonautoscaledimages local function isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local function removepx(s) return tostring(s or ''):match('^(.*)[Pp][Xx]%s*$') or s end local function getdimensions(s, w, h) if tonumber(w) and tonumber(h) then nonautoscaled..."-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது
 
imported>சுப. இராஜசேகர்
*திருத்தம்*
 
வரிசை 26:
end
 
local function renderImageCell(image, width, height, link, alt, thumbtime, caption, textalign, istyle, border)
local root = mw.html.create('')
 
வரிசை 42:
 
local imagediv = root:tag('div')
imagediv:addClass((border ~= 'infobox') and 'thumbimage' or nil)
imagediv:cssText(istyle)
if( height ) then
வரிசை 51:
if isnotempty(caption) then
local captiondiv = root:tag('div')
captiondiv:addClass((border ~= 'infobox') and 'thumbcaption' or nil)
if isnotempty(textalign) then
captiondiv:addClass('text-align-' .. textalign)
வரிசை 232:
 
local div = root:tag('div')
div:addClass((border ~= 'infobox') and 'thumbinner multiimageinner' or 'multiimageinner')
div:css('width', tostring(bodywidth) .. 'px')
:css('max-width', tostring(bodywidth) .. 'px')
வரிசை 248:
:addClass('theader')
:css('text-align', pargs['header_align'])
:css('background-color', pargs['header_background'])
(pargs['header_background'] ~= '') and pargs['header_background'] or nil)
:wikitext(header)
end
வரி 263 ⟶ 264:
imagediv:css('background-color', bg);
end
if ((imagegap > 1) and (jk < perrow[r]))imagecount then
if dir == 'vertical' then
imagediv:css('margin-right', tostring(imagegap) .. 'px')
imagediv:css('margin-bottom', tostring(imagegap) .. 'px')
elseif j < perrow[r] then
imagediv:css('margin-right', tostring(imagegap) .. 'px')
end
end
local i = imagenumbers[k]
வரி 273 ⟶ 278:
imagediv:wikitext(renderImageCell(img, w, heights[k],
pargs['link' .. i], pargs['alt' .. i],
pargs['thumbtime' .. i], pargs['caption' .. i], capalign, imgstyle, border))
end
end
வரி 279 ⟶ 284:
-- add the footer
if( isnotempty(footer) ) then
local falign = string.lower(pargs['footer_align'] or args['footer_align'] or 'left')
falign = (falign == 'centre') and 'center' or falign
div:tag('div')
:addClass('trow')
:css('display', (falign ~= 'left') and 'flow-root' or 'flex')
:tag('div')
:addClass((border ~= 'infobox') and 'thumbcaption' or nil)
:css('text-align', (falign ~= 'left') and falign or nil)
:css('background-color', pargs['footer_background'])
(pargs['footer_background'] ~= '') and pargs['footer_background'] or nil)
:wikitext(footer)
end
வரி 304 ⟶ 310:
.. (nonautoscaledimages and '[[Category:Pages using multiple image with manual scaled images]]' or '')
end
 
p[''] = function( frame ) return p.render( frame:newChild{title = frame:getTitle()} ) end
 
return p
"https://tamilar.wiki/w/Module:Multiple_image" இலிருந்து மீள்விக்கப்பட்டது