2019-01-04 14:19:21 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2019-01-04 14:25:36 +01:00
# local title = module and ldoc.module_typename(module).." "..module.name.." - "..ldoc.title or ldoc.title
2019-01-04 14:19:21 +01:00
<html>
<head>
2019-01-04 14:25:36 +01:00
<meta http-equiv="Content-Type" content="text/html; charset=$(ldoc.doc_charset)"/>
<title>$(title)</title>
2019-01-04 14:19:21 +01:00
<link rel="stylesheet" href="$(ldoc.css)" type="text/css" />
# if ldoc.custom_css then -- add custom CSS file if configured.
<link rel="stylesheet" href="$(ldoc.custom_css)" type="text/css" />
# end
2019-11-25 05:59:27 +01:00
<script>
function show_extra(id) {
2019-11-28 09:04:26 +01:00
var cur = document.getElementById("item"+id).className
2019-11-25 05:59:27 +01:00
2019-11-28 09:04:26 +01:00
if (cur == "hide_extra") {
document.getElementById("item"+id).className = "show_more"
document.getElementById("button"+id).className = "hide_extra"
}
2019-11-25 05:59:27 +01:00
}
</script>
2019-01-04 14:19:21 +01:00
</head>
<body>
<div id="container">
<div id="main">
# local no_spaces = ldoc.no_spaces
# local use_li = ldoc.use_li
# local display_name = ldoc.display_name
# local iter = ldoc.modules.iter
2021-12-13 23:19:15 +01:00
# local function un_cmake(s) return s:gsub(";", ";"):gsub(""", '"'):gsub('&#34', '"') end
2021-09-12 03:59:46 +02:00
# local function M(txt,item) return ldoc.markup(txt and un_cmake(txt) or nil,item,ldoc.plain) end
2019-01-04 14:19:21 +01:00
# local nowrap = ldoc.wrap and '' or 'nowrap'
2019-06-28 15:34:32 +02:00
# local html_space = function(s) return s:gsub(" ", "%%20") end
2019-07-09 22:28:42 +02:00
# local no_underscores = function(s) return s:gsub("_", " ") end
2021-12-14 21:14:32 +01:00
# local get_item = function(mod, name) for item in iter(mod.items) do if item.name == name then return item end end; return name == "" and mod or nil end
2019-01-04 14:19:21 +01:00
2021-12-21 06:54:15 +01:00
# -- Poke a hole to allow config.ld code to have a global initialization.
# for m in iter(ldoc.modules) do
# if #m.items > 0 then
# display_name(m.items[1])
# m.items[1].global_init(ldoc)
# break
# end
# end
2021-03-14 15:40:48 +01:00
# --------- modules hierarchy -------------
# local hierarchy = {}
# local curr = module
# while curr do
# hierarchy[#hierarchy + 1] = curr
# -- no need to do anything more if there is no explicite @supermodule
# if not curr.tags.supermodule then break end
# local super = curr.tags.supermodule[1] -- only consider one way inheritance
# local found = false
# for kind, mods, type in ldoc.kinds() do
# for mod in mods() do
# local name = display_name(mod)
# if name == super then
# curr = mod
# found = true
# end
# if found then break end
# end
# if found then break end
# end
# if not found then curr = nil end
# end
2021-03-15 18:32:47 +01:00
# --------- merge modules content with supermodules -------------
# local all_module_kinds = {}
# if module then
# for kind,items in module.kinds() do
# local myitems = {}
# for item in items() do
2021-03-28 18:19:08 +02:00
# myitems[#myitems + 1] = item
2021-12-21 06:54:15 +01:00
# end
2021-03-15 18:32:47 +01:00
# all_module_kinds[#all_module_kinds + 1] = { kind = kind, items = myitems }
# end
# local filtered_kinds = { "Constructors", "Static module functions",
# "Functions", "Methods", "lib.gears.object.properties Functions" }
# for supermodule in iter(hierarchy) do
# for kind,items in supermodule.kinds() do
# local ignored = false
# for _,filtered in ldoc.pairs(filtered_kinds) do
# if kind == filtered then
# ignored = true
# break
# end
# end
# if not ignored then
# local curr_kind = nil
# for k in iter(all_module_kinds) do
# if k.kind == kind then
# curr_kind = k
# break
# end
# end
# if not curr_kind then
# curr_kind = { kind = kind, items = {} }
# all_module_kinds[#all_module_kinds + 1] = curr_kind
# end
# for item in items() do
# local tobeadded = true
# for i in iter(curr_kind.items) do
2021-03-27 20:05:52 +01:00
# if item.name == i.name then
2021-03-15 18:32:47 +01:00
# tobeadded = false
# break
# end
# end
# if tobeadded then
# item.inherited = true -- force inherited status
# curr_kind.items[#curr_kind.items + 1] = item
# end
# end
# end
# end
# end
# end
2019-01-04 14:19:21 +01:00
<!-- Menu -->
<div id="navigation">
<h1>$(ldoc.project)</h1>
# if not ldoc.single and module then -- reference back to project index
<ul>
<li><a href="../$(ldoc.output).html">Index</a></li>
</ul>
# end
# --------- contents of module -------------
# if module and not ldoc.no_summary and #module.items > 0 then
<h2>Contents</h2>
<ul>
2021-03-15 18:32:47 +01:00
# for k in iter(all_module_kinds) do
# local kind = k.kind
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
2019-01-04 14:19:21 +01:00
<li><a href="#$(no_spaces(kind))">$(kind)</a></li>
# end
2019-10-27 20:39:23 +01:00
# end
2019-01-04 14:19:21 +01:00
</ul>
# end
# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side
# for kind, items in module.kinds() do
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
2021-12-17 22:34:49 +01:00
<h2>$(kind)</h2>
2019-01-04 14:19:21 +01:00
<ul class="nowrap">
2019-10-27 20:39:23 +01:00
# end
2019-01-04 14:19:21 +01:00
# for item in items() do
<li><a href="#$(item.name)">$(display_name(item))</a></li>
# end
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
2019-01-04 14:19:21 +01:00
</ul>
# end
# end
2019-10-27 20:39:23 +01:00
# end
2019-01-04 14:19:21 +01:00
# -------- contents of project ----------
# local this_mod = module and module.name
# for kind, mods, type in ldoc.kinds() do
# if ldoc.allowed_in_contents(type,module) then
2019-07-09 22:28:42 +02:00
<h2>$(no_underscores(kind))</h2>
2019-01-04 14:19:21 +01:00
<ul class="$(kind=='Topics' and '' or 'nowrap')">
# for mod in mods() do local name = display_name(mod)
# if mod.name == this_mod then
<li><strong>$(name)</strong></li>
# else
<li><a href="$(ldoc.ref_to_module(mod))">$(name)</a></li>
# end
# end
# end
</ul>
# end
</div>
<div id="content">
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
2021-12-13 23:19:15 +01:00
$(un_cmake(ldoc.body))
2019-01-04 14:19:21 +01:00
# elseif module then -- module documentation
2019-06-08 01:20:48 +02:00
<h1>Module: <code>$(module.name)</code></h1>
2019-01-04 14:19:21 +01:00
<p>$(M(module.summary,module))</p>
<p>$(M(module.description,module))</p>
2021-03-29 09:40:16 +02:00
# if module.usage then
# local li,il = use_li(module.usage)
<h3>Usage:</h3>
<ul>
# for usage in iter(module.usage) do
2021-09-12 03:59:46 +02:00
$(li)<pre class="example">$(ldoc.escape(un_cmake(usage)))</pre>$(il)
2021-03-29 09:40:16 +02:00
# end -- for
</ul>
# end -- if usage
2021-04-05 18:42:15 +02:00
<div class="extra-header">
# if module.tags.supermodule then
2021-03-29 09:40:16 +02:00
<div class="extra-header__section">
2021-03-14 15:40:48 +01:00
<h3>Class Hierarchy</h3>
<div class="inheritance">
# local function draw_hierary_recursifly(i)
2021-03-29 09:40:16 +02:00
# local is_root_level = (i == #hierarchy)
<ul class="inheritance__level $(is_root_level and 'inheritance__level--root' or '')">
<li class="inheritance__level__node $(is_root_level and 'inheritance__level__node--root' or '')">
2021-03-14 15:40:48 +01:00
# local mod = hierarchy[i]
# local name = display_name(hierarchy[i])
# if mod == module then
<strong>$(name)</strong>
# else
<a href="$(ldoc.ref_to_module(mod))">$(name)</a>
# end
</li>
# if i > 1 then
<li>
# draw_hierary_recursifly(i - 1)
</li>
# end
</ul>
2021-04-05 18:42:15 +02:00
# end -- function draw_hierary_recursifly
2021-03-14 15:40:48 +01:00
# draw_hierary_recursifly(#hierarchy)
</div>
2021-04-05 18:42:15 +02:00
</div>
# end -- module.tags.supermodule
2021-03-14 15:40:48 +01:00
2019-01-04 14:19:21 +01:00
# if module.tags.include then
$(M(ldoc.include_file(module.tags.include)))
# end
2021-04-05 18:42:15 +02:00
2021-03-29 09:40:16 +02:00
# if module.info then
<div class="extra-header__section">
<h3>Info:</h3>
<ul>
# for tag, value in module.info:iter() do
2021-06-12 17:49:42 +02:00
# if tag == 'Author' then
<li>
<strong>Originally authored by</strong>: $(M(value,module))<br />
<small>(Full contributors list available on
<a href="https://github.com/awesomeWM/awesome/graphs/contributors">
our github project)
</a></small>
</li>
# else
<li><strong>$(tag)</strong>: $(M(value,module))</li>
# end
2021-03-29 09:40:16 +02:00
# end
</ul>
</div>
# end -- if module.info
2021-04-05 18:42:15 +02:00
2019-01-04 14:19:21 +01:00
# if module.see then
2021-03-29 09:40:16 +02:00
<div class="extra-header__section">
2019-01-04 14:19:21 +01:00
# local li,il = use_li(module.see)
2021-04-05 18:42:15 +02:00
# local list_or_p =(#module.see > 1) and 'ul' or 'p'
2019-01-04 14:19:21 +01:00
<h3>See also:</h3>
2021-04-05 18:42:15 +02:00
<$(list_or_p)>
2019-01-04 14:19:21 +01:00
# for see in iter(module.see) do
2022-07-17 10:26:11 +02:00
$(li)<a href="$(ldoc.href(see))">$(see.label)</a>$(il)
2019-01-04 14:19:21 +01:00
# end -- for
2021-04-05 18:42:15 +02:00
</$(list_or_p)>
2021-03-29 09:40:16 +02:00
</div>
2021-04-05 18:42:15 +02:00
# end -- if module.see
2021-03-29 09:40:16 +02:00
</div>
2019-01-04 14:19:21 +01:00
# if not ldoc.no_summary then
# -- bang out the tables of item types for this module (e.g Functions, Tables, etc)
2019-10-27 20:39:23 +01:00
# local last_kind = ""
2021-03-15 18:32:47 +01:00
# for k in iter(all_module_kinds) do
# local kind = k.kind
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
# if last_kind ~= "" then
</table>
# end
2019-01-04 14:19:21 +01:00
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
<table class="function_list">
2019-10-27 20:39:23 +01:00
# end
2021-03-28 18:19:08 +02:00
# for item in iter(k.items) do if not item.tags.hidden then
2019-06-08 04:53:36 +02:00
# local dn = display_name(item)
2021-03-28 18:47:56 +02:00
# local inherited = (item.baseclass ~= module.name)
2019-06-08 04:53:36 +02:00
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
2021-12-13 20:33:19 +01:00
<tr class="summary_row">
2020-03-01 03:16:11 +01:00
# if item.display_type and not item.compact_signature then
2019-07-09 23:00:20 +02:00
<td class="shortname" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
<td class="summarytype" nowrap>$(item.display_type)</td>
2019-06-08 04:53:36 +02:00
# else
2020-03-01 03:16:11 +01:00
<td class="name" $(nowrap)>
<a href="#$(item.name)">$(dn)</a>
# if item.display_type and item.compact_signature then
<span class="summarytype">$(item.display_type)</span>
# end
</td>
2019-06-08 04:53:36 +02:00
# end
2021-12-13 20:04:32 +01:00
<td class="summary">
2021-10-27 00:27:41 +02:00
$(M(item.summary,item))
2021-12-13 20:04:32 +01:00
</td>
<td class="baseclass" nowrap>
# if item.tags.is_deprecated then
<span class="chips">Deprecated</span>
# end
2021-10-27 00:27:41 +02:00
# if item.tags.readonly then
2021-12-13 20:04:32 +01:00
<span class="chips">Read only</span>
2021-10-27 00:27:41 +02:00
# end
2021-03-27 15:42:20 +01:00
# if inherited then
2021-12-13 20:04:32 +01:00
<span class="chips">Inherited from $(item.baseclass)</span>
2019-11-23 13:58:47 +01:00
# end
2021-12-13 20:04:32 +01:00
</td>
2019-07-09 23:00:20 +02:00
</tr>
2021-03-28 18:19:08 +02:00
# end end -- for items
2019-10-27 20:39:23 +01:00
# last_kind = kind
2019-01-04 14:19:21 +01:00
#end -- for kinds
2019-10-27 20:39:23 +01:00
</table>
2019-01-04 14:19:21 +01:00
<br/>
<br/>
#end -- if not no_summary
# --- currently works for both Functions and Tables. The params field either contains
# --- function parameters or table fields.
# local show_return = not ldoc.no_return_or_parms
2019-10-27 20:39:23 +01:00
# local show_parms, last_kind = show_return, ""
2021-03-15 18:32:47 +01:00
# for k in iter(all_module_kinds) do
# local kind = k.kind
2019-01-04 14:19:21 +01:00
# local kitem = module.kinds:get_item(kind)
# local has_description = kitem and ldoc.descript(kitem) ~= ""
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
# if last_kind ~= "" then
</dl>
# end
2019-01-04 14:19:21 +01:00
<h2 class="section-header $(has_description and 'has-description')"><a name="$(no_spaces(kind))"></a>$(kind)</h2>
2019-10-27 20:39:23 +01:00
# end
2019-01-04 14:19:21 +01:00
$(M(module.kinds:get_section_description(kind),nil))
# if kitem then
# if has_description then
<div class="section-description">
$(M(ldoc.descript(kitem),kitem))
</div>
# end
# if kitem.usage then
<h3>Usage:</h3>
2021-09-12 03:59:46 +02:00
<pre class="example">$(ldoc.prettify(un_cmake(kitem.usage[1])))</pre>
2019-01-04 14:19:21 +01:00
# end
# end
2019-10-27 20:39:23 +01:00
# if not kind:match("^ldoc_skip") then
2019-01-04 14:19:21 +01:00
<dl class="function">
2019-10-27 20:39:23 +01:00
# end
2021-03-28 18:19:08 +02:00
# for item in iter(k.items) do if not item.tags.hidden then
2019-01-04 14:19:21 +01:00
<dt>
2022-01-02 17:12:38 +01:00
<a class="copy-link js-copy-link" name="$(item.name)" href="#$(item.name)">🔗</a>
2019-01-04 14:19:21 +01:00
<strong>$(display_name(item))</strong>
2019-11-23 13:58:47 +01:00
# if item.display_inheritance then
<span class="inheritance">
· Inherited from
<a href="$(item.display_inheritance)">$(item.display_inheritance)</a>
2019-11-28 09:04:26 +01:00
</span>
# end -- display_inheritance
2019-06-08 04:53:36 +02:00
# if item.display_type then
2020-03-01 03:08:42 +01:00
<span class="proptype">$(item.display_type)</span>
2019-06-08 04:53:36 +02:00
# end
2019-11-28 09:04:26 +01:00
<span class="baseclass" $(nowrap)>
2021-03-28 18:47:56 +02:00
# if item.baseclass ~= module.name then
2021-03-27 15:42:20 +01:00
· Inherited from $(M(item.baseclass, item))
2019-11-26 13:46:44 +01:00
# end
2019-11-28 09:04:26 +01:00
# if item.extra_summary then
# for _, col in ldoc.ipairs(item.extra_summary) do
2019-12-31 07:45:43 +01:00
· $((col.showcount and col.count.." " or "")..col.title)
2019-11-28 09:04:26 +01:00
# end -- summary col
# end -- summary
</span>
2019-01-04 14:19:21 +01:00
# if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then
<a style="float:right;" href="$(ldoc.source_ref(item))">line $(item.lineno)</a>
# end
</dt>
<dd>
$(M(ldoc.descript(item),item))
2022-07-17 10:26:11 +02:00
# if kind == "Object properties" and item.params[1] and #item.metadata > 0 then
2022-07-13 08:17:53 +02:00
<h3>Constraints:</h3>
2022-07-10 10:19:38 +02:00
<span class="property_type">
2022-07-13 08:17:53 +02:00
<table class="see_also">
2022-07-17 10:26:11 +02:00
# local current_level
# current_level = function(metadata, level)
# for _, metadata in ldoc.ipairs(metadata, level) do
<tr class="$(level>0 and "see_also_sublist" or "")">
<td style="padding-left:$(level*15)px;">
<i>
$(metadata.title)$(#(metadata.metadata or {}) > 0 and ":" or "")
</i>
# if metadata.datatype then
<span class="inline_types"> ($(metadata.datatype))</span>
# end
</td>
# if metadata.description and not metadata.description:match("^[\t\n ]*$") then
<td>: $(metadata.description)</td>
# end
<tr/>
# current_level(metadata.metadata, level + 1)
2022-07-13 08:17:53 +02:00
# end
2022-07-17 10:26:11 +02:00
# end --current_level
# current_level(item.metadata or {}, 0)
2022-07-13 08:17:53 +02:00
</table>
2022-07-10 10:19:38 +02:00
</span>
# elseif show_parms and item.params and #item.params > 0 and not item.hide_params then
2019-01-04 14:19:21 +01:00
# local subnames = module.kinds:type_of(item).subnames
# if subnames then
<h3>$(subnames):</h3>
# end
2021-12-17 22:34:49 +01:00
# local has_optional, has_named_call = false, false
# for parm in iter(item.params) do
# local param,sublist = item:subparam(parm)
# has_named_call = has_named_call or (sublist and item.is_named_call)
# for p in iter(param) do
# local def = item:default_of_param(p)
# has_optional = has_optional or (def and def ~= true)
# end
# end
# if has_named_call then
<div class="important_box">
<b>Note:</b> This $(item.kind) uses named parameters calling convention. It
means you call it with $(M('`{}`')) and omit the parantheses. For example,
calling this will all default argument would be <code>$(item.name){}</code>.
This is a Lua shortcut syntax equivalent to <code>$(item.name)({})</code>.
<code>args</code> is only a placeholder name for the "lone table argument"
used in named parameters calls.
</div>
# end
<table class="see_also">
<tr class="param_header">
<th>Name</th>
<th></th>
<th>Type(s)</th>
<th>Description</th>
# if has_optional then
<th>Default value</th>
# end
</tr>
2019-01-04 14:19:21 +01:00
# for parm in iter(item.params) do
# local param,sublist = item:subparam(parm)
# if sublist then
2021-12-17 22:34:49 +01:00
# local def = item:default_of_param(sublist)
<tr>
<td><span class="parameter">$(sublist)</span></td>
<td>$(def and '<span class="chips">Optional</span>' or '')</td>
<td><span class="types"><span class="type">table</span></span></td>
<td class="see_also_description">$(M(item.params.map[sublist],item)) </td>
# if has_optional then
# if def and def ~= true then
<td><span class="default_value"><code>$(def)</code></span></td>
# elseif def then
<td><span class="not_applicable">Undefined</span></td>
# else
<td><span class="not_applicable" title="This parameter is mandatory">Not applicable</span></td>
# end
# end
</tr>
2019-01-04 14:19:21 +01:00
# end
# for p in iter(param) do
# local name,tp,def = item:display_name_of(p), ldoc.typename(item:type_of_param(p)), item:default_of_param(p)
2021-12-17 22:34:49 +01:00
<tr$(sublist and ' class="see_also_sublist"' or '')>
<td><span class="parameter">$(name)</span></td>
<td>$(def and '<span class="chips">Optional</span>' or '')</td>
<td><span class="types">$(tp)</span></td>
<td class="see_also_description">$(M(item.params.map[p],item))</td>
# if has_optional then
# if def and def ~= true then
<td><span class="default_value"><code>$(def)</code></span></td>
# elseif def then
<td><span class="not_applicable">Undefined</span></td>
# else
<td><span class="not_applicable" title="This parameter is mandatory">Not applicable</span></td>
2019-01-04 14:19:21 +01:00
# end
2021-12-17 22:34:49 +01:00
# end
</tr>
2019-01-04 14:19:21 +01:00
# end
# end -- for
2021-12-17 22:34:49 +01:00
</table>
2019-01-04 14:19:21 +01:00
# end -- if params
# if show_return and item.retgroups then local groups = item.retgroups
<h3>Returns:</h3>
# for i,group in ldoc.ipairs(groups) do local li,il = use_li(group)
<ol>
# for r in group:iter() do local type, ctypes = item:return_type(r); local rt = ldoc.typename(type)
$(li)
# if rt ~= '' then
<span class="types">$(rt)</span>
# end
$(M(r.text,item))$(il)
# if ctypes then
<ul>
# for c in ctypes:iter() do
<li><span class="parameter">$(c.name)</span>
<span class="types">$(ldoc.typename(c.type))</span>
$(M(c.comment,item))</li>
# end
</ul>
# end -- if ctypes
# end -- for r
</ol>
# if i < #groups then
<h3>Or</h3>
# end
# end -- for group
# end -- if returns
# if show_return and item.raise then
<h3>Raises:</h3>
$(M(item.raise,item))
# end
# if item.see then
# local li,il = use_li(item.see)
<h3>See also:</h3>
2021-12-14 21:14:32 +01:00
<table class="see_also">
# for see in iter(item.see) do
# local see_item = see.mod and get_item(see.mod, see.name)
# local see_mod = (see_item and see.mod and see.mod ~= item.module and see.mod.name ~= see_item.name) and "("..see.mod.name..")" or ""
<tr>
<td><a href="$(ldoc.href(see))" title="In the $(see.mod and see.mod.name) module.">$(see.label)</a></td>
<td>$(see_item and M(see_item.summary)) $(see_mod)</td>
<td>
# if see_item or see.name == "" then
<span class="chips">$(see.name == "" and "module" or (see_item and see_item.kind))</span>
# end
</td>
<tr>
2019-01-04 14:19:21 +01:00
# end -- for
2021-12-14 21:14:32 +01:00
</table>
2019-01-04 14:19:21 +01:00
# end -- if see
# if item.usage then
# local li,il = use_li(item.usage)
<h3>Usage:</h3>
<ul>
# for usage in iter(item.usage) do
2021-09-12 03:59:46 +02:00
$(li)<pre class="example">$(ldoc.prettify(un_cmake(usage)))</pre>$(il)
2019-01-04 14:19:21 +01:00
# end -- for
</ul>
# end -- if usage
2019-12-31 07:45:43 +01:00
# if item.has_show_more then
2019-11-28 09:04:26 +01:00
<br />
<center id=button$(item.uid)>
<a class="show_more_button" onclick="show_extra('$(item.uid)')">
Click to display more
</a>
</center>
# end
2019-11-25 05:59:27 +01:00
<span id=item$(item.uid) class="hide_extra">
# if ldoc.custom_tags then
# for custom in iter(ldoc.custom_tags) do
# local tag = item.tags[custom[1]]
# if tag and not custom.hidden then
# local group_begin, group_end, row_type_begin, row_type_end, group_header = item.get_delim(custom[1])
<h3>$(custom.title or custom[1]):</h3>
<$(group_begin)>
# if group_header then
<tr style='font-weight: bold;'>
# for _, g in ldoc.ipairs(group_header) do
<th>$(g)</th>
# end -- for g
</tr>
# end -- if group_header then
# for value in iter(tag) do
<$(row_type_begin)>$(custom.format and custom.format(value, item, M) or M(value))</$(row_type_end)>
2021-12-21 06:54:15 +01:00
# local sub_values, sub_custom, extra_data = item.get_auto_params(custom[1], value)
2019-11-25 05:59:27 +01:00
# if sub_values then
<ul>
# for _, value in ldoc.ipairs(sub_values) do
<li>$(sub_custom.format(value, item, M))</li>
# end -- for auto_params
</ul>
# end -- if item.auto_params
2021-12-21 06:54:15 +01:00
# if extra_data.usage then
<br/>
<p>
<pre class="auto_genenerated_code">$(extra_data.usage)</pre>
# end -- extra_data.usage
2019-11-25 05:59:27 +01:00
# end -- for
</$(group_end)>
# end -- if tag
# end -- iter tags
# end -- ldoc.custom_tags
</span>
2019-11-24 09:59:38 +01:00
2019-01-04 14:19:21 +01:00
</dd>
2021-03-28 18:19:08 +02:00
# end end -- for items
2019-10-27 20:39:23 +01:00
# last_kind = kind
2019-01-04 14:19:21 +01:00
# end -- for kinds
2019-10-27 20:39:23 +01:00
</dl>
2019-01-04 14:19:21 +01:00
# else -- if module; project-level contents
# if ldoc.description then
<h2>$(M(ldoc.description,nil))</h2>
# end
# if ldoc.full_description then
<p>$(M(ldoc.full_description,nil))</p>
# end
# for kind, mods in ldoc.kinds() do
<h2>$(kind)</h2>
# kind = kind:lower()
<table class="module_list">
# for m in mods() do
2019-07-09 23:00:20 +02:00
<tr>
<td class="name" $(nowrap)><a href="$(html_space(kind))/$(m.name).html">$(m.name)</a></td>
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
</tr>
2019-01-04 14:19:21 +01:00
# end -- for modules
</table>
# end -- for kinds
# end -- if module
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc $(ldoc.version)</a></i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
2021-12-14 16:32:47 +01:00
<script defer type="text/javascript">
const $nav = document.querySelector("#navigation");
// When clicking the sidebar, open it
$nav.addEventListener("click", function(ev) {
if (document.body.clientWidth >= 768) {
return;
}
const target = $nav;
if (!target.classList.contains("open")) {
target.classList.add("open");
ev.stopPropagation();
}
});
// When clicking anywhere else than the sidebar, close it
document.querySelector("body").addEventListener("click", function(ev) {
if (document.body.clientWidth >= 768 || ev.target.contains($nav)) {
return;
}
const target = $nav;
if (target.classList.contains("open")) {
target.classList.remove("open");
}
});
2022-01-02 17:12:38 +01:00
const copyResultClasses = {
success : "copy-link--success",
failure: "copy-link--failure"
};
const removeCopyResultClasses = ($target) =>
Object.values(copyResultClasses).forEach(c => $target.classList.remove(c));
document.querySelectorAll(".js-copy-link").forEach(copyLink => {
copyLink.addEventListener("click", function(e) {
e.preventDefault();
const $target = e.target;
removeCopyResultClasses($target);
let link = $target.href;
if (!link) {
return;
}
if (link.startsWith("#")) {
const curr = window.location.pathname;
link = curr.substring(0, curr.indexOf("#")) + link;
}
// We need to create a fake element to copy the text from
const fakeElement = document.createElement("textarea");
fakeElement.value = link;
document.body.appendChild(fakeElement);
fakeElement.select();
let success = false;
try {
success = document.execCommand("copy");
} catch(err) {
success = false;
}
fakeElement.remove();
$target.classList.add(success ? copyResultClasses.success : copyResultClasses.failure);
setInterval(() => removeCopyResultClasses($target), 1500);
});
});
2021-12-14 16:32:47 +01:00
</script>
2019-01-04 14:19:21 +01:00
</body>
</html>