2011-08-22 12:54:32 +02:00
|
|
|
return [==[
|
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>
|
2011-07-11 09:29:37 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
2011-06-06 18:35:23 +02:00
|
|
|
<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" -->
|
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
<div id="main">
|
|
|
|
|
2011-07-12 14:14:55 +02:00
|
|
|
# local no_spaces = ldoc.no_spaces
|
|
|
|
# local use_li = ldoc.use_li
|
|
|
|
# local display_name = ldoc.display_name
|
2011-06-06 18:35:23 +02:00
|
|
|
# local iter = ldoc.modules.iter
|
|
|
|
# local M = ldoc.markup
|
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
|
|
|
|
<div id="navigation">
|
2011-07-10 19:12:35 +02:00
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
<h1>$(ldoc.project)</h1>
|
2011-07-10 19:12:35 +02:00
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# if not ldoc.single then -- reference back to project index
|
2011-06-06 18:35:23 +02:00
|
|
|
<ul>
|
2011-07-03 18:22:45 +02:00
|
|
|
<li><a href="../$(ldoc.output).html">Index</a></li>
|
2011-06-06 18:35:23 +02:00
|
|
|
</ul>
|
|
|
|
# else
|
|
|
|
<p>$(ldoc.description)</p>
|
|
|
|
# end
|
|
|
|
|
2011-07-10 19:12:35 +02:00
|
|
|
# --------- contents of module -------------
|
|
|
|
# if module and not ldoc.no_summary and #module.items > 0 then
|
2011-06-06 18:35:23 +02:00
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
# for kind,items in module.kinds() do
|
|
|
|
<li><a href="#$(no_spaces(kind))">$(kind)</a></li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
2011-07-10 19:12:35 +02:00
|
|
|
# -------- contents of project ----------
|
2011-07-06 11:47:41 +02:00
|
|
|
# if not ldoc.no_summary then
|
2011-07-10 19:12:35 +02:00
|
|
|
# local this_mod = module and module.name
|
2011-06-06 18:35:23 +02:00
|
|
|
# for kind, mods, type in ldoc.kinds() do
|
2011-07-12 15:42:58 +02:00
|
|
|
# if not ldoc.kinds_allowed or ldoc.kinds_allowed[type] then
|
2011-06-06 18:35:23 +02:00
|
|
|
<h2>$(kind)</h2>
|
|
|
|
<ul>
|
2011-07-12 15:42:58 +02:00
|
|
|
# for mod in mods() do
|
|
|
|
# if mod.name == this_mod then -- highlight current module, link to others
|
2011-06-06 18:35:23 +02:00
|
|
|
<li><strong>$(mod.name)</strong></li>
|
2011-07-12 15:42:58 +02:00
|
|
|
# else
|
2011-07-11 15:40:44 +02:00
|
|
|
<li><a href="$(ldoc.ref_to_module(mod))">$(mod.name)</a></li>
|
2011-07-12 15:42:58 +02:00
|
|
|
# end
|
2011-07-10 19:12:35 +02:00
|
|
|
# end
|
2011-07-06 11:47:41 +02:00
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
#end
|
|
|
|
</ul>
|
2011-07-06 11:47:41 +02:00
|
|
|
# else
|
|
|
|
<ul>
|
|
|
|
# for kind, items in module.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
# for item in items() do
|
|
|
|
<li><a href="#$(item.name)">$(display_name(item))</a></li>
|
|
|
|
# end end
|
|
|
|
</ul>
|
|
|
|
#end
|
2011-06-06 18:35:23 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
2011-07-10 19:12:35 +02:00
|
|
|
#if module then
|
2011-07-12 14:14:55 +02:00
|
|
|
<h1>$(ldoc.titlecase(module.type)) <code>$(module.name)</code></h1>
|
2011-07-10 19:12:35 +02:00
|
|
|
# end
|
|
|
|
|
|
|
|
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
|
2011-07-06 15:24:05 +02:00
|
|
|
$(ldoc.body)
|
|
|
|
# elseif module then -- module documentation
|
2011-06-06 18:35:23 +02:00
|
|
|
<p>$(M(module.summary))</p>
|
|
|
|
<p>$(M(module.description))</p>
|
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
# if not ldoc.no_summary then
|
2011-06-06 18:35:23 +02:00
|
|
|
# -- 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">
|
2011-07-14 15:26:03 +02:00
|
|
|
# for item in items() do
|
2011-06-06 18:35:23 +02:00
|
|
|
<tr>
|
2011-07-14 15:26:03 +02:00
|
|
|
<td class="name" nowrap><a href="#$(item.name)">$(display_name(item))</a></td>
|
2011-06-06 18:35:23 +02:00
|
|
|
<td class="summary">$(M(item.summary))</td>
|
|
|
|
</tr>
|
|
|
|
# end -- for items
|
|
|
|
</table>
|
|
|
|
#end -- for kinds
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
#end -- if not no_summary
|
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
# --- currently works for both Functions and Tables. The params field either contains
|
|
|
|
# --- function parameters or table fields.
|
2011-07-06 15:24:05 +02:00
|
|
|
# local show_return = not ldoc.no_return_or_parms
|
|
|
|
# local show_parms = show_return
|
2011-06-06 18:35:23 +02:00
|
|
|
# for kind, items in module.kinds() do
|
|
|
|
<h2><a name="$(no_spaces(kind))"></a>$(kind)</h2>
|
2011-06-08 19:12:04 +02:00
|
|
|
$(M(module.kinds:get_section_description(kind)))
|
2011-06-06 18:35:23 +02:00
|
|
|
<dl class="function">
|
2011-07-06 15:24:05 +02:00
|
|
|
# for item in items() do ldoc.item = item -- provides context for M()
|
2011-06-06 18:35:23 +02:00
|
|
|
<dt>
|
|
|
|
<a name = "$(item.name)"></a>
|
|
|
|
<strong>$(display_name(item))</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2011-08-22 13:26:27 +02:00
|
|
|
$(M(item.summary..' '..(item.description or '')))
|
2011-06-06 18:35:23 +02:00
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# if show_parms and item.params and #item.params > 0 then
|
2011-06-06 18:35:23 +02:00
|
|
|
<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
|
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# if show_return and item.ret then
|
2011-06-06 18:35:23 +02:00
|
|
|
# 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
|
2011-07-05 18:19:49 +02:00
|
|
|
$(li)<a href="$(ldoc.href(see))">$(see.label)</a>$(il)
|
2011-06-06 18:35:23 +02:00
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if see
|
|
|
|
</dd>
|
|
|
|
# end -- for items
|
|
|
|
</dl>
|
|
|
|
# end -- for kinds
|
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# else -- if module; project-level contents
|
2011-06-06 18:35:23 +02:00
|
|
|
|
|
|
|
# if ldoc.description then
|
|
|
|
<p>$(M(ldoc.description))</p>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# for kind, mods in ldoc.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
# kind = kind:lower()
|
|
|
|
<table class="module_list">
|
2011-06-18 11:26:57 +02:00
|
|
|
# for m in mods() do
|
2011-06-06 18:35:23 +02:00
|
|
|
<tr>
|
2011-07-14 15:26:03 +02:00
|
|
|
<td class="name" nowrap><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
|
2011-06-06 18:35:23 +02:00
|
|
|
<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">
|
2011-07-06 15:24:05 +02:00
|
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 0.5</a></i>
|
2011-06-06 18:35:23 +02:00
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|
2011-08-22 12:54:32 +02:00
|
|
|
]==]
|
2011-06-06 18:35:23 +02:00
|
|
|
|