2011-06-06 18:35:23 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>$(ldoc.title)</title>
|
|
|
|
<link rel="stylesheet" href="$(ldoc.css)" type="text/css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="container">
|
|
|
|
|
|
|
|
<div id="product">
|
|
|
|
<div id="product_logo"></div>
|
|
|
|
<div id="product_name"><big><b></b></big></div>
|
|
|
|
<div id="product_description"></div>
|
|
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
|
|
# local iter = ldoc.modules.iter
|
|
|
|
# local M = ldoc.markup
|
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
|
|
|
|
# local function no_spaces(s) return s:gsub('%s','_') end
|
|
|
|
|
|
|
|
<div id="navigation">
|
|
|
|
<h1>$(ldoc.project)</h1>
|
|
|
|
# if not ldoc.single then
|
|
|
|
<ul>
|
|
|
|
<li><a href="../index.html">Index</a></li>
|
|
|
|
</ul>
|
|
|
|
# else
|
|
|
|
<p>$(ldoc.description)</p>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# if module then
|
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
# for kind,items in module.kinds() do
|
|
|
|
<li><a href="#$(no_spaces(kind))">$(kind)</a></li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# for kind, mods, type in ldoc.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
<ul>
|
|
|
|
# local this_mod = module and module.name
|
|
|
|
# local base = ""
|
|
|
|
# kind = kind:lower()
|
|
|
|
# if module then
|
|
|
|
# if module.type ~= type then base = "../"..kind.."/" end
|
|
|
|
# else base = kind.."/"
|
|
|
|
# end
|
|
|
|
# for mod in mods() do
|
|
|
|
# if mod.name == this_mod then
|
|
|
|
<li><strong>$(mod.name)</strong></li>
|
|
|
|
# else
|
|
|
|
<li><a href="$(base..mod.name).html">$(mod.name)</a></li>
|
|
|
|
# end
|
|
|
|
#end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
# if module then
|
|
|
|
|
|
|
|
<h1>Module <code>$(module.name)</code></h1>
|
|
|
|
|
|
|
|
# local function use_li(ls)
|
|
|
|
# if #ls > 1 then return '<li>','</li>' else return '','' end
|
|
|
|
# end
|
|
|
|
# local function display_name(item)
|
|
|
|
# if item.type == 'function' then return item.name..' '..item.args
|
|
|
|
# else return item.name end
|
|
|
|
# end
|
|
|
|
|
|
|
|
<p>$(M(module.summary))</p>
|
|
|
|
<p>$(M(module.description))</p>
|
|
|
|
|
|
|
|
# -- bang out the tables of item types for this module (e.g Functions, Tables, etc)
|
|
|
|
# for kind,items in module.kinds() do
|
|
|
|
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
# for item in items() do
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#$(item.name)">$(display_name(item))</a></td>
|
|
|
|
<td class="summary">$(M(item.summary))</td>
|
|
|
|
</tr>
|
|
|
|
# end -- for items
|
|
|
|
</table>
|
|
|
|
#end -- for kinds
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
# --- currently works for both Functions and Tables. The params field either contains
|
|
|
|
# --- function parameters or table fields.
|
|
|
|
# for kind, items in module.kinds() do
|
|
|
|
<h2><a name="$(no_spaces(kind))"></a>$(kind)</h2>
|
|
|
|
<dl class="function">
|
|
|
|
# for item in items() do
|
|
|
|
<dt>
|
|
|
|
<a name = "$(item.name)"></a>
|
|
|
|
<strong>$(display_name(item))</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
$(M(item.summary))
|
|
|
|
$(M(item.description))
|
|
|
|
|
|
|
|
# if item.params and #item.params > 0 then
|
|
|
|
<h3>$(module.kinds:type_of(item).subnames):</h3>
|
|
|
|
<ul>
|
|
|
|
# for p in iter(item.params) do
|
|
|
|
<li><code><em>$(p)</em></code>: $(M(item.params[p]))</li>
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if params
|
|
|
|
|
|
|
|
# if item.usage then
|
|
|
|
# local li,il = use_li(item.usage)
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<ul>
|
|
|
|
# for usage in iter(item.usage) do
|
|
|
|
$(li)<pre class="example">$(usage)</pre>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if usage
|
|
|
|
|
|
|
|
# if item.ret then
|
|
|
|
# local li,il = use_li(item.ret)
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
# for r in iter(item.ret) do
|
|
|
|
$(li)$(M(r))$(il)
|
|
|
|
# end -- for
|
|
|
|
</ol>
|
|
|
|
# end -- if returns
|
|
|
|
|
|
|
|
# if item.see then
|
|
|
|
# local li,il = use_li(item.see)
|
|
|
|
<h3>see also:</h3>
|
|
|
|
<ul>
|
|
|
|
# for see in iter(item.see) do
|
|
|
|
$(li)<a href="$(see.mod).html#$(see.name)">$(see.label)</a>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if see
|
|
|
|
</dd>
|
|
|
|
# end -- for items
|
|
|
|
</dl>
|
|
|
|
# end -- for kinds
|
|
|
|
|
|
|
|
# else -- if module
|
|
|
|
|
|
|
|
# if ldoc.description then
|
|
|
|
<p>$(M(ldoc.description))</p>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# for kind, mods in ldoc.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
# kind = kind:lower()
|
|
|
|
# for m in mods() do
|
|
|
|
<table class="module_list">
|
|
|
|
<tr>
|
|
|
|
<td class="name"><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
|
|
|
|
<td class="summary">$(M(m.summary))</td>
|
|
|
|
</tr>
|
|
|
|
# end -- for modules
|
|
|
|
</table>
|
|
|
|
# end -- for kinds
|
|
|
|
# end -- if module
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|