本模块用于展示主页的每日影片列表。如需让你上传的图片能够显示,请编辑对应的数据部分:随机展示的图片请参见Module:Featured picture list/randoms,特定日期展示的图片请参见Module:Featured picture list/dates。
Zismilk于2023年4月9日创作的同人作品
共有以下页面可以显示
- LIB:同人作品展示/Zismilk/毛球跃出漫画
- LIB:同人作品展示/Turchan2077/GTFO
- LIB:同人作品展示/某猫忆白/封印
- LIB:同人作品展示/Turchan2077/仰观宇宙之大 俯察品类之盛
- LIB:同人作品展示/轩貅骨纳/抬棺小能手
- LIB:同人作品展示/轩貅骨纳/远房亲戚
- LIB:同人作品展示/青宋夏弦/狗狗,你开花了!
- LIB:同人作品展示/轩貅骨纳/龙之合影
local randoms = mw.loadData 'Module:Featured picture list/randoms'
local dates = mw.loadData 'Module:Featured picture list/dates'
local p = {}
function p.main(frame)
local lang = mw.language.getContentLanguage()
local year = lang:formatDate('Y', nil, true)
local month = lang:formatDate('n', nil, true)
local day = lang:formatDate('j', nil, true)
if dates[year] and dates[year][month] and dates[year][month][day] then
return frame:preprocess(dates[year][month][day])
elseif dates['any'] and dates['any'][month] and dates['any'][month][day] then
return frame:preprocess(dates['any'][month][day])
end
local edits = mw.site.stats.edits
local title = randoms[edits % randoms.length + 1]
return frame:expandTemplate {title = title}
end
function p.list(frame)
local node = mw.html.create ''
node:wikitext '共有以下页面可以显示'
node:newline()
local ul = node:tag 'ul'
for _, v in ipairs(randoms) do
ul:tag 'li'
:wikitext('[[' .. v .. ']]')
end
local edits = mw.site.stats.edits
local title = randoms[edits % randoms.length + 1]
node:wikitext('当前显示的页面名称为:[[' ..title .. ']]')
return node
end
function p.listRandoms(frame)
local node = mw.html.create ''
node:wikitext '本站随机展示的图片中共有以下内容:'
local ol = mw.html.create 'ol'
for _, v in ipairs(randoms) do
local li = ol:tag 'li'
li:wikitext(string.format('[[%s]]([[Special:EditPage/%s|编辑]])', v, v))
li:newline()
local successes, result = pcall(frame.expandTemplate, frame, {title = v})
li:wikitext(result)
end
return ol
end
return p