Skip to content

Commit 380a844

Browse files
docs(*): customize typedoc theme
1 parent 3a08993 commit 380a844

File tree

5 files changed

+37
-6
lines changed

5 files changed

+37
-6
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ module.exports = function (grunt) {
154154

155155
grunt.registerTask('docs', 'Generate documentation to _doc', function() {
156156
promising(this,
157-
system('./node_modules/typedoc/bin/typedoc --readme ./README.md --name "UI-Router" --theme default --mode modules --module commonjs --target es5 --out _doc src/params src/path src/resolve src/state src/transition src/url src/view src/ng1')
157+
system('./node_modules/typedoc/bin/typedoc --readme ./README.md --name "UI-Router" --theme ./typedoctheme --mode modules --module commonjs --target es5 --out _doc src/params src/path src/resolve src/state src/transition src/url src/view src/ng1')
158158
);
159159
});
160160

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
a.tsd-anchor + h3 { display: none; }
2+
3+
4+
.tsd-panel.tsd-member {
5+
padding-top: 0;
6+
}
7+
8+
.tsd-panel .tsd-signature, .tsd-panel .tsd-signatures {
9+
background-color: #eee;
10+
}
11+
12+
.tsd-header {
13+
list-style: none;
14+
margin: 0 2em;
15+
font-weight: bold;
16+
}
17+
18+
.tsd-header p {
19+
margin-top : 0;
20+
}
21+
22+
.tsd-member .tsd-description .lead {
23+
display: none;
24+
}

typedoctheme/layouts/default.hbs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

1010
<link rel="stylesheet" href="{{relativeURL "assets/css/main.css"}}">
11+
<link rel="stylesheet" href="{{relativeURL "assets/css/typedoctheme.css"}}">
1112
<script src="{{relativeURL "assets/js/modernizr.js"}}"></script>
1213
</head>
1314
<body>

typedoctheme/partials/member.signature.body.hbs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
{{#unless hideSources}}
2-
{{> member.sources}}
3-
{{/unless}}
4-
51
{{> comment}}
62

73
{{#if typeParameters}}
@@ -53,4 +49,9 @@
5349
{{> parameter}}
5450
{{/with}}
5551
{{/if}}
56-
{{/if}}
52+
{{/if}}
53+
54+
{{#unless hideSources}}
55+
<hr>
56+
{{> member.sources}}
57+
{{/unless}}

typedoctheme/partials/member.signatures.hbs

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<ul class="tsd-signatures {{cssClasses}}">
22
{{#each signatures}}
33
<li class="tsd-signature tsd-kind-icon">{{> member.signature.title }}</li>
4+
{{#if comment.shortText}}
5+
<li class="tsd-header">
6+
{{#markdown}} {{{comment.shortText}}} {{/markdown}}
7+
</li>
8+
{{/if}}
49
{{/each}}
510
</ul>
611

0 commit comments

Comments
 (0)