Skip to content

Commit

Permalink
Better look
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 16, 2017
1 parent 0a56cfc commit 4a5d34f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion jsdoc/template/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function addSignatureTypes(f) {
var types = f.type ? buildItemTypeStrings(f) : [];

f.signature = (f.signature || '') + '<span class="type-signature">' +
(types.length ? ' :' + types.join('|') : '') + '</span>';
(types.length ? ': ' + types.join('|') : '') + '</span> ';
}

function addAttribs(f) {
Expand Down
13 changes: 11 additions & 2 deletions jsdoc/template/static/styles/jsdoc-default.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tt, code, kbd, samp {
}

article dl {
margin-bottom: 40px;
margin-bottom: 15px;
}

section
Expand Down Expand Up @@ -175,6 +175,7 @@ h4
{
font-size: 18px;
letter-spacing: -0.33px;
margin-top: 15px;
margin-bottom: 12px;
color: #4d4e53;
}
Expand Down Expand Up @@ -225,14 +226,19 @@ h6
font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

.details { margin-top: 14px; border-left: 2px solid #DDD; }
.details { margin-top: 14px; }
.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; }
.details dd { margin-left: 70px; }
.details ul { margin: 0; }
.details ul { list-style-type: none; }
.details li { margin-left: 30px; padding-top: 6px; }
.details pre.prettyprint { margin: 0 }
.details .object-value { padding-top: 0; }
.details .tag-source {
position: absolute;
display: block;
right: 520px;
}

.description {
margin-bottom: 1em;
Expand Down Expand Up @@ -361,3 +367,6 @@ h6
.disabled {
color: #454545;
}
.param-desc p {
display: initial;
}
8 changes: 3 additions & 5 deletions jsdoc/template/tmpl/details.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,13 @@ if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvalu
<?js } ?>

<?js if (data.meta) {?>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<div class="tag-source">
<?js
var baseUrl = 'https://github.com/camptocamp/ngeo/blob/' +
(process.env.TRAVIS_BRANCH || 'master') + '/';
?>
<a href="<?js= baseUrl ?><?js= meta.shortpath ?>"><?js= meta.shortpath ?></a>,
<a href="<?js= baseUrl ?><?js= meta.shortpath ?>#L<?js= meta.lineno ?>">line <?js= meta.lineno ?></a>
</li></ul></dd>
<a href="<?js= baseUrl ?><?js= meta.shortpath ?>#L<?js= meta.lineno ?>"><?js= meta.shortpath ?>:<?js= meta.lineno ?></a>
</div>
<?js } ?>

<?js if (data.tutorials && tutorials.length) {?>
Expand Down
18 changes: 5 additions & 13 deletions jsdoc/template/tmpl/returns.tmpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
<?js
var data = obj || {};
if (data.description) {
?>
<div class="param-desc">
<?js= description ?>
</div>
<?js if (data.typeDefinitionUrl) { ?>
<?js= data.typeDefinitionUrl ?>
<?js } ?>

<?js if (data.typeDefinitionUrl) {?>
<dl>
<dt>
Type
</dt>
<dd>
<?js= data.typeDefinitionUrl ?>
</dd>
</dl>
<?js if (data.description) { ?>
<?js= data.description ?>
<?js } ?>
</div>

0 comments on commit 4a5d34f

Please sign in to comment.