בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,382
רעדאגירונגען
(אימפ) |
(צופאסונג) צייכן: צוריקגעשטעלט |
||
| שורה 108: | שורה 108: | ||
local pargs = frame:getParent().args | local pargs = frame:getParent().args | ||
local args = frame.args | local args = frame.args | ||
local width = removepx(pargs[' | local width = removepx(pargs['ברייט'] or '') | ||
local dir = pargs[' | local dir = pargs['ריכטונג'] or '' | ||
local border = pargs['גבול'] or args['גבול'] or '' | local border = pargs['גבול'] or args['גבול'] or '' | ||
local align = changeIntoEng(pargs[' | local align = changeIntoEng(pargs['אויסגלייך']) or changeIntoEng(args['אויסגלייך']) or 'left' | ||
local capalign = changeIntoEng(pargs[' | local capalign = changeIntoEng(pargs['קעפל אויסגלייך']) or changeIntoEng(args['קעפל אויסגלייך']) or '' | ||
local totalwidth = removepx(pargs[' | local totalwidth = removepx(pargs['ברייט כולל'] or args['ברייט כולל'] or '') | ||
local imgstyle = pargs['עיצוב | local imgstyle = pargs['עיצוב בילד'] or args['עיצוב בילד'] | ||
local header = pargs[' | local header = pargs['קעפל'] or pargs['קעפל'] or nil | ||
local footer = pargs[' | 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* | 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[' | widths[k], heights[k] = getdimensions(pargs['בילד' .. i], pargs['ברייט' .. i], pargs['אורך' .. i]) | ||
else | else | ||
widths[k] = getWidth(width, pargs[' | 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[' | 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[' | 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[' | 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 | ||
| שורה 310: | שורה 310: | ||
nonautoscaledimages = false | nonautoscaledimages = false | ||
return frame:extensionTag {name = 'templatestyles', args = {src = ' | return frame:extensionTag {name = 'templatestyles', args = {src = 'מערערע בילדער/styles.css', wrapper = ".tmulti"}} | ||
.. renderMultipleImages( frame ) | .. renderMultipleImages( frame ) | ||
-- .. (autoscaledimages and '[[Category:Pages using multiple image with auto scaled images]]' or '') | -- .. (autoscaledimages and '[[Category:Pages using multiple image with auto scaled images]]' or '') | ||
רעדאגירונגען