-<h2 class="menu-title">LuCI UVLDoc</h2>
+<div class="menu-title">LuCI UVLDoc</div>
<ul class="menu-index">
<li<%-if not scheme then%> class="menu-active"<%-end-%>>
<a href="<%=self:_index_filename()%>">Index</a>
</li>
+</ul>
+
+<div class="menu-title">Schemes</div>
+<ul class="menu-index">
<% for k, v in luci.util.kspairs(self.schemes) do %>
<li<%-if scheme == k then%> class="menu-active"<%-end-%>>
<a href="<%=self:_scheme_filename(k)%>"><%=k%></a>
<%-if scheme == k then-%>
<ul>
<%-for k2, v2 in luci.util.kspairs(v.sections) do%>
- <li><a href="<%=self:_section_filename(k, k2)%>"><%=k2%></a></li>
+ <li<%-if k2 == section then%> class="menu-active"<%-end-%>><a href="<%=self:_section_filename(k, k2)%>"><%=k2%></a></li>
<%end-%>
</ul>
<%-end%>
+<%- title = scheme .. "." .. type -%>
<%+header.xml%>
<%
local table = require "table"
+types = {
+ list = "List",
+ variable = "Variable",
+ lazylist = "Mixed",
+ enum = "Enumerator",
+ reference = "Reference"
+}
+
+datatypes = {
+ boolean = "Boolean",
+ string = "String",
+ uint = "Unsigned Integer",
+ integer = "Integer",
+ float = "Real Number",
+ ipaddr = "IP-Address",
+ ip4addr = "IPv4-Address",
+ ip6addr = "IPv6-Address",
+ ip4prefix = "IPv4-Prefix",
+ ip6prefix = "IPv6-Prefix",
+ hostname = "Hostname",
+ host = "Host (Hostname or IP-Address)",
+ directory = "Filesystem path (to directory)",
+ file = "Filesystem path (to file)",
+ macaddr = "MAC-Address",
+ port = "Port",
+ portrange = "Single Port or Portrange (First-Last)"
+}
+
function _parse_ref( r )
local k, v, h = r:match("([^.]+)%.([^.]+)%.([^.]+)")
if not k then
end
%>
+<a name="top" />
<h1 class="section-title"><%=scheme-%>
-<%-if package.title then%>: <%=package.title%><%end%></h1>
+<%-if package.title then%><dfn> - <%=package.title%></dfn><%end%></h1>
<h2 class="section-subtitle"><%=type-%>
-<%-if section.title then%>: <%=section.title%><%end%></h2>
+<%-if section.title then%><dfn> - <%=section.title%></dfn><%end%></h2>
<div class="section-description"><%=section.description%></div>
<h3 class="section-attributes">Attributes:</h3>
local t = _parse_dep(k2, scheme, type)
%>
<% if nf then %>and<% end %>
- <%if t then%><a href="<%=t%>"><%end%><%=k2%><%if t then%></a><%end%><%if v~="" then%>=<%=v%><%end%>
+ <%if t then%><a href="<%=t%>"><%end%><%=k2%><%if t then%></a><%end%><%if v~=true then%>=<%=v%><%end%>
<% nf = true
end %>
</li>
</ul>
<% end %>
-<h3 class="section-variables">Options:</h3>
+<h3 class="section-variables">Overview:</h3>
<table class="section-variables-index">
<% for k, v in luci.util.kspairs(package.variables[type]) do
if v.required then%>
<tr class="section-variable-required">
- <td><a href="#variable.<%=k%>"><%=k%></a></td>
+ <th><a href="#variable.<%=k%>"><%=k%></a></th>
<td><%=v.title%></td>
</tr>
<% end end
for k, v in luci.util.kspairs(package.variables[type]) do
if not v.required then%>
<tr class="section-variable-mixed">
- <td><a href="#variable.<%=k%>"><%=k%></a></td>
+ <th><a href="#variable.<%=k%>"><%=k%></a></th>
<td><%=v.title%></td>
</tr>
<% end end %>
<div class="variable-documentation">
<a name="variable.<%=k%>" />
<h4 class="variable-title"><%=k-%>
- <%-if v.title then%>: <%=v.title%><%end%></h4>
+ <%-if v.title then%><dfn> - <%=v.title%></dfn><%end%></h4>
<div class="variable-description"><%=v.description%></div>
+ <div class="variable-declaration">
<h5 class="variable-attributes">Attributes:</h5>
<ul class="varaible-attributes-index">
<% if v.required then %>
<li class="variable-attribute-required"><strong>required</strong></li>
<% end %>
- <li class="variable-attribute-type"><strong>Type:</strong> <%=v.type%></li>
- <li class="variable-attribute-datatype"><strong>Datatype:</strong> <%=v.datatype%></li>
+ <li class="variable-attribute-type"><strong>Type:</strong> <%=types[v.type] or v.type%></li>
+ <li class="variable-attribute-datatype"><strong>Datatype:</strong> <%=datatypes[v.datatype] or v.datatype%></li>
+ <% if v.multival then %>
+ <li class="variable-attribute-multiple"><strong>multiple values:</strong> space-separated</li>
+ <% end %>
</ul>
<% if v.depends then %>
<h5 class="variable-depends">Dependencies (one of):</h5>
local t = _parse_dep(k2, scheme, type, k)
%>
<% if nf then %>and<% end %>
- <%if t then%><a href="<%=t%>"><%end%><%=k2%><%if t then%></a><%end%><%if v~="" then%>=<%=v%><%end%>
+ <%if t then%><a href="<%=t%>"><%end%><%=k2%><%if t then%></a><%end%><%if v~=true then%>=<%=v%><%end%>
<% nf = true
end %>
</li>
<% end %>
</ul>
<% end %>
+ </div>
+ <a href="#top">⇑</a>
</div>
<% end end end -%>
<%+footer.xml%>
\ No newline at end of file
--- /dev/null
+body {
+ font-family: sans-serif;
+ font-size: 0.85em;
+ color: #101010;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ margin-top: 0;
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 1.5em;
+}
+
+h2 {
+ font-size: 1.4em;
+}
+
+h3 {
+ font-size: 1.2em;
+}
+
+h4 {
+ font-size: 1.1em;
+}
+
+h5 {
+ font-size: 1.0em;
+}
+
+dfn {
+ font-weight: normal;
+ font-size: 0.9em;
+}
+
+table {
+ border-collapse: collapse;
+}
+
+tr, td, th {
+ border: 1px solid #e0e0ff;
+ padding: 3px;
+}
+
+th {
+ background-color: #f0f0ff;
+ text-align: left;
+}
+
+
+hr {
+ border: none;
+ background-color: #cccccc;
+ height: 1px;
+}
+
+ul, li {
+ margin-top: 0;
+}
+
+div.clear {
+ clear: both;
+}
+
+div.variable-declaration {
+ padding-left: 2em;
+}
+
+h3.section-variables {
+ margin-top: 2em;
+}
+
+div#menu {
+ float: left;
+ background-color: #f0f0ff;
+ margin: 0;
+ padding: 0;
+ border: 1px solid #e0e0ff;
+ width: 11.5em;
+}
+
+#menu ul {
+ list-style-type: none;
+ margin-bottom: 0.5em;
+ padding-left: 1em;
+}
+#menu ul li {
+ margin-left: 0;
+
+}
+
+div.menu-title {
+ background-color: #e0e0ff;
+ color: #000000;
+ font-weight: bold;
+ padding: 2px;
+}
+
+div#content {
+ margin-top: 0;
+ padding-top: 0;
+ margin-left: 12.5em;
+}
+
+div#copy {
+ margin-top: 2.5em;
+ font-size: 0.7em;
+ text-align: center;
+ font-size: bold;
+}
+
+a:link {
+ font-weight: bold;
+ color: #004080;
+ text-decoration: none;
+}
+
+a:visited {
+ font-weight:bold;
+ color: #006699;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration:underline;
+}