Content deleted Content added
oh well |
make the switch labels the index number within the list |
||
Line 38:
local randomiseArgs = { ['t'] = galleryLines }
local sortedLines = nonRandom and galleryLines or randomModule.main('array', randomiseArgs)
for i = 1, #sortedLines do
sortedLines[i] = sortedLines[i]:gsub("__SWITCHLABELPLACEHOLDER__", tostring(i))
end
local galleryContent = table.concat(sortedLines, '\n')
local output = '<div class="' .. containerClassName .. '" style="max-width:' .. normaliseCssMeasurement(maxWidth) .. '; margin:-4em auto;">{{#tag:gallery|' .. galleryContent .. '|mode=slideshow|class=switcher-container}}</div>'
Line 50 ⟶ 53:
end
local creditLine = ( credit and '<p><span style="font-size:88%">' .. credit .. '</span></p>' or '' )
return title.prefixedText .. '{{!}}<span class="switcher-label" style="display:none">
end
|