From b56feddd7f53c35a54a2d06dedee2780bb74715e Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Nov 2018 14:53:40 +0100 Subject: erl_docgen: Generate "since" OTP version in html for and with "since" attribute. --- lib/erl_docgen/priv/css/otp_doc.css | 33 ++++++++++ lib/erl_docgen/priv/xsl/db_html.xsl | 125 ++++++++++++++++++++++++------------ 2 files changed, 118 insertions(+), 40 deletions(-) (limited to 'lib/erl_docgen') diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css index 34c6befb0e..89b278215c 100644 --- a/lib/erl_docgen/priv/css/otp_doc.css +++ b/lib/erl_docgen/priv/css/otp_doc.css @@ -71,6 +71,33 @@ a:visited { color: #1b6ec2; text-decoration: none } } .bold_code { font-family: mono, Courier, monospace; font-weight: bold } + +/* Invisible table for function specs, + * just to get since-version out in right margin */ +.func-table, .func-tr, .func-td, .func-since-td { + width: 200%; + border: 0; + padding: 0; + margin: 0; +} + +.func-tr:nth-child(n) { + background: inherit /* turn off zebra striped rows */ +} + +.func-td { + width: 50% +} + +.func-since-td { + width: 50%; + padding-left: 1em +} + +.func-td:hover { + background-color: #f5f5f5; +} + .code { font-family: mono, Courier, monospace; font-weight: normal; @@ -283,3 +310,9 @@ a > .code { .func-types-title{ font-size: 1em; } + +.since{ + color: gray; + font-weight: normal; + font-size: small; +} \ No newline at end of file diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index a0a922216b..c5150d447c 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -191,6 +191,7 @@ + @@ -225,11 +226,12 @@ - + - + + @@ -238,19 +240,32 @@ + -
- - - - - - - - -
+ + + + + +
+
+ + + + + + + + +
+
+ + + + +
@@ -1884,6 +1899,16 @@ + + + + Since + +
+ Module was introduced in + . +
+
@@ -2030,11 +2055,10 @@ -

- -

+ + @@ -2093,19 +2117,29 @@ - - - - - - - - - - - - -
+ + + + + +
+ + + + + + + + + + + + + + + + +
@@ -2136,14 +2170,25 @@ -
- - - - - - -
+ + + + + +
+
+ + + + + + +
+
+ + + +
-- cgit v1.2.3