| | |
| | | |
| | | // @ts-ignore |
| | | import script from "./scripts/toc.inline" |
| | | import { i18n } from "../i18n/i18next" |
| | | import { i18n } from "../i18n" |
| | | |
| | | interface Options { |
| | | layout: "modern" | "legacy" |
| | |
| | | return ( |
| | | <div class={classNames(displayClass, "toc")}> |
| | | <button type="button" id="toc" class={fileData.collapseToc ? "collapsed" : ""}> |
| | | <h3>{i18n(cfg.locale, "tableOfContent")}</h3> |
| | | <h3>{i18n(cfg.locale).components.tableOfContents.title}</h3> |
| | | <svg |
| | | xmlns="http://www.w3.org/2000/svg" |
| | | width="24" |
| | |
| | | return ( |
| | | <details id="toc" open={!fileData.collapseToc}> |
| | | <summary> |
| | | <h3>{i18n(cfg.locale, "tableOfContent")}</h3> |
| | | <h3>{i18n(cfg.locale).components.tableOfContents.title}</h3> |
| | | </summary> |
| | | <ul> |
| | | {fileData.toc.map((tocEntry) => ( |