Changes

Jump to navigation Jump to search
add footer/header methods
Line 20: Line 20:  
--## Public functions
 
--## Public functions
 
--##########
 
--##########
 +
-- Start a SMAPI compatibility table.
 +
-- @test mw.log(p.header())
 +
function p.header()
 +
  local row = mw.html.create("tr")
 +
  row:node(mw.html.create("th"):wikitext("mod name"))
 +
  row:node(mw.html.create("th"):wikitext("author"))
 +
  row:node(mw.html.create("th"):wikitext("compatibility"))
 +
  row:node(mw.html.create("th"):wikitext("broke in"))
 +
  row:node(mw.html.create("th"):wikitext("source"))
 +
  row:node(mw.html.create("th"):wikitext(" "))
 +
 +
  return '<table class="wikitable plainlinks">' .. tostring(row)
 +
end
 +
 +
-- End a SMAPI compatibility table.
 +
-- @test mw.log(p.footer())
 +
function p.footer()
 +
  return '</table>'
 +
end
 +
 
--- Render a mod row in the SMAPI compatibility table.
 
--- Render a mod row in the SMAPI compatibility table.
 
-- @param frame The arguments passed to the script.
 
-- @param frame The arguments passed to the script.
translators
8,404

edits

Navigation menu