Is there any way to render the site with the two main panes reversed, i.e. with the navigation pane on the left?
I know that this is a subjective matter, but most sites (including https://typedoc.org/guides/overview/!) has the navigation tree in the left pane.
Thank you!
You could do this pretty easily with the customCss option
.container-main {
flex-direction: row-reverse;
}
@media (min-width: 1024px) {
.col-content {
padding-left: 2rem;
padding-right: 0;
}
.col-menu {
border-left: 0;
border-right: 1px solid var(--color-accent);
}
}
For those interested to see how a site with the navigation pane on the left looks like, here is my first such project:
Adding a flag for every possible configuration is something I do my best to avoid -- goal is to provide a sufficiently customizable output without having to support & test every possible combination on release. (Particularly true for the theme output, since tests there aren't easy to maintain in a useful way)
I see.
From a maintainer point of view, you are right, customisation options are indeed more difficult to maintain.
However, you should also consider the user perspective; CSS knowledge is at premium and few users are able to create a configuration like the one you suggested before.
If you do not think that customisable theme options are the solution, at least consider adding a page in the documentation with possible custom CSS configurations (start with this one), such that users can directly use them without having to ask for support.
If multiple people are using the same css it'd probably be better to create a custom theme and release that. https://typedoc.org/guides/themes/
typedoc --plugin ./left-nav-theme.js --theme left-nav
// @ts-check
// CC0
const td = require("typedoc");
const fs = require("fs");
const { join } = require("path");
const css = `
.container-main {
flex-direction: row-reverse;
}
@media (min-width: 1024px) {
.col-content {
padding-left: 2rem;
padding-right: 0;
}
.col-menu {
border-left: 0;
border-right: 1px solid var(--color-accent);
}
}
`;
class LeftNavigationTheme extends td.DefaultTheme {
/** @param {td.Renderer} renderer */
constructor(renderer) {
super(renderer);
renderer.once(
td.Renderer.EVENT_END,
/** @param {td.RendererEvent} event */
(event) => {
const styleCss = join(event.outputDirectory, "assets/style.css");
fs.appendFileSync(styleCss, css);
}
);
}
}
/** @param {td.Application} app */
exports.load = function (app) {
app.renderer.defineTheme("left-nav", LeftNavigationTheme);
};
Owner Name | TypeStrong |
Repo Name | typedoc |
Full Name | TypeStrong/typedoc |
Language | TypeScript |
Created Date | 2014-05-24 |
Updated Date | 2023-03-19 |
Star Count | 6487 |
Watcher Count | 68 |
Fork Count | 639 |
Issue Count | 48 |
Issue Title | Created Date | Updated Date |
---|