Ad placeholder

Module:ParseList: Difference between revisions

Jump to navigation Jump to search
Added no margin version of htmlListNoBullets
(Add 'none' style.)
(Added no margin version of htmlListNoBullets)
 
(2 intermediate revisions by 2 users not shown)
Line 181: Line 181:
else
else
result = result .. textLastDelim .. str
result = result .. textLastDelim .. str
end
end
return result
end,
simpleList = function (elements)
local result = ""
local first = true
for i, str in ipairs(elements) do
if first then
result = str
first = false
else
result = result .. ", " .. str
end
end
end
end
Line 192: Line 205:
return result .. "</ul>"
return result .. "</ul>"
end,
end,
tableList = function (elements)
htmlListNoBullets = function (elements)
local result = "<div class=\"bg3wiki-tablelist\">"
local result = "<ul style='list-style: none;'>\n"
for i, str in ipairs(elements) do
for i, str in ipairs(elements) do
result = result .. str .. "\n"
result = result .. "<li>" .. str .. "</li>\n"
end
end
return result .. "</div>"
return result .. "</ul>"
end,
end,
htmlListNoBullets = function (elements)
htmlListNoBulletsOrMargin = function (elements)
local result = "<ul style='list-style: none; margin: 0;'>\n"
local result = "<ul style='list-style: none; margin: 0'>\n"
for i, str in ipairs(elements) do
for i, str in ipairs(elements) do
result = result .. "<li>" .. str .. "</li>\n"
result = result .. "<li>" .. str .. "</li>\n"
Line 206: Line 219:
return result .. "</ul>"
return result .. "</ul>"
end,
end,
simpleList = function (elements)
tableList = function (elements)
local result = ""
local result = "<div class=\"bg3wiki-tablelist\">"
local first = true
for i, str in ipairs(elements) do
for i, str in ipairs(elements) do
if first then
result = result .. str .. "\n"
result = str
first = false
else
result = result .. ", " .. str
end
end
end
return result
return result .. "</div>"
end,
end,
none = function (elements)
none = function (elements)

Navigation menu