mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-19 18:41:58 -04:00
fix: add flag to reduce dom weight
This commit is contained in:
@@ -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;
|
||||
<slot />
|
||||
</div>
|
||||
</section>
|
||||
<nav class="block sm:hidden">
|
||||
<MoreMenu editHref={githubEditUrl} />
|
||||
</nav>
|
||||
{
|
||||
!hideMoreMenu && (
|
||||
<nav class="block sm:hidden">
|
||||
<MoreMenu editHref={githubEditUrl} />
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
</article>
|
||||
<style>
|
||||
.content {
|
||||
|
||||
@@ -40,7 +40,7 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
|
||||
<aside title="Site Navigation" class="w-[300px] px-6 left-0 hidden md:block fixed h-full">
|
||||
<ReferenceSidebar currentPage={currentPage} />
|
||||
</aside>
|
||||
<PageContent frontmatter={frontmatter} headings={headings} githubEditUrl={githubEditUrl}>
|
||||
<PageContent hideMoreMenu={true} frontmatter={frontmatter} headings={headings} githubEditUrl={githubEditUrl}>
|
||||
<slot />
|
||||
</PageContent>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user