From d649d3e940b35bf960e7091e4ba2531dc76253eb Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 11 Aug 2023 01:20:31 +0200 Subject: [PATCH] fix: add flag to reduce dom weight --- .../src/components/PageContent/PageContent.astro | 13 +++++++++---- website/src/layouts/ReferenceLayout.astro | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/website/src/components/PageContent/PageContent.astro b/website/src/components/PageContent/PageContent.astro index 9c433945f..3c2eff0c3 100644 --- a/website/src/components/PageContent/PageContent.astro +++ b/website/src/components/PageContent/PageContent.astro @@ -8,9 +8,10 @@ type Props = { frontmatter: Frontmatter; headings: MarkdownHeading[]; githubEditUrl: string; + hideMoreMenu?: boolean; }; -const { frontmatter, headings, githubEditUrl } = Astro.props as Props; +const { frontmatter, headings, githubEditUrl, hideMoreMenu } = Astro.props as Props; const title = frontmatter.title; const currentPage = Astro.url.pathname; --- @@ -22,9 +23,13 @@ const currentPage = Astro.url.pathname; - + { + !hideMoreMenu && ( + + ) + }