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() |