Module:qlu-nouns: Difference between revisions
Lëtzelúcia (talk | contribs) No edit summary |
Lëtzelúcia (talk | contribs) No edit summary |
||
| Line 143: | Line 143: | ||
table.insert(out, '<table class="inflection-table" style="border-collapse:collapse; width:40%; font-size:90%;">') | table.insert(out, '<table class="inflection-table" style="border-collapse:collapse; width:40%; font-size:90%;">') | ||
-- Header row | -- Header row (without thead) | ||
table.insert(out, " | table.insert(out, "<tr>") | ||
table.insert(out, cell("", true, "background:#444; color:#fff; padding:4px;")) | table.insert(out, cell("", true, "background:#444; color:#fff; padding:4px;")) | ||
table.insert(out, cell("singular", true, "background:#444; color:#fff; padding:4px;")) | table.insert(out, cell("singular", true, "background:#444; color:#fff; padding:4px;")) | ||
table.insert(out, cell("plural", true, "background:#444; color:#fff; padding:4px;")) | table.insert(out, cell("plural", true, "background:#444; color:#fff; padding:4px;")) | ||
table.insert(out, "</tr | table.insert(out, "</tr>") | ||
-- Body rows | -- Body rows (without tbody) | ||
for _, row in ipairs(rows) do | for _, row in ipairs(rows) do | ||
table.insert(out, "<tr>") | table.insert(out, "<tr>") | ||
table.insert(out, cell(row.label, false, "background:#ddd; padding:4px; font-weight:bold; white-space:nowrap;")) | table.insert(out, cell(row.label, false, "background:#ddd; padding:4px; font-weight:bold; white-space:nowrap;")) | ||
table.insert(out, cell(row.sg, false, "background:#fff; padding:4px; text-align:center;")) | table.insert(out, cell(row.sg, false, "background:#fff; padding:4px; text-align:center;")) | ||
table.insert(out, cell(row.pl, false, "background:#fff; padding:4px; text-align:center;")) | table.insert(out, cell(row.pl, false, "background:#fff; padding:4px; text-align:center;")) | ||
table.insert(out, "</tr>") | table.insert(out, "</tr>") | ||
end | end | ||
table.insert(out, "</table>") | table.insert(out, "</table>") | ||
if data.footnotes and data.footnotes ~= "" then | if data.footnotes and data.footnotes ~= "" then | ||
table.insert(out, '<div class="footnotes" style="font-size:80%; margin-top:0.5em;">' .. data.footnotes .. "</div>") | table.insert(out, '<div class="footnotes" style="font-size:80%; margin-top:0.5em;">' .. data.footnotes .. "</div>") | ||
| Line 172: | Line 166: | ||
return table.concat(out, "\n") | return table.concat(out, "\n") | ||
end | end | ||
return export | return export | ||