* luci/contrib: implemented "@cstyle" tag in luadoc to tell whether a "module" is...
[project/luci.git] / contrib / luadoc / lua / luadoc / doclet / html / module.lp
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     <title>Reference</title>
6     <link rel="stylesheet" href="<%=luadoc.doclet.html.link('luadoc.css', 'modules/'..module_doc.name)%>" type="text/css" />
7         <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
8 </head>
9
10 <body>
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 <div id="navigation">
22 <%=luadoc.doclet.html.include("menu.lp", { doc=doc, module_doc=module_doc })%>
23 <% oop = ( module_doc.doc[1].cstyle == "instance" ) and true or false %>
24
25 </div><!-- id="navigation" -->
26
27 <div id="content">
28
29 <h1><%=( oop and "Object Instance" or "Class" )%> <code><%=module_doc.name%></code></h1>
30
31 <p><%=module_doc.description%></p>
32 <%if module_doc.author then%>
33 <p><b><%= #module_doc.author>1 and "Authors" or "Author" %>:</b>
34 <table class="authors_list">
35 <%for _, author in ipairs(module_doc.author) do%>
36         <tr><td class="name"><%= author %></td></tr>
37 <%end%>
38 </table>
39 </p>
40 <%end%>
41 <%if module_doc.copyright then%>
42 <p>Copyright&copy; <%=module_doc.copyright%></p>
43 <%end%>
44 <%if module_doc.release then%>
45 <p><small><b>Release:</b> <%=module_doc.release%></small></p>
46 <%end%>
47
48 <%if #module_doc.functions > 0 then %>
49 <h2>Functions</h2>
50 <table class="function_list">
51 <%for _, func_name in ipairs(module_doc.functions) do
52   local func_data = module_doc.functions[func_name]%>
53         <tr>
54         <td class="name" nowrap><%=func_data.private and "local " or ""%><a href="#<%=func_name%>"><%=(oop and func_name:gsub("%.",":") or func_name:gsub(".+%.",""))%></a>&nbsp;(<%=table.concat(module_doc.functions[func_name].param, ", ")%>)</td>
55         <td class="summary"><%=module_doc.functions[func_name].summary%></td>
56         </tr>
57 <%end%>
58 </table>
59 <%end%>
60
61
62 <%if #module_doc.tables > 0 then%>
63 <h2>Tables</h2>
64 <table class="table_list">
65 <%for _, tab_name in ipairs(module_doc.tables) do%>
66         <tr>
67         <td class="name" nowrap><a href="#<%=tab_name%>"><%=tab_name%></a></td>
68         <td class="summary"><%=module_doc.tables[tab_name].summary%></td>
69         </tr>
70 <%end%>
71 </table>
72 <%end%>
73
74
75 <br/>
76 <br/>
77
78
79 <%if #module_doc.functions > 0 then%>
80 <h2><a name="functions"></a>Functions</h2>
81 <dl class="function">
82 <%for _, func_name in ipairs(module_doc.functions) do%>
83 <%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name], oop=oop })%>
84 <%end%>
85 </dl>
86 <%end%>
87
88
89 <%if #module_doc.tables > 0 then%>
90 <h2><a name="tables"></a>Tables</h2>
91 <dl class="table">
92 <%for _, tab_name in ipairs(module_doc.tables) do%>
93 <%=luadoc.doclet.html.include("table.lp", { doc=doc, module_doc=module_doc, tab=module_doc.tables[tab_name] })%>
94 <%end%>
95 </dl>
96 <%end%>
97
98
99 </div> <!-- id="content" -->
100
101 </div> <!-- id="main" -->
102
103 <div id="about">
104         <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
105 </div> <!-- id="about" -->
106
107 </div> <!-- id="container" -->
108 </body>
109 </html>