6,571
个编辑
(// Edit via Wikiplus) |
无编辑摘要 |
||
第18行: | 第18行: | ||
return cc, id, data | return cc, id, data | ||
end | end | ||
function p.main() | function p.main() | ||
local datas = {} | local datas = {} | ||
第50行: | 第51行: | ||
end | end | ||
table.insert(rowData, { | table.insert(rowData, { | ||
data = {title, id, ({' | data = {name = title, id = id, diff = ({'pst', 'prs', 'ftr', 'byd', 'etr'})[rc], link = link, CC = sCc}, | ||
sort = {nCc, rc, date} | sort = {nCc, rc, date} | ||
}) | }) | ||
第61行: | 第62行: | ||
local text = mw.html.create 'div':addClass 'notaninfobox dstable' | local text = mw.html.create 'div':addClass 'notaninfobox dstable' | ||
for _, rowId, rowData in itData, datas do | for _, rowId, rowData in itData, datas do | ||
if rowId==divide_str then rowId=(' | if rowId==divide_str then rowId=('%s+'):format(divide_str) end | ||
text = text | text = text | ||
:tag 'div':addClass 'ds':wikitext(rowId):done() | -- :tag 'div':addClass 'ds':wikitext(rowId):done() | ||
:tag 'div':addClass 'number' | -- :tag 'div':addClass 'number' | ||
:wikitext(frame:expandTemplate {title = '组排列', args = {height = 'auto'}}) | :wikitext(frame:expandTemplate {title = '组排列', args = {height = 'auto'}}) | ||
:wikitext(frame:expandTemplate {title = 'User:Star0/Sandbox/CCgrade', args = {grade = rowId}}) | |||
table.sort(rowData, function(a, b) | table.sort(rowData, function(a, b) | ||
a, b = a.sort, b.sort | a, b = a.sort, b.sort | ||
第73行: | 第75行: | ||
end) | end) | ||
for _, rowItem in ipairs(rowData) do | for _, rowItem in ipairs(rowData) do | ||
text:wikitext(frame:expandTemplate {title = ' | text:wikitext(frame:expandTemplate {title = 'User:Star0/Sandbox/CCelement', args = rowItem.data}) | ||
end | end | ||
text = text:wikitext(frame:expandTemplate {title = '组排列-end'}):done() | text = text:wikitext(frame:expandTemplate {title = '组排列-end'}):done() |