「モジュール:Tracklist」の版間の差分
提供: MONACA Wiki
その他の操作
今川 凌 (MONACA) (トーク | 投稿記録) 編集の要約なし タグ: 差し戻し済み |
今川 凌 (MONACA) (トーク | 投稿記録) 編集の要約なし タグ: 差し戻し済み |
||
| 241行目: | 241行目: | ||
for k, v in ipairs(trackA) do | for k, v in ipairs(trackA) do | ||
local color = (v[1] % 2 == 0) and '' or '' --偶数/奇数で別色指定 | local color = (v[1] % 2 == 0) and '' or '' --偶数/奇数で別色指定 | ||
result = result .. '<tr itemprop="track" itemscope itemtype="http://schema.org/MusicRecording" style="background-color:' .. color .. '; vertical-align:top;"><td style="padding-left:0.5em; text-align:right;"><span itemprop="position">' .. (v['#'] or v[1]) .. '</span>.</td><td>' .. (v.title and (' | result = result .. '<tr itemprop="track" itemscope itemtype="http://schema.org/MusicRecording" style="background-color:' .. color .. '; vertical-align:top;"><td style="padding-left:0.5em; text-align:right;"><span itemprop="position">' .. (v['#'] or v[1]) .. '</span>.</td><td>' .. (v.title and ('<span itemprop="name">' .. v.title .. '</span>') or 'タイトルなし') .. (v.note and ('<small>(' .. v.note .. ')</small>') or '') .. '</td>' .. writer(v) .. lyrics(v) .. music(v) .. arranger(v) .. extra(v) .. length(v) .. '</tr>' | ||
end | end | ||
else | else | ||
for k, v in ipairs(trackA) do | for k, v in ipairs(trackA) do | ||
local color = (v[1] % 2 == 0) and '' or '' | local color = (v[1] % 2 == 0) and '' or '' | ||
result = result .. '<tr style="background-color:' .. color .. '; vertical-align:top;"><td style="padding-left:0.5em; text-align:right;">' .. (v['#'] or v[1]) .. '.</td><td>' .. (v.title and (' | result = result .. '<tr style="background-color:' .. color .. '; vertical-align:top;"><td style="padding-left:0.5em; text-align:right;">' .. (v['#'] or v[1]) .. '.</td><td>' .. (v.title and ('' .. v.title .. '') or 'タイトルなし') .. (v.note and ('<small>(' .. v.note .. ')</small>') or '') .. '</td>' .. writer(v) .. lyrics(v) .. music(v) .. arranger(v) .. extra(v) .. length(v) .. '</tr>' | ||
end | end | ||
end | end | ||