size: 2 KiB

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html>
4<head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 <title>$(ldoc.title)</title>
7 <link rel="stylesheet" href="$(ldoc.css)" type="text/css" />
8</head>
9<body>
10
11<div id="container">
12
13<div id="product">
14 <div id="product_logo"></div>
15 <div id="product_name"><big><b></b></big></div>
16 <div id="product_description"></div>
17</div> <!-- id="product" -->
18
19<div id="main">
20
21# local iter = ldoc.modules.iter
22# local M = ldoc.markup
23
24<!-- Menu -->
25
26# local function no_spaces(s) return s:gsub('%s','_') end
27# local function use_li(ls)
28# if #ls > 1 then return '<li>','</li>' else return '','' end
29# end
30# local function display_name(item)
31# if item.type == 'function' then return item.name..'&nbsp;'..item.args
32# else return item.name end
33# end
34
35
36<div id="navigation">
37<h1>$(ldoc.project)</h1>
38# if not ldoc.single then
39<ul>
40 <li><a href="../index.html">Index</a></li>
41</ul>
42# else
43<p>$(M(ldoc.description))</p>
44# end
45
46# if module then
47<hr/>
48<ul>
49# for kind, items in module.kinds() do
50# for item in items() do
51 <li><a href="#$(item.name)">$(display_name(item))</a></li>
52# end
53# end
54</ul>
55# end
56
57</div>
58
59<div id="content">
60
61# if module then
62
63<h1>Module <code>$(module.name)</code></h1>
64
65<p>$(M(module.summary))</p>
66<p>$(M(module.description))</p>
67
68<br/>
69<br/>
70
71# --- currently works for both Functions and Tables. The params field either contains
72# --- function parameters or table fields.
73# for kind, items in module.kinds() do
74 <dl class="function">
75# for item in items() do
76 <dt>
77 <a name = "$(item.name)"></a>
78 <strong>$(display_name(item))</strong>
79 </dt>
80 <dd>
81 $(M(item.summary))
82 $(M(item.description))
83
84# if item.usage then
85# local li,il = use_li(item.usage)
86 <h3>Usage:</h3>
87 <ul>
88# for usage in iter(item.usage) do
89 $(li)<pre class="example">$(usage)</pre>$(il)
90# end -- for
91 </ul>
92# end -- if usage
93
94# if item.see then
95# local li,il = use_li(item.see)
96 <h3>see also:</h3>
97 <ul>
98# for see in iter(item.see) do
99 $(li)<a href="$(see.mod).html#$(see.name)">$(see.label)</a>$(il)
100# end -- for
101 </ul>
102# end -- if see
103</dd>
104# end -- for items
105</dl>
106# end -- for kinds
107
108# else -- if module
109
110# if ldoc.description then
111 <p>$(M(ldoc.description))</p>
112# end
113
114# for kind, mods in ldoc.kinds() do
115<h2>$(kind)</h2>
116# kind = kind:lower()
117# for m in mods() do
118<table class="module_list">
119 <tr>
120 <td class="name"><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
121 <td class="summary">$(M(m.summary))</td>
122 </tr>
123# end -- for modules
124</table>
125# end -- for kinds
126# end -- if module
127
128</div> <!-- id="content" -->
129</div> <!-- id="main" -->
130<div id="about">
131</div> <!-- id="about" -->
132</div> <!-- id="container" -->
133</body>
134</html>
135