103 lines
2.5 KiB
Plaintext
103 lines
2.5 KiB
Plaintext
|
|
{%
|
|
local function isKindExpandable(kind)
|
|
return kind ~= "Manual"
|
|
end
|
|
%}
|
|
|
|
<nav>
|
|
<header>
|
|
{% if (not ldoc.root) then %}
|
|
<h1><a href="{* ldoc.url('') *}">Lua For Barotrauma Documentation</a></h1>
|
|
{% end %}
|
|
<input id="search" type="search" autocomplete="off" placeholder="Search..." />
|
|
</header>
|
|
|
|
<section>
|
|
{% for kind, mods, type in ldoc.kinds() do %}
|
|
{% if (ldoc.allowed_in_contents(type, mod)) then %}
|
|
<details class="category" open>
|
|
<summary>
|
|
<h2>{{kind}}</h2>
|
|
</summary>
|
|
|
|
<ul>
|
|
{% for currentMod in mods() do %}
|
|
{% local name = ldoc.display_name(currentMod) %}
|
|
<li>
|
|
{% if (isKindExpandable(kind)) then %}
|
|
<details {{currentMod.name == (mod or {}).name and "open" or ""}}>
|
|
<summary><a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a></summary>
|
|
|
|
<ul>
|
|
{% else %}
|
|
<a href="{* ldoc.ref_to_module(currentMod) *}">{{name}}</a>
|
|
{% end %}
|
|
|
|
{% if (isKindExpandable(kind)) then
|
|
currentMod.items:sort(function(a, b)
|
|
return a.name < b.name
|
|
end)
|
|
end %}
|
|
|
|
{%
|
|
local isThereFunctions = false
|
|
for k, v in pairs(currentMod.items) do
|
|
if (v.kind == "functions") then
|
|
isThereFunctions = true
|
|
break
|
|
end
|
|
end
|
|
%}
|
|
|
|
{% if isThereFunctions then %}
|
|
<li>
|
|
<label class="colorful-label">FUNCTIONS</label>
|
|
</li>
|
|
{% end %}
|
|
|
|
{% for k, v in pairs(currentMod.items) do %}
|
|
{% if (v.kind == "functions") then %}
|
|
<li>
|
|
{* ldoc.sidebar_item(v, currentMod) *}
|
|
</li>
|
|
{% end %}
|
|
{% end %}
|
|
|
|
{%
|
|
local isThereFields = false
|
|
for k, v in pairs(currentMod.items) do
|
|
if (v.kind == "fields" or v.kind == "tables") then
|
|
isThereFields = true
|
|
break
|
|
end
|
|
end
|
|
%}
|
|
|
|
{% if isThereFields then %}
|
|
<li>
|
|
<label class="colorful-label">FIELDS</label>
|
|
</li>
|
|
{% end %}
|
|
|
|
{% for k, v in pairs(currentMod.items) do %}
|
|
{% if (v.kind == "fields" or v.kind == "tables") then %}
|
|
<li>
|
|
{* ldoc.sidebar_item(v, currentMod) *}
|
|
</li>
|
|
{% end %}
|
|
{% end %}
|
|
|
|
{% if (isKindExpandable(kind)) then %}
|
|
</ul>
|
|
</details>
|
|
{% end %}
|
|
</li>
|
|
{% end %}
|
|
</ul>
|
|
</details>
|
|
{% end %}
|
|
{% end %}
|
|
</section>
|
|
</nav>
|