Module:Infobox ET: Difference between revisions

Plumtree (talk | contribs)
Omitting the fifth for EDF; octave added for non-EDOs
Plumtree (talk | contribs)
Links to the previous and the next entries
Line 53: Line 53:
end
end
local suffix = tuning:match('%d+(ed.+)')
local suffix = tuning:match('%d+(ed.+)')
local prev_one = ''
if size > 1 then
prev_one = '[[' .. (size - 1) .. suffix .. '|← ' .. (size - 1) .. suffix .. ']]'
end
local next_one = '[[' .. (size + 1) .. suffix .. '|' .. (size + 1) .. suffix .. ' →]]'
local step_size = i._backslash_ratio('1\\' .. tuning)
local step_size = i._backslash_ratio('1\\' .. tuning)
Line 146: Line 152:
end
end


local header = '<table style="width: 100%; margin: 0"><tr>'
.. '<td style="width: 15%; text-align: left; white-space: nowrap; font-size: smaller">'
.. prev_one
.. '</td>'
.. '<td style="width: 70%; padding-left: 1em; padding-right: 1em; text-align: center">'
.. frame.args['tuning']
.. '</td>'
.. '<td style="width: 15%; text-align: right; white-space: nowrap; font-size: smaller">'
.. next_one
.. '</td>'
.. '</tr></table>'
local s = '<div style="\n' ..
local s = '<div style="\n' ..
'border: 1px solid #999;\n' ..
'border: 1px solid #999;\n' ..
Line 157: Line 174:
'">\n' ..
'">\n' ..
'{| width="100%" style="border-collapse: collapse;"\n' ..
'{| width="100%" style="border-collapse: collapse;"\n' ..
'|+ style="font-weight: bold" | ' .. frame.args['tuning'] .. '\n'
'|+ style="font-weight: bold" | ' .. header .. '\n'
for i, entry in ipairs(infobox_data) do
for i, entry in ipairs(infobox_data) do
local caption = entry[1]
local caption = entry[1]