local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
local out = {}
local i = 1
while args['投影' .. i] do
local skin = args['投影' .. i]
local series = args['系列' .. i] or ''
local hasModel = args['模型' .. i] and true or false
local hasLive2D = args['Live2D' .. i] and true or false
local hasDynaIllus = args['动态立绘' .. i] and true or false
local desc = args['描述' .. i] or ''
local name = args['人形名']
table.insert(out, '<div class="Tab">')
table.insert(out, '<div class="TabLabelText pnc-neursoulPrvw"><div>')
table.insert(out, '<div class="pnc-neursoul-name">' .. skin .. '<div>' .. series .. '</div></div>')
table.insert(out, '<div>')
-- 标签
if hasModel then
table.insert(out, '<div class="pnc-neursoul-label" style="background:#00F2FE">模型</div>')
end
if hasLive2D then
table.insert(out, '<div class="pnc-neursoul-label" style="background:#F6BF00">Live2D</div>')
end
if hasDynaIllus then
table.insert(out, '<div class="pnc-neursoul-label" style="background:#F6BF00"><div style="transform:scale(.9)">动态立绘</div></div>')
end
table.insert(out, '</div></div></div>')
table.insert(out, '<div class="TabContentText pnc-neursoulFull">')
table.insert(out, '<div class="pnc-neursoul-img">')
local img = '云图计划-' .. name .. '-' .. (series ~= '' and series or skin) .. '.png'
table.insert(out, frame:callParserFunction('#ifexist', 'Media:' .. img, '[[File:' .. img .. '|500px]]', '<div>暂无图像,帮助[[Media:' .. img .. '|上传]]?</div>'))
table.insert(out, '</div>')
table.insert(out, '<div class="pnc-neursoul-intro">')
table.insert(out, frame:callParserFunction('#tag', 'poem', frame:expandTemplate{ title = '云图计划心智投影/描述', args = { series, desc } }))
table.insert(out, '</div></div></div>')
i = i + 1
end
return table.concat(out)
end
return p