From ec7cac5dbf5f2280cf3d99ac4faea4b67c725358 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 28 Nov 2019 03:04:26 -0500 Subject: [PATCH] doc: Add a summary next to the property/method title. --- docs/config.ld | 8 ++++---- docs/ldoc.css | 11 +++++++++++ docs/ldoc.ltp | 34 +++++++++++++++++++++++----------- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/docs/config.ld b/docs/config.ld index 94e170bf..05a7cf32 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -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 = { diff --git a/docs/ldoc.css b/docs/ldoc.css index b85cf6a6..3fe8a09d 100644 --- a/docs/ldoc.css +++ b/docs/ldoc.css @@ -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; +} diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index bab49c9e..7cab1787 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -11,12 +11,12 @@ # end @@ -214,13 +214,21 @@ · Inherited from $(item.display_inheritance) -# end + +# end -- display_inheritance # if item.display_type then ($(item.display_type)) # end + # if item.inherited then -  · Inherited from $(item.baseclass) + · Inherited from $(item.baseclass) # end +# if item.extra_summary then +# for _, col in ldoc.ipairs(item.extra_summary) do + · $(col.count.." "..col.title) +# end -- summary col +# end -- summary + # if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then line $(item.lineno) # end @@ -316,10 +324,14 @@ # end -- if usage -
- - Click to display more - +# if item.extra_summary then +
+
+ + Click to display more + +
+# end # if ldoc.custom_tags then