אונטערשייד צווישן ווערסיעס פון "יחידה:תמונות מרובות"

88 בייטן אראפגענומען ,  פֿאַר 1 יאָר
קיין רעדאגירונג באמערקונג
(צופאסונג)
צייכן: צוריקגעשטעלט
אין תקציר עריכה
 
(2 צווישנדיגע ווערסיעס פונעם זעלבן באַניצער נישט געוויזן)
שורה 108: שורה 108:
local pargs = frame:getParent().args
local pargs = frame:getParent().args
local args = frame.args
local args = frame.args
local width = removepx(pargs['ברייט'] or '')
local width = removepx(pargs['רוחב'] or '')
local dir = pargs['ריכטונג'] or ''
local dir = pargs['כיוון'] or ''
local border = pargs['גבול'] or args['גבול'] or ''
local border = pargs['גבול'] or args['גבול'] or ''
local align = changeIntoEng(pargs['אויסגלייך']) or changeIntoEng(args['אויסגלייך']) or 'left'
local align = changeIntoEng(pargs['יישור']) or changeIntoEng(args['יישור']) or 'left'
local capalign = changeIntoEng(pargs['קעפל אויסגלייך']) or changeIntoEng(args['קעפל אויסגלייך']) or ''
local capalign = changeIntoEng(pargs['יישור כותרת']) or changeIntoEng(args['יישור כותרת']) or ''
local totalwidth = removepx(pargs['ברייט כולל'] or args['ברייט כולל'] or '')
local totalwidth = removepx(pargs['רוחב כולל'] or args['רוחב כולל'] or '')
local imgstyle = pargs['עיצוב בילד'] or args['עיצוב בילד']
local imgstyle = pargs['עיצוב תמונה'] or args['עיצוב תמונה']
local header = pargs['קעפל'] or pargs['קעפל'] or nil
local header = pargs['כותרת'] or pargs['כותרת'] or nil
local footer = pargs['פיסל'] or nil
local footer = pargs['סיומת'] or nil
local imagegap = tonumber(pargs['מרווח'] or '1') or 1
local imagegap = tonumber(pargs['מרווח'] or '1') or 1
local perrow = nil
local perrow = nil
שורה 131: שורה 131:
local imagecount = 0
local imagecount = 0
for k, v in pairs( pargs ) do
for k, v in pairs( pargs ) do
local i = tonumber(tostring(k):match( '^%s*בילד([%d]+)%s*$' ) or '0')
local i = tonumber(tostring(k):match( '^%s*תמונה([%d]+)%s*$' ) or '0')
if( i > 0 and isnotempty(v) ) then
if( i > 0 and isnotempty(v) ) then
table.insert( imagenumbers, i)
table.insert( imagenumbers, i)
שורה 160: שורה 160:
local i = imagenumbers[k]
local i = imagenumbers[k]
if( isnotempty(totalwidth) ) then
if( isnotempty(totalwidth) ) then
widths[k], heights[k] = getdimensions(pargs['בילד' .. i], pargs['ברייט' .. i], pargs['אורך' .. i])
widths[k], heights[k] = getdimensions(pargs['תמונה' .. i], pargs['רוחב' .. i], pargs['אורך' .. i])
else
else
widths[k] = getWidth(width, pargs['ברייט' .. i])
widths[k] = getWidth(width, pargs['רוחב' .. i])
end
end
widthsum[r] = widthsum[r] + widths[k]
widthsum[r] = widthsum[r] + widths[k]
שורה 228: שורה 228:
bodywidth = math.max( 100, bodywidth - 8);
bodywidth = math.max( 100, bodywidth - 8);


local bg = pargs['הינטערגרונט'] or ''
local bg = pargs['רקע'] or ''
-- create the array of images
-- create the array of images
local root = mw.html.create('div')
local root = mw.html.create('div')
שורה 258: שורה 258:
:tag('div')
:tag('div')
:addClass('theader')
:addClass('theader')
:css('text-align', pargs['קעפל אויסגלייך'])
:css('text-align', pargs['יישור כותרת'])
:css('background-color', pargs['קעפל הינטערגרונט'])
:css('background-color', pargs['רקע כותרת'])
:wikitext(header)
:wikitext(header)
end
end
שורה 278: שורה 278:
end
end
local i = imagenumbers[k]
local i = imagenumbers[k]
local img = pargs['בילד' .. i]
local img = pargs['תמונה' .. i]
local w = widths[k]
local w = widths[k]
imagediv:css('width', tostring(2 + w) .. 'px')
imagediv:css('width', tostring(2 + w) .. 'px')
שורה 290: שורה 290:
-- add the footer
-- add the footer
if( isnotempty(footer) ) then
if( isnotempty(footer) ) then
local falign = string.lower(changeIntoEng(pargs['פיסל אויסגלייך']) or changeIntoEng(args['פיסל אויסגלייך']) or 'left')
local falign = string.lower(changeIntoEng(pargs['יישור סיומת']) or changeIntoEng(args['יישור סיומת']) or 'left')
falign = (falign == 'centre') and 'center' or falign
falign = (falign == 'centre') and 'center' or falign
div:tag('div')
div:tag('div')
שורה 298: שורה 298:
:addClass('thumbcaption')
:addClass('thumbcaption')
:css('text-align', (falign ~= 'left') and falign or nil)
:css('text-align', (falign ~= 'left') and falign or nil)
:css('background-color', pargs['פיסל הינטערגרונט'])
:css('background-color', pargs['רקע סיומת'])
:wikitext(footer)
:wikitext(footer)
end
end