Skip to content

Commit bd901b2

Browse files
committed
Added file anchor to sidebar.
Set file link color.
1 parent 86a9f77 commit bd901b2

File tree

1 file changed

+9
-2
lines changed
  • packages/doxdox-renderer-bootstrap/src

1 file changed

+9
-2
lines changed

packages/doxdox-renderer-bootstrap/src/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ ${method.returns.map(
6565
</div>
6666
`;
6767

68-
const renderFileNav = (file: File) => `<p><b>${file.path}</b></p>
68+
const renderFileNav = (file: File) => `<p><a href="#${
69+
file.path
70+
}" class="file-name"><b>${file.path}</b></a></p>
6971
<ul class="list-unstyled ml-0">
7072
${file.methods
7173
.map(
@@ -78,7 +80,8 @@ ${file.methods
7880
</ul>`;
7981

8082
const renderFile = (file: File) =>
81-
`${file.methods.map(method => renderMethod(method)).join('')}`;
83+
`<a name="${file.path}" />
84+
${file.methods.map(method => renderMethod(method)).join('')}`;
8285

8386
export default async (doc: Doc): Promise<string> => `<!DOCTYPE html>
8487
<html>
@@ -109,6 +112,10 @@ export default async (doc: Doc): Promise<string> => `<!DOCTYPE html>
109112
font-weight: 200;
110113
}
111114
115+
.file-name {
116+
color: #E54D89;
117+
}
118+
112119
.method-name {
113120
position: relative;
114121
}

0 commit comments

Comments
 (0)