Commit a6d5d0df authored by Alexis Brenon's avatar Alexis Brenon
Browse files

Sort module items

parent 17bebf51
......@@ -49,6 +49,7 @@
# end
# project_hierarchy[kind_name] = hierarchy
# end
# local module_kinds = {"Fields", "Metamethods", "Public Methods", "Private Methods", "Static Fields", "Static Functions"}
# local build_dropdown
# build_dropdown = function(m, _nav_ID, classes)
......@@ -236,15 +237,19 @@
id="module-vert-nav-accordion"
aria-multiselectable="false">
# for kind,items in module.kinds() do
# if module.body then -- Just sections name
# if module.body then -- Just sections name
# for kind,items in module.kinds() do
<a class="list-group-item list-group-item-action active"
id="module-vert-nav-$(escape(no_spaces(kind)))-header"
data-parent="#module-vert-nav-accordion"
href="#$(escape(no_spaces(kind)))"
<strong>$(kind)</strong>
</a>
# else
# end
# else
# for _, kind in ldoc.ipairs(module_kinds) do
# local items = module.kinds[kind] or module.kinds[kind .. " "]
# if items then
<a class="list-group-item list-group-item-action active panel-heading panel-title"
id="module-vert-nav-$(escape(no_spaces(kind)))-header"
data-toggle="collapse"
......@@ -274,8 +279,9 @@
# end
</div> <!-- Kinds sub-list -->
# end -- if module.body
# end -- for kind, items in module
# end -- if kinds[kind]
# end -- for kinds in module
# end -- if module.body
</div> <!-- List group panel -->
</nav> <!-- Vertical module navigation -->
......@@ -463,11 +469,13 @@
<!-- Module content -->
<div class="module-content">
# for kind, items in module.kinds() do
# local kitem = module.kinds:get_item(kind)
# local has_sect_description = M(module.kinds:get_section_description(kind),nil) ~= ""
# local has_description = kitem and ldoc.descript(kitem) ~= ""
# local has_usage = kitem and kitem.usage and kitem.usage ~= ""
# for _, kind in ldoc.ipairs(module_kinds) do
# local items = module.kinds[kind] or module.kinds[kind .. " "]
# if items then
# local kitem = module.kinds:get_item(kind)
# local has_sect_description = M(module.kinds:get_section_description(kind),nil) ~= ""
# local has_description = kitem and ldoc.descript(kitem) ~= ""
# local has_usage = kitem and kitem.usage and kitem.usage ~= ""
<!-- Kind documentation -->
<section class="card mb-3 kind-section $(escape(no_spaces(kind)))-kind-section"
......@@ -673,7 +681,7 @@
</ul> <!-- Kind items -->
</section> <!-- Kind documentation -->
# end -- if items
# end -- for kind in kinds
</div> <!-- Module content -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment