summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2016-07-01 01:22:50 -0700
committerAlexander Early <alexander.early@gmail.com>2016-07-01 01:22:59 -0700
commit6f9ffd3dc51d1f67cde2caf0474241e1039f1bae (patch)
tree53b316a62800d023b0c3706904c7a4d067b09673
parentb87689c56e3918327c86bf9a6a20cf635d3d778c (diff)
downloadasync-6f9ffd3dc51d1f67cde2caf0474241e1039f1bae.tar.gz
update params table style, re-order doc items
-rw-r--r--support/jsdoc/jsdoc-fix-html.js2
-rw-r--r--support/jsdoc/theme/static/styles/jsdoc-default.css25
-rw-r--r--support/jsdoc/theme/tmpl/method.tmpl32
-rw-r--r--support/jsdoc/theme/tmpl/params.tmpl21
4 files changed, 44 insertions, 36 deletions
diff --git a/support/jsdoc/jsdoc-fix-html.js b/support/jsdoc/jsdoc-fix-html.js
index 981228a..a45b383 100644
--- a/support/jsdoc/jsdoc-fix-html.js
+++ b/support/jsdoc/jsdoc-fix-html.js
@@ -11,7 +11,7 @@ var pageTitle = 'Methods:';
var docFilename = 'docs.html';
var mainModuleFile = 'module-async.html';
var mainSectionId = '#main';
-var sectionTitleClass = '.page-title'
+var sectionTitleClass = '.page-title';
var HTMLFileBegin = '<!DOCTYPE html>\n<html lang="en">\n<head>\n';
var HTMLFileHeadBodyJoin = '</head>\n<body>';
diff --git a/support/jsdoc/theme/static/styles/jsdoc-default.css b/support/jsdoc/theme/static/styles/jsdoc-default.css
index 640d523..5cfede3 100644
--- a/support/jsdoc/theme/static/styles/jsdoc-default.css
+++ b/support/jsdoc/theme/static/styles/jsdoc-default.css
@@ -67,9 +67,9 @@ h3 {
}
h4 {
- font-size: 18px;
+ font-size: 20px;
margin: 1em 0 .2em;
- padding-top: 4em;
+ padding-top: 6em;
color: #4d4e53;
}
@@ -462,6 +462,26 @@ code {
user-select: text;
}
+table.params {
+ margin-top: 1em;
+ box-shadow: none;
+ border: none;
+}
+
+table.params td, table.params th {
+ border: none;
+ padding: 0 15px 8px 0;
+}
+
+table.params td.type {
+ white-space: nowrap;
+}
+
+.params .optional {
+ font-size: 80%;
+ color: hsl(0, 0%, 56%);
+}
+
.params, .props {
border-spacing: 0;
border: 1px solid #ddd;
@@ -493,6 +513,7 @@ code {
.params thead tr, .props thead tr {
background-color: #fff;
font-weight: bold;
+ color: hsl(0, 0%, 56%);
}
.params .params thead tr, .props .props thead tr {
diff --git a/support/jsdoc/theme/tmpl/method.tmpl b/support/jsdoc/theme/tmpl/method.tmpl
index be60b8d..2cc0d80 100644
--- a/support/jsdoc/theme/tmpl/method.tmpl
+++ b/support/jsdoc/theme/tmpl/method.tmpl
@@ -45,6 +45,23 @@ var self = this;
<?js= this.partial('params.tmpl', params) ?>
<?js } ?>
+<?js if (data.returns && returns.length) { ?>
+<h5>Returns:</h5>
+<?js if (returns.length > 1) { ?><ul><?js
+ returns.forEach(function(r) { ?>
+ <li><?js= self.partial('returns.tmpl', r) ?></li>
+ <?js });
+?></ul><?js } else {
+ returns.forEach(function(r) { ?>
+ <?js= self.partial('returns.tmpl', r) ?>
+ <?js });
+} } ?>
+
+<?js if (data.examples && examples.length) { ?>
+ <h5>Example<?js= examples.length > 1? 's':'' ?></h5>
+ <?js= this.partial('examples.tmpl', examples) ?>
+<?js } ?>
+
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
@@ -87,19 +104,4 @@ var self = this;
<?js });
} } ?>
-<?js if (data.returns && returns.length) { ?>
-<h5>Returns:</h5>
-<?js if (returns.length > 1) { ?><ul><?js
- returns.forEach(function(r) { ?>
- <li><?js= self.partial('returns.tmpl', r) ?></li>
- <?js });
-?></ul><?js } else {
- returns.forEach(function(r) { ?>
- <?js= self.partial('returns.tmpl', r) ?>
- <?js });
-} } ?>
-<?js if (data.examples && examples.length) { ?>
- <h5>Example<?js= examples.length > 1? 's':'' ?></h5>
- <?js= this.partial('examples.tmpl', examples) ?>
-<?js } ?>
diff --git a/support/jsdoc/theme/tmpl/params.tmpl b/support/jsdoc/theme/tmpl/params.tmpl
index 1dc3ecf..edace6e 100644
--- a/support/jsdoc/theme/tmpl/params.tmpl
+++ b/support/jsdoc/theme/tmpl/params.tmpl
@@ -59,9 +59,6 @@
<th>Type</th>
- <?js if (params.hasAttributes) {?>
- <th>Attributes</th>
- <?js } ?>
<?js if (params.hasDefault) {?>
<th>Default</th>
@@ -87,23 +84,11 @@
<?js if (param.type && param.type.names) {?>
<?js= self.partial('type.tmpl', param.type.names) ?>
<?js } ?>
- </td>
- <?js if (params.hasAttributes) {?>
- <td class="attributes">
- <?js if (param.optional) { ?>
- &lt;optional><br>
- <?js } ?>
-
- <?js if (param.nullable) { ?>
- &lt;nullable><br>
- <?js } ?>
-
- <?js if (param.variable) { ?>
- &lt;repeatable><br>
- <?js } ?>
- </td>
+ <?js if (params.hasAttributes && param.optional) {?>
+ <span class=optional>&lt;optional&gt;</span>
<?js } ?>
+ </td>
<?js if (params.hasDefault) {?>
<td class="default">