feat(plugin-docs-toc): set max height of TOC and hide TOC in mobile layout
MODIFY
packages/plugin-docs/client/theme-doc/Layout.tsx
packages/plugin-docs/client/theme-doc/Layout.tsx
@@ -26,9 +26,6 @@ export default (props: any) => {
<div className="w-full flex flex-row justify-center overflow-x-hidden">
<div className="container flex flex-row justify-center">
<div className="w-full lg:w-1/2 px-4 lg:px-0 m-8 z-20 lg:py-12">
- <div className="lg:hidden">
- <Toc />
- </div>
<article className="flex-1">{props.children}</article>
</div>
</div>

MODIFY
packages/plugin-docs/client/theme-doc/Toc.tsx
packages/plugin-docs/client/theme-doc/Toc.tsx
@@ -16,7 +16,7 @@ export default () => {
border-gray-100 p-8 rounded-xl z-20"
>
<p className="text-lg font-extrabold">{route.titles[0].title}</p>
- <ul>
+ <ul className="max-h-[calc(100vh-360px)] overflow-y-scroll fadeout py-2">
{titles.map((item: any) => {
return (
<li

feat(plugin-docs-toc): set max height of TOC and hide TOC in mobile layout (#297)