「Module:Songtable」:修訂間差異

增加 143 位元組 、​ 2021年8月10日 (星期二)
新版本调整
(修复第二曲名和添加ftr背景功能)
(新版本调整)
行 59: 行 59:
end
end


function getImage(id, all, pst, prs, ftr, byd, second, normalJacketArgs, bydJacketArgs, normalJacketData, bydJacketData, bydyes, type)
function getImage(id, all, pst, prs, ftr, byd, second, normalJacketArgs, bydJacketArgs, normalJacketData, bydJacketData, bydyes, mold, imageConfig)
    --谢邀,这写的什么东西我自己都看不懂了
    --谢邀,这写的什么东西我自己都看不懂了
    if not(id or all) then return nil end
    if not(id or all) then return nil end
行 66: 行 66:
    local tab1, tab2, tab3, part1, part2, part3, jacket1, jacket2
    local tab1, tab2, tab3, part1, part2, part3, jacket1, jacket2
    container:addClass('container')
    container:addClass('container')
    tab:attr('id', 'tab-'..type) tab:addClass('img-tab')
    tab:attr('id', 'tab-'..mold) tab:addClass('img-tab')


    local normalJacket, bydJacket
    local normalJacket, bydJacket
行 96: 行 96:


      part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText('画师')..normalJacket) part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText('画师')..normalJacket)
      part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText('画师')..normalJacket) part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText('画师')..normalJacket)
      part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type) part3:addClass('active tab-text-'..type)
      part1:addClass('tab-text-'..mold) part2:addClass('tab-text-'..mold) part3:addClass('active tab-text-'..mold)
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3))
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3))


行 102: 行 102:
    end
    end


    if byd
    if byd and imageConfig~='nobyd'
      then
      then
      tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
      tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
行 112: 行 112:


      part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText('画师')..tostring(bydJacket))
      part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText('画师')..tostring(bydJacket))
      part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
      part1:addClass('active tab-text-'..mold) part2:addClass('tab-text-'..mold)
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))


行 128: 行 128:


      part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText('画师')..normalJacket)
      part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText('画师')..normalJacket)
      part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
      part1:addClass('active tab-text-'..mold) part2:addClass('tab-text-'..mold)
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))


行 134: 行 134:
    end
    end


    if id and bydyes
    if id and bydyes and imageConfig~='nobyd'
      then
      then
      tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
      tab1, tab2, part1, part2 = mw.html.create('div'), mw.html.create('div'), mw.html.create('div'), mw.html.create('div')
行 144: 行 144:


      part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText('画师')..tostring(bydJacket))
      part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText('画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText('画师')..tostring(bydJacket))
      part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type)
      part1:addClass('active tab-text-'..mold) part2:addClass('tab-text-'..mold)
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))
      container:wikitext(tostring(part1)) container:wikitext(tostring(part2))


行 197: 行 197:
function p._main(args)
function p._main(args)


    local data, dataNs = getData.getMobile(args['曲名']), getData.getNS(args['曲名'])
    local data, dataNs = getData.getMobile(args['曲名'], args['id']), getData.getNS(args['曲名'], args['id'])


    local byd
    local byd
行 233: 行 233:
    -- if args['曲名'] == 'Tempestissimo' then spanNs = {'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1'} end
    -- if args['曲名'] == 'Tempestissimo' then spanNs = {'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1', 'grid-column-start: span 1'} end


    local imageA = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'a')
    local imageA = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'a', args['图片显示控制'])
    local imageB = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'b')
    local imageB = getImage(data('id'), args['图片'], args['Past曲绘'], args['Present曲绘'], args['Future曲绘'], args['Beyond曲绘'], args['第二曲绘图片'], args['画师'], args['Beyond画师'], data('ftrJacketDesigner'), data('bydJacketDesigner'), byd, 'b', args['图片显示控制'])


    local infoList = {
    local infoList = {