aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-24 21:22:36 +0100
committerDavid Robillard <d@drobilla.net>2019-03-24 21:52:36 +0100
commit3451af94fb05cd7d545718c84afcb4fe081a8f85 (patch)
treec07665ea5741a7d862a885ae4c48b9e65009d11b
parent4ded00e4e689d5aa8a057957a9015ce9194ef737 (diff)
downloadlv2-3451af94fb05cd7d545718c84afcb4fe081a8f85.tar.xz
Use lighter and more consistent documentation style
-rw-r--r--doc/doxy-style.css370
-rw-r--r--doc/header.html56
-rw-r--r--doc/index.html.in135
-rw-r--r--doc/style.css320
-rwxr-xr-xlv2specgen/lv2specgen.py106
-rw-r--r--lv2specgen/template.html130
6 files changed, 613 insertions, 504 deletions
diff --git a/doc/doxy-style.css b/doc/doxy-style.css
index 9df6937..52fdc05 100644
--- a/doc/doxy-style.css
+++ b/doc/doxy-style.css
@@ -1,68 +1,113 @@
body {
- max-width: 80em;
- margin: 0;
+ background: #FFF;
+ color: #222;
+ font-style: normal;
+ line-height: 1.6em;
margin-left: auto;
margin-right: auto;
- background: #FFF;
- color: #000;
+ padding: 1em;
+ max-width: 60em;
+ font-family: "DejaVu Serif",Palatino,serif;
+ text-rendering: optimizeLegibility;
}
-#titlearea {
- display: none;
+h1, .title, #projectname, h2, h3, h4, h5, h6 {
+ line-height: 1.0125em;
+ color: #444;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ margin: 1em 0 0.5em 0;
+}
+
+h1, .titlearea .header .titlebox, #projectname {
+ font-size: 300%;
+ font-weight: 400;
+ margin-bottom: 0.25em;
+ margin-top: 0;
}
-h1 {
+.header .headertitle .title {
font-size: 180%;
- font-weight: 900;
+ font-weight: 400;
+ margin: 0.75em 0.25em 0.5em 0;
}
-h2 {
- font-size: 140%;
- font-weight: 700;
+.ingroups {
+ display: inline;
+}
+.title .ingroups a {
+ font-size: small;
+ margin-left: 1em;
}
-h3 {
- font-size: 120%;
- font-weight: 700;
+#titlebox, #metabox {
+ display: inline-block;
+}
+#titlebox{
+ display: inline-block;
+ width: 75%;
+ left: 0;
+ top: 0;
}
-h4 {
- font-size: 110%;
- font-weight: 700;
+#title {
+ margin-bottom: 0.25em;
}
-h5 {
- font-size: 100%;
- font-weight: 700;
+#shortdesc {
+ margin: 0;
+ color: #666;
+ display: inline-block;
+ font-style: italic;
+ padding: 0;
}
-h6 {
- font-size: 100%;
- font-weight: 600;
+#titlearea {
+ margin: 0.25em auto 0.25em auto;
+ padding: 0;
+ position: relative;
+ clear: both;
+ line-height: 1.0em;
}
-p {
- margin: 0 0 1em 0;
+h2 {
+ font-size: 160%;
+ font-weight: 400;
}
-dt {
- font-weight: 700;
+h3 {
+ font-size: 140%;
+ font-weight: 400;
}
-p.startli,p.startdd,p.starttd {
- margin-top: 2px;
+h4 {
+ font-size: 120%;
+ font-weight: 500;
}
-p.endli {
- margin-bottom: 0;
+h5, h6 {
+ font-size: 110%;
+ font-weight: 600;
+}
+
+h1 a, h1 a:link, h1 a:visited ,
+h2 a, h2 a:link, h2 a:visited ,
+h3 a, h3 a:link, h3 a:visited ,
+h4 a, h4 a:link, h4 a:visited ,
+h5 a, h5 a:link, h5 a:visited ,
+h6 a, h6 a:link, h6 a:visited {
+ color: #444;
+}
+
+p {
+ margin: 0.5em 0 0.5em 0;
}
-p.enddd {
- margin-bottom: 4px;
+dt {
+ font-weight: 700;
}
-p.endtd {
- margin-bottom: 2px;
+dd {
+ margin-left: 2em;
}
caption {
@@ -115,30 +160,20 @@ code {
color: #444;
}
-a.code {
- color: #4665A2;
-}
-
-a.codeRef {
- color: #4665A2;
-}
-
/* @end */
dl.el {
margin-left: -1cm;
}
.fragment {
- font-family: monospace, fixed;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
}
pre.fragment {
border: 1px solid #C4C4C4;
background-color: #F9F9F9;
- padding: 4px 6px;
- margin: 4px 8px 4px 2px;
+ padding: 0.5em;
overflow: auto;
- line-height: 125%;
}
div.ah {
@@ -167,10 +202,11 @@ div.groupText {
font-style: italic;
}
-div.contents {
- margin-top: 10px;
- margin-left: 10px;
- margin-right: 10px;
+div.contents, #content {
+ padding: 0 0.25em 0 0.25em;
+ max-width: 60em;
+ margin-left: auto;
+ margin-right: auto;
}
td.indexkey {
@@ -188,6 +224,10 @@ td.indexvalue {
margin: 2px 0;
}
+table.memname {
+ font-family: "DejaVu Sans Mono",monospace,fixed;
+}
+
tr.memlist {
background-color: #EEF1F7;
}
@@ -213,7 +253,6 @@ div.center img {
address.footer {
text-align: right;
- padding-right: 12px;
}
img.footer {
@@ -273,17 +312,20 @@ hr {
margin: 2em 0 1em;
}
-hr.footer {
- height: 1px;
+#footer {
+ bottom: 0;
+ clear: both;
+ font-size: x-small;
+ margin: 2em 0 0;
+ padding: 0 1em 1em 1em;
+ vertical-align: top;
+ color: #888;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0.125em;
-}
-
-h2.groupheader {
- margin: 0.5em 0 0.25em 0;
+ line-height: 1.3em;
}
.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,.memTemplItemLeft,.memTemplItemRight,.memTemplParams {
@@ -297,7 +339,7 @@ h2.groupheader {
.memItemLeft,.memItemRight,.memTemplParams {
border: 0;
- font-family: monospace, fixed;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
}
.memItemLeft,.memTemplItemLeft {
@@ -322,7 +364,7 @@ td.memSeparator {
td.mlabels-right {
vertical-align: top;
padding-top: 4px;
- color: #AA6;
+ color: #B4C342;
}
.memtitle {
@@ -333,13 +375,15 @@ td.mlabels-right {
/* @group Member Details */
/* Styles for detailed member documentation */
.memtemplate {
- color: #4665A2;
- font-weight: bold;
+ color: #888;
+ font-style: italic;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
+ font-size: small;
}
.memnav {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
+ background-color: #EEE;
+ border: 1px solid #B4C342;
text-align: center;
margin: 2px;
margin-right: 15px;
@@ -347,23 +391,25 @@ td.mlabels-right {
}
.memitem {
- padding: 0;
- margin: 1em 0 1em 0;
+ padding: 0.25em 0.5em 0.25em 0.5em;
+ margin: 0 0 1em 0;
+ border-radius: 6px;
+ border: 1px solid #DDD;
}
.memproto {
- padding: 0;
- font-weight: bold;
- color: #000;
+ font-size: 110%;
+ font-weight: 400;
+ line-height: 1em;
+ color: #000;
}
.memproto .paramname {
- color: #444;
font-style: normal;
}
.memdoc {
- padding: 0 0 0.5em 2em;
+ padding: 0 0.25em 0 0.25em;
}
.paramkey {
@@ -371,37 +417,54 @@ td.mlabels-right {
}
.paramtype {
- color: #3E873E;
+ color: #666;
+ padding-right: 0.5em;
white-space: nowrap;
}
.paramname {
- color: #444;
+ color: #111;
white-space: nowrap;
- font-weight: bold;
-}
-
-td.paramname {
- vertical-align: top;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
+ font-style: italic;
+ padding-right: 0.5em;
}
.fieldname {
color: #000;
}
+.fieldtable {
+ padding-top: 0.25em;
+ border-top: 1px dashed #DDD;
+}
+
+.fieldtable tbody tr:first-child {
+ display: none;
+}
+
td.fieldname {
- padding-right: 1em;
+ padding: 0 0.5em 0 0.25em;
vertical-align: top;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
}
td.fieldtype {
+ color: #666;
+ padding: 0 0.5em 0 0;
vertical-align: top;
- color: #444;
- padding-right: 0.5em;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
}
td.fielddoc p {
margin: 0;
+ vertical-align: top;
+ padding: 0 0.5em 0 0;
+}
+
+p.reference {
+ font-size: x-small;
+ font-style: italic;
}
/* @end */
@@ -442,6 +505,22 @@ td.fielddoc p {
vertical-align: -30%;
}
+td.entry {
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ font-weight: 400;
+ padding-right: 1em;
+}
+
+td.entry .arrow {
+ display: none;
+}
+
+td.entry b {
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ font-weight: 400;
+ font-size: 130%;
+}
+
/* these are for tree view when not used as main index */
.directory-alt {
font-size: 100%;
@@ -479,7 +558,7 @@ div.dynheader {
address {
font-style: normal;
- color: #2A3D61;
+ color: #444;
}
table.doxtable {
@@ -511,23 +590,20 @@ table.doxtable th {
}
div.navpath {
- padding: 0.25em;
+ color: #DDD;
}
.navpath ul {
- font-size: x-small;
- color: #8AA0CC;
overflow: hidden;
margin: 0;
padding: 0;
}
.navpath li {
- list-style-type: none;
float: left;
- padding-left: 10px;
- padding-right: 15px;
- color: #364D7C;
+ padding-left: 0;
+ margin-left: 0.5em;
+ padding-right: 1em;
}
.navpath a {
@@ -536,62 +612,68 @@ div.navpath {
outline: none;
}
-.navpath a:hover {
- color: #6884BD;
-}
-
div.summary {
- float: right;
- font-size: x-small;
- padding: 0.25em 0.5em 0 0;
- width: 50%;
- text-align: right;
+ font-size: small;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ margin: 0;
+ color: #FFF; /* Hide separator bars */
+ border-bottom: 1px solid #DDD;
+ padding: 0.25em 0;
}
div.summary a {
white-space: nowrap;
}
-div.header {
- background-color: #F3F3F3;
- margin: 0;
+/* Metadata box (right aligned next to title) */
+
+#metabox {
+ display: inline-block;
+ font-size: x-small;
+ margin: 0 0 0.25em 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ color: #666;
+ font-style: italic;
+ padding: 0 1em;
+}
+
+#meta {
+ border-style: hidden;
+ margin-right: 0.25em;
+}
+
+#meta tr, #meta th, #meta td {
+ background-color: transparent;
border: 0;
+ margin: 0;
+ font-weight: normal;
}
-div.headertitle {
- font-size: 180%;
- font-weight: bold;
- color: #FFF;
- padding: 0.125em 0.25em 0.125em 0.25em;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- border: solid 1px #444;
- border-top: 0;
- border-radius: 0 0 6px 6px;
+#meta th {
+ text-align: right;
+}
+
+#meta th:after {
+ content: ":";
}
div.line {
- font-family: monospace, fixed;
- font-size: 13px;
- min-height: 13px;
- line-height: 1.0;
- text-wrap: avoid;
+ font-family: "DejaVu Sans Mono",monospace,fixed;
+ line-height: 1.4em;
white-space: pre-wrap;
- text-indent: -53px;
- padding-left: 53px;
- padding-bottom: 0;
- margin: 0;
}
.glow {
- background-color: cyan;
- box-shadow: 0 0 10px cyan;
+ background-color: #2AA198;
+ box-shadow: 0 0 10px #2AA198;
}
span.lineno {
padding-right: 4px;
text-align: right;
- border-right: 2px solid #0F0;
+ border-right: 2px solid #546E00;
background-color: #E8E8E8;
white-space: pre;
}
@@ -604,22 +686,17 @@ span.lineno a:hover {
}
.tabs, .tabs2, .navpath {
- background-image: none;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- border: 0;
- border-bottom: solid 2px #000;
- padding: 0;
- padding-top: 2px;
- font-size: small;
-}
-
-#navrow1 {
- border: 0;
+ padding: 0.25em 0;
+ border-bottom: 1px solid #DDD;
+ font-size: small;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ margin: 0;
}
th {
text-align: left;
+ font-size: 110%;
+ font-weight: 500;
}
.mlabel {
@@ -638,40 +715,23 @@ th {
display: table-cell;
line-height: 2em;
list-style: none;
- background-color: #333;
- background: linear-gradient(to bottom, #444 0%, #222 100%);
- border: 1px solid #222;
border-bottom: 0;
- border-radius: 6px 6px 0 0;
- color: #DDD;
}
.tablist a {
display: block;
- padding: 0 20px;
- font-weight: bold;
- color: #859900;
+ padding: 0 1em 0 0;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
text-decoration: none;
outline: none;
}
-.header a {
- color: #859900;
-}
-
.tabs3 .tablist a {
padding: 0 10px;
}
-.tablist a:hover {
- color: #fff;
- text-shadow: 0 1px 1px rgba(0, 0, 0, 1.0);
- text-decoration: none;
-}
-
.tablist li.current a {
- color: #fff;
- text-shadow: 0 1px 1px rgba(0, 0, 0, 1.0);
+ color: #222;
}
span.icon {
diff --git a/doc/header.html b/doc/header.html
index d91ed6a..2e419e3 100644
--- a/doc/header.html
+++ b/doc/header.html
@@ -1,23 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>LV2: File List</title>
-<link href="doxy-style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td style="padding-left: 0.5em;">
- <div id="projectname">LV2
- &#160;<span id="projectnumber">1.0.13</span>
- </div>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+ <!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
+ <!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
+ <link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
+ $extrastylesheet
+ </head>
+ <body>
+ <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+
+ <!--BEGIN TITLEAREA-->
+ <div id="titlearea">
+ <div id="header">
+ <div id="titlebox">
+ <!--BEGIN PROJECT_LOGO-->
+ <div id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></div>
+ <!--END PROJECT_LOGO-->
+ <!--BEGIN PROJECT_NAME-->
+ <h1 id="title">$projectname</h1>
+ <!--END PROJECT_NAME-->
+ <!--BEGIN PROJECT_BRIEF-->
+ <div id="shortdesc">$projectbrief</div>
+ <!--END PROJECT_BRIEF-->
+ </div>
+ <div id="metabox">
+ <table id="meta">
+ <!--BEGIN PROJECT_NUMBER-->
+ <tr><th>Version</th><td>$projectnumber</td></tr>
+ <!--END PROJECT_NUMBER-->
+ </table>
+ </div>
+ </div>
+ </div>
+ <!--END TITLEAREA-->
+ <!-- end header part -->
diff --git a/doc/index.html.in b/doc/index.html.in
index b30f804..12040ee 100644
--- a/doc/index.html.in
+++ b/doc/index.html.in
@@ -16,81 +16,80 @@
<div id="titlebox">
<h1 id="title">LV2 Specifications</h1>
</div>
- <table id="meta">
- <!--<tr><th>URI</th><td><a href="@URI@">@URI@</a></td></tr>
- <tr><th>Version</th><td>@REVISION@</td></tr>-->
- <!--<tr><th>Prefixes</th><td>@PREFIXES@</td></tr>-->
- <tr><th>Version</th><td>@LV2_VERSION@</td></tr>
- <tr><th>Date</th><td>@DATE@</td></tr>
- <tr><th>Discuss</th>
- <td>
- <a href="mailto:devel@lists.lv2plug.in">devel@lists.lv2plug.in</a>
- <a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in">(subscribe)</a>
- </td>
- </tr>
- </table>
+ <div id="metabox">
+ <table id="meta">
+ <tr><th>Version</th><td>@LV2_VERSION@</td></tr>
+ <tr><th>Date</th><td>@DATE@</td></tr>
+ <tr><th>Discuss</th>
+ <td>
+ <a href="mailto:devel@lists.lv2plug.in">devel@lists.lv2plug.in</a>
+ <a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in">(subscribe)</a>
+ </td>
+ </tr>
+ </table>
+ </div>
</div>
- <ul id="contents">
- <!-- <li><a href="#sec-description">Description</a></li> -->
- <li><a href="#sec-index">Index</a></li>
- <li><a href="#sec-history">History</a></li>
- </ul>
- </div>
-
- <!-- DESCRIPTION -->
- <!-- <h2 class="sec" id="sec-description">Description</h2> -->
- <div class="content">
- <p>All official LV2 specifications.</p>
</div>
- <!-- INDEX -->
- <!-- <h2 class="sec" id="sec-index">Index</h2> -->
- <div class="content">
- <a id="sec-index"></a>
- <table class="index" summary="An index of LV2 specifications">
- <thead>
- <tr>
- <th>Specification</th>
- <th>API</th>
- <th>Description</th>
- <th>Version</th>
- <th>Status</th>
- </tr>
- </thead>
- <tbody>
-@ROWS@
- </tbody>
- </table>
- </div>
+ <div id="content">
+ <div id="contentsbox">
+ <!-- Contents: -->
+ <ul id="contents">
+ <!-- <li><a href="#sec-description">Description</a></li> -->
+ <li><a href="#sec-index">Index</a></li>
+ <li><a href="#sec-history">History</a></li>
+ </ul>
+ </div>
+ <hr class="contentssep" />
- <!-- HISTORY -->
- <h2 class="sec" id="sec-history">History</h2>
- <div class="content">
- @HISTORY@
- </div>
+ <!-- INDEX -->
+ <div class="section">
+ <a id="sec-index"></a>
+ <table class="index" summary="An index of LV2 specifications">
+ <thead>
+ <tr>
+ <th>Specification</th>
+ <th>API</th>
+ <th>Description</th>
+ <th>Version</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ @ROWS@
+ </tbody>
+ </table>
+ </div>
- <!-- FOOTER -->
- <div id="footer">
- <div>
- This document is available under the
- <a about="" rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
- Creative Commons Attribution-ShareAlike License
- </a>
+ <!-- HISTORY -->
+ <h2 class="sec" id="sec-history">History</h2>
+ <div class="section">
+ @HISTORY@
</div>
- <div>
- Valid
- <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/rdfa-syntax"
- href="http://validator.w3.org/check?uri=referer">
- XHTML+RDFa
- </a>
- and
- <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/CSS2"
- href="http://jigsaw.w3.org/css-validator/check/referer">
- CSS
- </a>
- generated from <tt>meta.ttl</tt>
+
+ <!-- FOOTER -->
+ <div id="footer">
+ <div>
+ This document is available under the
+ <a about="" rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
+ Creative Commons Attribution-ShareAlike License
+ </a>
+ </div>
+ <div>
+ Valid
+ <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/rdfa-syntax"
+ href="http://validator.w3.org/check?uri=referer">
+ XHTML+RDFa
+ </a>
+ and
+ <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/CSS2"
+ href="http://jigsaw.w3.org/css-validator/check/referer">
+ CSS
+ </a>
+ generated from <tt>meta.ttl</tt>
+ </div>
</div>
- </div>
+ </div>
</body>
</html>
diff --git a/doc/style.css b/doc/style.css
index 361f049..377530b 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -2,15 +2,6 @@
/* Specgen style */
-html, body {
- background: #FFF;
- color: #000;
- margin: 0;
- padding: 0;
- max-width: 60em;
- margin-left: auto;
- margin-right: auto;
-}
a:link, a:visited {
text-decoration: none;
}
@@ -27,55 +18,71 @@ img {
border: 0;
}
h1, h2, h3, h4, h5, h6 {
- line-height: 1em;
- margin: 0.75em 0 0.5em 0;
+ line-height: 1.0125em;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ margin-top: 1em;
+ margin-bottom: 0.5em;
}
h1 {
- font-size: 180%;
- font-weight: 900;
+ font-size: 300%;
+ font-weight: 400;
+}
+h1 a, h1 a:link, h1 a:visited ,
+h2 a, h2 a:link, h2 a:visited ,
+h3 a, h3 a:link, h3 a:visited ,
+h4 a, h4 a:link, h4 a:visited ,
+h5 a, h5 a:link, h5 a:visited ,
+h6 a, h6 a:link, h6 a:visited {
+ color: #444;
}
h2 {
- font-size: 140%;
- font-weight: 700;
+ font-size: 200%;
+ font-weight: 400;
}
h3 {
- font-size: 120%;
- font-weight: 700;
+ font-size: 140%;
+ font-weight: 400;
}
-h4 {
+h4, h4 a, h4 a:link, h4 a:visited {
+ color: black;
font-size: 110%;
- font-weight: 700;
+ font-weight: 500;
}
h5 {
font-size: 100%;
- font-weight: 700;
+ font-weight: 600;
}
h6 {
font-size: 100%;
- font-weight: 600;
+ font-weight: 700;
}
-#titlebox, #meta {
+#titlebox, #metabox {
display: inline-block;
}
#titlebox{
display: inline-block;
- width: 75%;
+ max-width: 60%;
left: 0;
top: 0;
}
-#meta {
+#metabox {
+ float: right;
display: inline-block;
- position: absolute;
+ font-size: x-small;
+ margin: 0 0 0.25em 0;
right: 0;
top: 0;
- padding: 0.125em;
- font-size: x-small;
+ color: #666;
+ font-style: italic;
+ padding: 0 1em;
+}
+#meta {
border-style: hidden;
}
#meta tr, #meta th, #meta td {
border: 0;
font-weight: normal;
- padding: 0.125em 0.25em 0.125em 0.25em;
+ padding: 0 0 0.125em 0;
background-color: transparent;
}
#meta th {
@@ -88,8 +95,11 @@ h6 {
font-size: small;
}
#shortdesc {
- font-size: small;
- margin-top: 0.25em;
+ padding: 0;
+ margin: 0 0 0.5em 0;
+ font-style: italic;
+ color: #666;
+ display: inline-block;
}
#logo {
height: 63px;
@@ -97,6 +107,9 @@ h6 {
margin-top: 10px;
width: 100px;
}
+#titlesep {
+ color: #DDD;
+}
#content-body {
border-bottom: 0;
display: block;
@@ -340,9 +353,8 @@ blockquote {
bottom: 0;
clear: both;
font-size: x-small;
- margin: 2em 0 0;
- padding: 0 1em 1em 1em;
- vertical-align: top;
+ margin: 2em 0 0 0;
+ padding: 0;
color: #888;
}
@@ -360,8 +372,15 @@ blockquote {
}
body {
background: #FFF;
- color: #000;
- margin: 0;
+ color: #222;
+ font-style: normal;
+ line-height: 1.6em;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 1em;
+ max-width: 60em;
+ font-family: "DejaVu Serif",Palatino,serif;
+ text-rendering: optimizeLegibility;
}
:link {
background: transparent;
@@ -372,7 +391,6 @@ body {
color: #609;
}
.sec {
- color: #000;
margin: 0.5em 0 0.5em 0;
padding: 1ex 0 0.5ex 0;
}
@@ -381,16 +399,19 @@ ul, ol {
padding-top: 0;
margin: 0 0 0.5ex 0;
}
+#topbar {
+ line-height: 1em;
+}
@media print {
#topbar {
color: #000;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
+ margin: 0.25em auto 0.25em auto;
padding: 0.25em 0.5em 0.5em 0.5em;
max-width: 60em;
position: relative;
- border-bottom: solid 1px #DDD;
+ }
+ #contentsbox {
+ display: none;
}
#topbar a, #topbar a:visited {
color: #000
@@ -404,138 +425,152 @@ ul, ol {
}
@media screen {
#topbar {
- background-color: #222;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- border-bottom: solid 2px #333;
- border-left: solid 2px #333;
- border-right: solid 2px #333;
- border-radius: 0 0 6px 6px;
- color: #EEE;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- padding: 0.25em 0.5em 0 0.5em;
+ margin: 0.25em auto 0.25em auto;
+ padding: 0;
max-width: 60em;
position: relative;
}
- #topbar a, #topbar a:visited {
- color: #9DB359;
- }
- #title a, #title a:visited {
- color: #FFF;
+ #contentsbox {
+ color: #546E00;
+ font-size: small;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ margin: 0.5em 0 0.5em 0;
}
#contents {
- margin-top: 0.25em;
- padding: 0.25ex 0 0 0;
- vertical-align: middle;
- font-size: small;
+ display: inline;
+ padding: 0;
}
#contents li {
display: inline;
list-style-type: none;
- margin-right: 1.25em;
+ margin-left: 0;
+ margin-right: 0.5em;
padding: 0.25ex;
}
+ hr.contentssep {
+ line-height: 0.5;
+ margin: 0 0 1em 0;
+ padding: 0;
+ }
}
#title {
- font-size: 200%;
- font-weight: 700;
- margin: 0;
- padding: 0;
+ margin-top: 0;
+ margin-bottom: 0.25em;
}
-.content {
- padding: 0 0.5em 0 0.5em;
- margin: 0;
+#content {
+ clear: both;
+ padding: 0;
max-width: 60em;
margin-left: auto;
margin-right: auto;
}
+.section {
+ padding: 0;
+}
+.category {
+ font-size: small;
+ color: #AAA;
+ float: right;
+ vertical-align: bottom;
+ padding: 0;
+ margin: 0;
+ padding-right: 0.25em;
+}
.label {
font-style: italic;
+ margin-top: 0.25em;
+ color: #666;
}
-.index, table {
+table.index {
border-collapse: initial;
- border-spacing: 0;
border-radius: 6px;
-}
-table th {
+ border-spacing: 0;
border: 0;
- border-right: 1px solid #BBB;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
+ font-size: small;
+ line-height: 1.5em;
+ width: 100%;
}
table thead th {
- border-bottom: 1px solid #BBB;
+ border: 0;
+ border-bottom: 1px solid #DDD;
}
table thead tr:first-child th {
- border-top: 1px solid #BBB;
+ border: 0;
}
table td {
- vertical-align: top;
border: 0;
- border-right: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
}
table td:first-child {
- border-left: 1px solid #BBB;
-}
-.index ul {
- padding-left: 1em;
- border-collapse: initial;
-}
-table thead tr th:first-child,
-table tbody:first-child tr:first-child th:first-child {
- border-top-left-radius: 6px;
- border-left: 1px solid #BBB;
-}
-table thead tr th,
-table tbody:first-child tr:first-child th {
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
-}
-table thead tr th:last-child,
-table tbody:first-child tr:first-child th:last-child,
-table tbody:first-child tr:first-child td:last-child {
- border-top: 1px solid #BBB;
- border-top-right-radius: 6px;
+ border: 0;
}
-table tbody tr:last-child td:first-child,
-table tbody tr:last-child th:first-child {
- border-bottom-left-radius: 6px;
- border-left: 1px solid #BBB;
+.index td {
+ vertical-align: top;
}
-table tbody tr th:first-child {
- border-left: 1px solid #BBB;
+.index ul {
+ padding-left: 1.25em;
+ margin-left: 0;
+ list-style-type: circle;
}
-table tbody tr:last-child td:last-child,
-table tr:last-child td:last-child {
- border-bottom-right-radius: 6px;
+.index ul li
+{
+ padding-left: 0;
+ color: #888;
}
.prop {
margin: 0;
padding: 0;
}
.description {
- margin-top: 0.25em;
+ margin-top: 0;
margin-bottom: 0.75em;
}
-.blankdesc {
- margin: 0 0 0.5em 0;
- padding: 0 0 0.5em 0;
+.blankdesc, .blankdef {
+ margin: 0;
+ padding: 0;
+ border-spacing: 0;
}
.blankdesc tbody tr td, .blankdef {
border: 0!important;
}
+.blankdesc td {
+ padding-right: 0.5em;
+}
+.blankdesc tbody tr td:first-child {
+ border-left: 1px solid #BBB;
+ text-align: right;
+}
.terminfo, .restriction {
- border-collapse: collapse;
- border-style: hidden;
+ border-collapse: initial;
+ border-spacing: 0;
+ font-size: small;
+ color: #666;
+ border-radius: 0;
+ border-bottom-left-radius: 6px;
+ border-bottom-right-radius: 6px;
}
-.terminfo tbody tr td {
- margin-bottom: 1em;
+table.terminfo {
+ border-top: 0;
+ margin: 0;
+ margin-left: 1.5em;
+ margin-bottom: 1.5em;
+ padding: 0;
+ float: right;
+ border-bottom: 1px solid #EEE;
+ max-width: 50%;
}
-.terminfo th, .terminfo td, .description th, .description td {
- border-top: 0!important;
- border-right: 0!important;
- border-bottom: 0!important;
- border-left: 0!important;
+table.terminfo tbody tr:last-child td:first-child,
+table.terminfo tbody tr:last-child th:first-child {
+ border-bottom-left-radius: 6px;
+ border-left: 1px solid #BBB;
+}
+.restriction {
+ border-style: hidden;
+}
+.terminfo th {
+ text-align: right;
+ padding-right: 0;
+ font-size: 100%;
}
.restriction {
margin: 0 0 0.5ex 0;
@@ -546,33 +581,31 @@ table tr:last-child td:last-child {
vertical-align: text-top;
}
.terminfo th {
- padding: 0 0.75em 0.125em 0;
+ padding: 0.125em 0.25em 0.125em 0.5em;
+ border-left: 1px solid #EEE!important;
vertical-align: top;
}
-.terminfo td, .terminfo td:first-child {
- padding: 0 1em 0 0;
-}
.specterm {
border: 0;
- margin: 0;
+ margin: 1em 0 3em 0;
padding: 0;
- margin-bottom: 1em;
+ clear: both;
}
-.specterm h3 {
- font-size: large;
- font-weight: bold;
- margin: 0;
+.specterm h4 {
+ margin-bottom: 0;
+ display: inline;
}
.spectermbody {
- padding: 0 1em 1em 2em;
+ border-top: 1px solid #EEE;
+ padding: 0;
}
dl {
margin: 0;
padding: 0;
}
dt {
- font-weight: 700;
- margin-top: .75ex;
+ margin-top: .5em;
+ font-family: "DejaVu Sans",Helvetica,Arial,sans-serif;
}
hr {
background-color: #DDD;
@@ -595,18 +628,22 @@ div.head table {
}
table {
border-collapse: initial;
- border-spacing: 0;
+ border-spacing: 1.0em 0;
margin: 0;
border: 0;
}
-td, th {
- border: 1px solid #BBB;
- padding: 0.25em 0.5em 0.25em 0.5em;
-}
th {
- font-weight: bold;
+ font-size: 115%;
+ font-weight: 500;
text-align: left;
+ padding-bottom: 0.5em;
}
+
+p {
+ font-family: inherit;
+ margin-bottom: 1em;
+}
+
pre {
margin: 1em 1em 1em 4em;
padding: 0;
@@ -629,13 +666,10 @@ h1, h2, h3, h4, h5, h6, th {
}
.error {
color: #DC322F;
- font-weight: bold;
}
.warning {
color: #B58900;
- font-weight: bold;
}
.success {
color: #859900;
- font-weight: bold;
}
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index c8612e1..dd77b9c 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -466,30 +466,14 @@ def getTermLink(uri, subject=None, predicate=None):
return '<a href="%s" %s>%s</a>' % (uri, extra, niceName(uri))
-def rdfsClassInfo(term, m):
- """Generate rdfs-type information for Classes: ranges, and domains."""
- global classranges
- global classdomains
+def owlRestrictionInfo(term, m):
+ """Generate OWL restriction information for Classes"""
doc = ""
- # Find subClassOf information
restrictions = []
- superclasses = []
- for st in findStatements(m, term, rdfs.subClassOf, None):
- if not isBlank(getObject(st)):
- uri = getObject(st)
- if not uri in superclasses:
- superclasses.append(uri)
- else:
- meta_type = findOne(m, getObject(st), rdf.type, None)
- restrictions.append(getSubject(meta_type))
-
- if len(superclasses) > 0:
- doc += "\n<tr><th>Subclass of</th>"
- first = True
- for superclass in sorted(superclasses):
- doc += getProperty(getTermLink(superclass), first)
- first = False
+ for s in findStatements(m, term, rdfs.subClassOf, None):
+ if findOne(m, getObject(s), rdf.type, owl.Restriction):
+ restrictions.append(getObject(s))
for r in sorted(restrictions):
props = findStatements(m, r, None, None)
@@ -501,38 +485,49 @@ def rdfsClassInfo(term, m):
elif getPredicate(p) == rdfs.comment:
comment = getObject(p)
if onProp is not None:
- doc += '<tr><th>Restriction on %s</th><td>' % getTermLink(onProp)
+ doc += '<dl><dt>Restriction on %s</dt>\n' % getTermLink(onProp)
prop_str = ''
- last_pred = None
- first = True
for p in findStatements(m, r, None, None):
if (getPredicate(p) == owl.onProperty
or getPredicate(p) == rdfs.comment
or (getPredicate(p) == rdf.type and getObject(p) == owl.Restriction)
or getPredicate(p) == lv2.documentation):
- last_pred = None
continue
- if getPredicate(p) != last_pred:
- prop_str += '<tr><th>%s</th>\n' % getTermLink(getPredicate(p))
- first = True
+ prop_str += getTermLink(getPredicate(p))
+
if isResource(getObject(p)):
- prop_str += getProperty(getTermLink(getObject(p)), first)
- first = False
+ prop_str += ' ' + getTermLink(getObject(p))
elif isLiteral(getObject(p)):
- prop_str += getProperty(getLiteralString(getObject(p)), first)
- first = False
+ prop_str += ' ' + getLiteralString(getObject(p))
- last_pred = getPredicate(p)
+ if comment is not None:
+ prop_str += '\n<div>%s</div>\n' % getLiteralString(comment)
- prop_str += endProperties(first)
+ doc += '<dd>%s</dd></dl>' % prop_str if prop_str else '';
- if prop_str != '':
- doc += '<table class=\"restriction\">%s</table>\n' % prop_str
- if comment is not None:
- doc += "<span>%s</span>\n" % getLiteralString(comment)
- doc += '</td></tr>'
+ return doc
+
+def rdfsClassInfo(term, m):
+ """Generate rdfs-type information for Classes: ranges, and domains."""
+ global classranges
+ global classdomains
+ doc = ""
+
+ # Find subClassOf information
+ superclasses = set()
+ for st in findStatements(m, term, rdfs.subClassOf, None):
+ if not isBlank(getObject(st)):
+ uri = getObject(st)
+ superclasses |= set([uri])
+
+ if len(superclasses) > 0:
+ doc += "\n<tr><th>Subclass of</th>"
+ first = True
+ for superclass in sorted(superclasses):
+ doc += getProperty(getTermLink(superclass), first)
+ first = False
# Find out about properties which have rdfs:domain of t
d = classdomains.get(str(term), "")
@@ -683,27 +678,15 @@ def docTerms(category, list, m, classlist, proplist, instalist):
is_deprecated = isDeprecated(m, term)
doc += '<div class="spectermbody">'
- if label != '' or comment != '' or is_deprecated:
- doc += '<div class="description">'
-
- if label != '':
- doc += "<div property=\"rdfs:label\" class=\"label\">%s</div>" % label
-
- if is_deprecated:
- doc += '<div class="warning">DEPRECATED</div>'
-
- if comment != '':
- doc += "<div property=\"rdfs:comment\">%s</div>" % comment
-
- if label != '' or comment != '' or is_deprecated:
- doc += "</div>"
terminfo = ""
+ extrainfo = ""
if category == 'Property':
terminfo += owlInfo(term, m)
terminfo += rdfsPropertyInfo(term, m)
if category == 'Class':
terminfo += rdfsClassInfo(term, m)
+ extrainfo += owlRestrictionInfo(term, m)
if category == 'Instance':
terminfo += rdfsInstanceInfo(term, m)
@@ -712,6 +695,23 @@ def docTerms(category, list, m, classlist, proplist, instalist):
if (len(terminfo) > 0): # to prevent empty list (bug #882)
doc += '\n<table class="terminfo">%s</table>\n' % terminfo
+ if label != '' or comment != '' or is_deprecated:
+ doc += '<div class="description">'
+
+ if label != '':
+ doc += "<div property=\"rdfs:label\" class=\"label\">%s</div>" % label
+
+ if is_deprecated:
+ doc += '<div class="warning">Deprecated</div>'
+
+ if comment != '':
+ doc += "<div class=\"comment\" property=\"rdfs:comment\">%s</div>" % comment
+
+ doc += extrainfo
+
+ if label != '' or comment != '' or is_deprecated:
+ doc += "</div>"
+
doc += '</div>'
doc += "\n</div>\n\n"
diff --git a/lv2specgen/template.html b/lv2specgen/template.html
index 5056aef..9d25d80 100644
--- a/lv2specgen/template.html
+++ b/lv2specgen/template.html
@@ -17,77 +17,79 @@
</head>
<body>
- <!-- HEADER -->
- <div id="topbar">
- <div id="header">
- <div id="titlebox">
- <h1 id="title">@NAME@</h1>
- <div id="subtitle"><a href="@URI@">@URI@</a></div>
- <div id="shortdesc">@SHORT_DESC@</div>
+ <!-- HEADER -->
+ <div id="topbar">
+ <div id="header">
+ <div id="titlebox">
+ <h1 id="title">@NAME@</h1>
+ <div id="shortdesc">@SHORT_DESC@</div>
+ </div>
+ <div id="metabox">
+ <table id="meta">
+ <tr><th>ID</th><td><a href="@URI@">@URI@</a></td></tr>
+ <tr><th>Version</th><td>@VERSION@</td></tr>
+ <tr><th>Date</th><td>@DATE@</td></tr>
+ @MAIL@
+ @AUTHORS@
+ </table>
+ </div>
</div>
- <table id="meta">
- <!--<tr><th>URI</th><td><a href="@URI@">@URI@</a></td></tr>
- <tr><th>Version</th><td>@REVISION@</td></tr>-->
- <!--<tr><th>Prefixes</th><td>@PREFIXES@</td></tr>-->
- <tr><th>Version</th><td>@VERSION@</td></tr>
- <tr><th>Date</th><td>@DATE@</td></tr>
- @MAIL@
- @AUTHORS@
- </table>
</div>
- <ul id="contents">
- <!-- <li><a href="#sec-description">Description</a></li> -->
- <li><a href="#sec-index">Index</a></li>
- <li><a href="#sec-reference">Reference</a></li>
- <li><a href="#sec-history">History</a></li>
- @CONTENT_LINKS@
- </ul>
- </div>
- <!-- DESCRIPTION -->
- <!--<h2 class="sec" id="sec-description">Description</h2>-->
- <div class="content">@COMMENT@</div>
+ <div id="content">
+ <div id="contentsbox">
+ <!-- Contents: -->
+ <ul id="contents">
+ <!-- <li><a href="#sec-description">Description</a></li> -->
+ <li><a href="#sec-reference">Reference</a></li>
+ <li><a href="#sec-history">History</a></li>
+ @CONTENT_LINKS@
+ </ul>
+ </div>
+ <hr class="contentssep" />
- <!-- INDEX -->
- <h2 class="sec" id="sec-index">Index</h2>
- <div class="content" id="index">
- @INDEX@
- </div>
+ <!-- DESCRIPTION -->
+ <!--<h2 class="sec" id="sec-description">Description</h2>-->
+ <div class="section">@COMMENT@</div>
- <!-- DOCUMENTATION -->
- <h2 class="sec" id="sec-reference">Reference</h2>
- <div class="content">
- @REFERENCE@
- </div>
+ <!-- REFERENCE -->
+ <h2 class="sec" id="sec-reference">Reference</h2>
+ <div class="section">
+ <div id="indexbox">
+ @INDEX@
+ @REFERENCE@
+ </div>
+ </div>
- <!-- HISTORY -->
- <h2 class="sec" id="sec-history">History</h2>
- <div class="content">
- @HISTORY@
- </div>
+ <!-- HISTORY -->
+ <h2 class="sec" id="sec-history">History</h2>
+ <div class="section">
+ @HISTORY@
+ </div>
- <!-- FOOTER -->
- <div id="footer">
- <div>
- This document is available under the
- <a about="" rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
- Creative Commons Attribution-ShareAlike License
- </a>
- </div>
- <div>
- Valid
- <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/rdfa-syntax"
- href="http://validator.w3.org/check?uri=referer">
- XHTML+RDFa
- </a>
- and
- <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/CSS2"
- href="http://jigsaw.w3.org/css-validator/check/referer">
- CSS
- </a>
- generated from @FILENAME@ by <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>
- </div>
- </div>
+ <!-- FOOTER -->
+ <div id="footer">
+ <div>
+ This document is available under the
+ <a about="" rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
+ Creative Commons Attribution-ShareAlike License
+ </a>
+ </div>
+ <div>
+ Valid
+ <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/rdfa-syntax"
+ href="http://validator.w3.org/check?uri=referer">
+ XHTML+RDFa
+ </a>
+ and
+ <a about="" rel="dct:conformsTo" resource="http://www.w3.org/TR/CSS2"
+ href="http://jigsaw.w3.org/css-validator/check/referer">
+ CSS
+ </a>
+ generated from @FILENAME@ by <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>
+ </div>
+ </div>
+ </div>
</body>
</html>