Skip to content

Commit 4ba8fe1

Browse files
committed
JSDoc/Docstrap generation
- "Source" section doesn't invoke a bullet, "src/" leading path removed - Minor styles
1 parent 6941555 commit 4ba8fe1

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

docs/build/docstrap-master/template/static/styles/default.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Change with theme as appropriate..
44
*/
55

66
.deprecated-notice {
7+
border: 2px solid rgb(255, 238, 238);
78
padding: 10px;
9+
margin-bottom: 10px;
810
}
911

1012
.toc-deprecated {
@@ -18,3 +20,7 @@ Change with theme as appropriate..
1820

1921
.returns-desc {
2022
}
23+
24+
dt a {
25+
font-weight: normal;
26+
}

docs/build/docstrap-master/template/tmpl/details.tmpl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ function deprecatedHeading (data) {
1313
return "Deprecated"
1414
}
1515
}
16+
function cleanShortPath (shortpath) {
17+
return shortpath.replace(/^.*\bsrc[/]/, '');
18+
}
1619
?>
1720
<dl class="details">
1821
<?js
@@ -78,10 +81,9 @@ function deprecatedHeading (data) {
7881
<?js } ?>
7982

8083
<?js if (data.meta) {?>
81-
<dt class="tag-source">Source:</dt>
82-
<dd class="tag-source"><ul class="dummy"><li>
83-
<?js= self.linkto(meta.shortpath) ?><?js if (this.navOptions.linenums) {?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'sunlight-1-line-' + meta.lineno) ?><?js } ?>
84-
</li></ul></dd>
84+
<dt class="tag-source">Source -
85+
<?js= self.linkto(meta.shortpath, cleanShortPath(meta.shortpath)) ?><?js if (this.navOptions.linenums) {?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'sunlight-1-line-' + meta.lineno) ?><?js } ?>
86+
</dt>
8587
<?js } ?>
8688

8789
<?js if (data.tutorials && tutorials.length) {?>

0 commit comments

Comments
 (0)