“模块:首页/日期”的版本间差异

添加130字节 、​ 2022年2月1日 (二) 12:10
无编辑摘要
 
(未显示同一用户的4个中间版本)
function p.main(frame)
local args = getArgs(frame, {removeBlanks = false})
local n = #args
if n % 5 >= 3 then
table.insert(args, '')
end
if n % 5 == 3 then
table.insert(args, '')
end
local text = '<div class="mainpage-news"><div class="mainpage-news-time">'
local hasTime = false
elseif i % 5 == 3 then
text = text..'('..v..')'
if nargs[i %+ 51] >== 3nil then
args[i + 1] = ''
end
elseif i % 5 == 4 and v ~= '' then
hasTime = true
text = text..' <span class="countdown-num">'..v..'</span>'
if nargs[i %+ 51] == 3nil then
args[i + 1] = ''
end
elseif i % 5 == 0 then
if hasTime then
if v = string.format(v,= '%02d') then
text = text..frame:expandTemplate{title = '0', args = {':'}}..'<span class="countdown-num">'..v..'</span>'
else
text = text..':<span class="countdown-num">'..string.format('%02d', v)..'</span>'
end
hasTime = false
end
16,874

个编辑