From 78e756596636b9da61276036cacba46d99f9abfe Mon Sep 17 00:00:00 2001 From: Jiuzhen Pan <2216991777@qq.com> Date: Thu, 25 Aug 2022 00:21:36 -0700 Subject: [PATCH] fix(layout): updated site UI and layout, fixed some bugs --- components/framework/Navbar.tsx | 4 ++-- components/mdx/mdx-components.tsx | 2 +- components/mdx/toc.tsx | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/framework/Navbar.tsx b/components/framework/Navbar.tsx index 987ecaf..c3a7eb2 100644 --- a/components/framework/Navbar.tsx +++ b/components/framework/Navbar.tsx @@ -51,7 +51,7 @@ export const Navbar = ({ sidebar, ...props }) => { >
{ {t("Docs")} -
+
{ text: t("On this page"), }; + if (headings.length === 0) { + return null; + } + return ( { setShowMoblieDoc(!showMoblieDoc)} animate={{ paddingTop: hasScrolled ? "1rem" : "0.375rem", @@ -244,7 +248,7 @@ const Mobile = () => { type: "spring", bounce: 0.2, }} - className="doc-nav-expand overflow-hidden px-4 contrast-more:font-semibold sm:px-6" + className="doc-nav-expand overflow-hidden px-4 contrast-more:font-semibold sm:px-6 lg:px-14" >
{headings.map((heading) => {