doc: Add a summary next to the property/method title.

This commit is contained in:
Emmanuel Lepage Vallee 2019-11-28 03:04:26 -05:00
parent 46c86351a0
commit ec7cac5dbf
3 changed files with 38 additions and 15 deletions

View File

@ -444,10 +444,10 @@ local named_args = {
-- Sections which are hidden by default, but visible when clicked.
local summarize = {
emits = {index = 1, title = "Signals" },
propemits = {index = 2, title = "Signals" },
usebeautiful = {index = 3, title = "Theme variables"},
propbeautiful = {index = 4, title = "Theme variables"}
emits = {index = 1, title = "signals" },
propemits = {index = 2, title = "signals" },
usebeautiful = {index = 3, title = "theme variables"},
propbeautiful = {index = 4, title = "theme variables"}
}
local delimiter_for_tag = {

View File

@ -471,3 +471,14 @@ pre .url { color: #272fc2; text-decoration: underline; }
.show_more {
display: default
}
.show_more_button {
display:block;
position: relative;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 15px;
padding-left: 15px;
border: 1px solid rgb(210, 210, 220);
color: rgb(128, 128, 128);
border-radius: 7px;
}

View File

@ -11,12 +11,12 @@
# end
<script>
function show_extra(id) {
var cur = document.getElementById(id).className
var cur = document.getElementById("item"+id).className
if (cur == "hide_extra")
document.getElementById(id).className = "show_more"
else
document.getElementById(id).className = "hide_extra"
if (cur == "hide_extra") {
document.getElementById("item"+id).className = "show_more"
document.getElementById("button"+id).className = "hide_extra"
}
}
</script>
@ -214,13 +214,21 @@
<span class="inheritance">
&middot Inherited from
<a href="$(item.display_inheritance)">$(item.display_inheritance)</a>
# end
</span>
# end -- display_inheritance
# if item.display_type then
<span class="proptype">($(item.display_type))</span>
# end
<span class="baseclass" $(nowrap)>
# if item.inherited then
<span class="baseclass" $(nowrap)>&nbsp;&middot;&nbsp;Inherited from $(item.baseclass)</span>
&middot;&nbsp;Inherited from $(item.baseclass)
# end
# if item.extra_summary then
# for _, col in ldoc.ipairs(item.extra_summary) do
&middot $(col.count.." "..col.title)
# end -- summary col
# end -- summary
</span>
# 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
@ -316,10 +324,14 @@
</ul>
# end -- if usage
<br />
<a class="deprecated_h2" onclick="show_extra('$("item"..item.uid)')">
Click to display more
</a>
# if item.extra_summary then
<br />
<center id=button$(item.uid)>
<a class="show_more_button" onclick="show_extra('$(item.uid)')">
Click to display more
</a>
</center>
# end
<span id=item$(item.uid) class="hide_extra">
# if ldoc.custom_tags then