打开/关闭菜单
打开/关闭个人菜单
未登录
如果您进行任何编辑,您的IP地址会公开展示。

Module:Gallery

来自星际公民中文百科
Module documentation[view][edit][history][purge]
This documentation is transcluded from Module:Gallery/doc. Changes can be proposed in the talk page.
Module:Gallery requires Module:Arguments.

Module:Gallery is a module that implements the {{Gallery}} template. Please see the template page for usage instructions.


local getArgs = require('Module:Arguments').getArgs
local p = {}
local root

function p.main(frame)
	local args = getArgs(frame)
	return p._main(args)
end

function p._main(args)
	local filearg = ''
	local height = '120'
	local prependarg = '[[File:'
	local apprendarg = '|center|frameless|' .. 'x' .. height .. 'px]]'
	
	for key,value in pairs(args) do
	    	filearg = filearg .. '<td>' .. prependarg .. args[key] .. apprendarg .. '</td>'
	end
	
	root = mw.html.create('table')
	root
		:addClass('gallerytable')
		:tag('tr')
			:wikitext( filearg )
	
	return tostring(root)
end

return p
我们为您提供服务需要使用Cookie。使用我们的服务即表示您同意我们使用Cookie。