Module:FlexGallery: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
local images = {} | local images = {} | ||
local thumbnails = {} | local thumbnails = {} | ||
local gallery | |||
-- frame.args | -- frame.args | ||
| Line 18: | Line 19: | ||
end | end | ||
end | end | ||
return | local gallery = "<div><ul>" | ||
for k, v in pairs(images) do | |||
mw.html.create('li') | |||
li | |||
:css("display", "inline-block") | |||
:css("vertical-align", "top") | |||
:wikitext("hello") | |||
return tostring(li) | |||
end | |||
end | end | ||
return p | return p | ||
Revision as of 20:37, 20 August 2025
Documentation for this module may be created at Module:FlexGallery/doc
local p = {}
local width
local images = {}
local thumbnails = {}
local gallery
-- frame.args
p.hi = function(frame)
for k, v in pairs(frame.args) do
-- v = v:gsub("[\n\r]", "") seems unnecessary..
v = tostring(v)
if k == 1 then
width = tonumber(v)
elseif (k % 2) == 0 then
table.insert(images, tostring(v))
else
table.insert(thumbnails, tostring(v))
end
end
local gallery = "<div><ul>"
for k, v in pairs(images) do
mw.html.create('li')
li
:css("display", "inline-block")
:css("vertical-align", "top")
:wikitext("hello")
return tostring(li)
end
end
return p