更多操作
无编辑摘要 |
无编辑摘要 |
||
第16行: | 第16行: | ||
..t[1] | ..t[1] | ||
..'</div>' | ..'</div>' | ||
..'<div class="quote-author">' | ..'<div class="quote-author">————' | ||
..t[2] | ..t[2] | ||
..'</div></div>' | ..'</div></div>' |
2025年3月31日 (一) 16:29的版本
此模块的文档可以在模块:GetMottos/doc创建
local getArgs = require('Module:Arguments').getArgs
local mottos = require('Module:GlobalVars').mottos
local stringUtil = require('Module:StringUtil')
local p = {}
function p.exec()
local index = math.random(#mottos)
return stringUtil.split(mottos[index], '@')
end
function p.getMottos(frame)
local t = p.exec()
-- local args = getArgs(frame)
return '<div class="home-quote"><div class="quote-content">'
..t[1]
..'</div>'
..'<div class="quote-author">————'
..t[2]
..'</div></div>'
end
return p