Module:Gallery:修订间差异
跳到导航
跳到搜索
无编辑摘要
imported>=海豚= (创建页面,内容为“-- This module implements {{gallery}} local p = {} local templatestyles = 'Template:Gallery/styles.css' local function trim(s) return (mw.ustring.gsub(s, "^%s*(.…”) |
imported>Irukaza 无编辑摘要 |
||
| 第1行: | 第1行: | ||
local getArgs = require('Module:Arguments').getArgs | |||
local p = {} | local p = {} | ||
local root | |||
function p.main(frame) | |||
local args = getArgs(frame) | |||
local | return p._main(args) | ||
return | |||
end | end | ||
function p. | function p._main(args) | ||
local | local filearg = '' | ||
local height = '120' | |||
local prependarg = '[[File:' | |||
local apprendarg = '|center|frameless|' .. 'x' .. height .. 'px]]' | |||
local | |||
for key,value in pairs(args) do | |||
filearg = filearg .. '<td>' .. prependarg .. args[key] .. apprendarg .. '</td>' | |||
end | end | ||
root = mw.html.create('table') | |||
root | |||
:addClass('gallerytable') | |||
:tag('tr') | |||
:wikitext( filearg ) | |||
return tostring(root) | |||
return | |||
end | end | ||
return p | return p | ||