メニューを切り替える
Toggle preferences menu
個人設定を切り替える
ログインしていません
編集を行うと、IPアドレスが公開されます。

「モジュール:Tracklist」の版間の差分

提供: MONACA Wiki
編集の要約なし
タグ: 差し戻し済み
編集の要約なし
タグ: 差し戻し済み
83行目: 83行目:
end
end
credits.extra = args.extra_column
credits.extra1 = args.extra1_column
if credits.writing then
if credits.writing then
credits.lyrics, credits.music = false, false
credits.lyrics, credits.music = false, false
93行目: 93行目:
end
end


credits.extra2 = args.extra2_column
if credits.writing then
credits.lyrics, credits.music = false, false
if credits.writing ~= true then credits.arrangements = false end
end
if credits.music and credits.music ~= true then credits.arrangements = false end
collapsed = (args.collapsed == 'yes')
md = (args.microdata == 'no') and false or args.id
credits.extra3 = args.extra3_column
if credits.writing then
credits.lyrics, credits.music = false, false
if credits.writing ~= true then credits.arrangements = false end
end
if credits.music and credits.music ~= true then credits.arrangements = false end
collapsed = (args.collapsed == 'yes')
md = (args.microdata == 'no') and false or args.id
credits.extra4 = args.extra4_column
if credits.writing then
credits.lyrics, credits.music = false, false
if credits.writing ~= true then credits.arrangements = false end
end
if credits.music and credits.music ~= true then credits.arrangements = false end
collapsed = (args.collapsed == 'yes')
md = (args.microdata == 'no') and false or args.id


--[[
--[[
203行目: 229行目:
arranger = function(x) return '<td>' .. (x.arranger or all.arrangements and all.arrangements[2] or all.producing and all.producing[2]  or all.all and all.all[2] or '&nbsp;') .. '</td>' end
arranger = function(x) return '<td>' .. (x.arranger or all.arrangements and all.arrangements[2] or all.producing and all.producing[2]  or all.all and all.all[2] or '&nbsp;') .. '</td>' end
end
end
if credits.extra then
if credits.extra1 then
--extra列追加
--extra1列追加
result = result .. '<th scope="col" style="width:' .. (args.extra_width or width.credits) .. ';">' .. credits.extra .. '</th>'
result = result .. '<th scope="col" style="width:' .. (args.extra_width or width.credits) .. ';">' .. credits.extra1 .. '</th>'
--extraセル関数再定義
--extra1セル関数再定義
extra = function(x) return '<td>' .. (x.extra or '&nbsp;') .. '</td>' end
extra1 = function(x) return '<td>' .. (x.extra1 or '&nbsp;') .. '</td>' end
end
end
 
if credits.extra2 then
--extra2列追加
result = result .. '<th scope="col" style="width:' .. (args.extra_width or width.credits) .. ';">' .. credits.extra2 .. '</th>'
--extra2セル関数再定義
extra2 = function(x) return '<td>' .. (x.extra2 or '&nbsp;') .. '</td>' end
end
 
if credits.extra3 then
--extra3列追加
result = result .. '<th scope="col" style="width:' .. (args.extra_width or width.credits) .. ';">' .. credits.extra3 .. '</th>'
--extra3セル関数再定義
extra3 = function(x) return '<td>' .. (x.extra3 or '&nbsp;') .. '</td>' end
end
 
if credits.extra4 then
--extra4列追加
result = result .. '<th scope="col" style="width:' .. (args.extra_width or width.credits) .. ';">' .. credits.extra4 .. '</th>'
--extra4セル関数再定義
extra4 = function(x) return '<td>' .. (x.extra4 or '&nbsp;') .. '</td>' end
end
end
if credits.length then
if credits.length then
--時間列追加
--時間列追加
218行目: 266行目:
length = function(x) return '<td style="padding-right:0.5em; text-align:right; white-space:nowrap;">' .. (x.length and ('<time datetime="'.. string.gsub(x.length, '^(%d+):(%d+)$', 'PT%1M%2S') ..'">' .. x.length .. '</time>') or '&nbsp;') .. '</td>' end
length = function(x) return '<td style="padding-right:0.5em; text-align:right; white-space:nowrap;">' .. (x.length and ('<time datetime="'.. string.gsub(x.length, '^(%d+):(%d+)$', 'PT%1M%2S') ..'">' .. x.length .. '</time>') or '&nbsp;') .. '</td>' end
end
end
end
result = result .. '</tr>'
result = result .. '</tr>'
241行目: 288行目:
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 ('<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>'
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) ..  extra1(v) .. extra2(v) .. extra3(v) .. extra4(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 ('' .. 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>'
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) ..  extra1(v) .. extra2(v) .. extra3(v) .. extra4(v) .. length(v) .. '</tr>'
end
end
end
end