Module:rad-stem/templates: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
(Begun table formatting)
mNo edit summary
Line 62: Line 62:
local function add(code)
local function add(code)
table.insert(format_table, code)
table.insert(format_table, code)
end
local function th(data, rowspan, colspan)
add("<th")
if rowspan and rowspan~=1 then add(" rowspan=" .. rowspan) end
if colspan and colspan~=1 then add(" colspan=" .. colspan) end
add(">" .. data .. "</th>")
end
local function td(data, rowspan, colspan)
add("<td")
if rowspan and rowspan~=1 then add(" rowspan=" .. rowspan) end
if colspan and colspan~=1 then add(" colspan=" .. colspan) end
add(">" .. data .. "</td>")
end
end
Line 74: Line 88:
add("<table class=\"mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
add("<table class=\"mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
add("<tr>")
add("<tr>")
add("<th colspan=\"4\">Declension of <i>" .. stems.nom .. "</i> (" .. decl_type[stems['type']] .. ") &nbsp;</th>")
th("Declension of <i>" .. stems.nom .. "</i> (" .. decl_type[stems['type']] .. ") &nbsp", 1, 4)
add("</tr>")
add("</tr>")
add("</table>")
add("</table>")

Navigation menu