Among Us Wiki

Welcome to the Among Us Wiki! We are happy that you are here. To get started, make sure you know our wiki rules! Also, make sure all edits are following the Manual of Style. This will help ensure all of the wiki follows a standard format.

If you need any help, contact our staff. You can also post in the community discussions or chat with other members on our Discord server.

Thank you and have a great day!

READ MORE

Among Us Wiki
Advertisement
-- nowiki
local p =  require('Dev:PortableNavbox')

-- Creates a horizontal list where two items are stacked on top of each other, typically an image and a caption
-- Odd arguments are the top item
-- Even arguments are the bottom item
function p.stackedList(frame)
	local args = frame.args
	local list = {
		'<div style<nowiki>=</nowiki>"display: flex; flex-wrap: wrap; gap: 1em; text-align: center; align-items: center;">'
	}

	for key, value in ipairs(args) do
		local i = tonumber(key)
		if key and value then
			i = i - 1
			if i % 2 == 0 then
				table.insert(list, '<span>')
				table.insert(list, mw.text.trim(value))
				table.insert(list, '<br />')
			else
				table.insert(list, mw.text.trim(value))
				table.insert(list, '</span>')
			end
		end
	end

	table.insert(list, '</div>')

	return table.concat(list)
end

return p
Advertisement