Module:Infobox: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
Line 18: Line 18:
local header = ''
local header = ''
if adjacent_links == nil then
if adjacent_links == nil then
header = header .. title
header = title .. '\n'
header = header .. '\n'
elseif #adjacent_links == 2 then
elseif #adjacent_links == 2 then
local prev_link = adjacent_links[1]
local prev_link = adjacent_links[1]
Line 26: Line 25:
.. '<table style="width: 100%; margin: 0;">\n'
.. '<table style="width: 100%; margin: 0;">\n'
.. '<tr>\n'
.. '<tr>\n'
.. '<td style="width: 15%; text-align: left; white-space: nowrap; font-size: 0.75em;">'  .. prev_link .. '</td>\n'
.. '<td style="width: 15%; text-align: left; white-space: nowrap; font-size: 0.75em;">'  .. (prev_link or "") .. '</td>\n'
.. '<td style="width: 70%; padding-left: 1em; padding-right: 1em; text-align: center;">' .. title    .. '</td>\n'
.. '<td style="width: 70%; padding-left: 1em; padding-right: 1em; text-align: center;">' .. (title    or "") .. '</td>\n'
.. '<td style="width: 15%; text-align: right; white-space: nowrap; font-size: 0.75em;">' .. next_link .. '</td>\n'
.. '<td style="width: 15%; text-align: right; white-space: nowrap; font-size: 0.75em;">' .. (next_link or "") .. '</td>\n'
.. '</tr>\n'
.. '</tr>\n'
.. '</table>'
.. '</table>'
Line 54: Line 53:
.. '</table>'
.. '</table>'
else
else
header = title
header = title .. "\n"
end
end