Skip to content

Commit

Permalink
fix: don't display default footer on article pages
Browse files Browse the repository at this point in the history
  • Loading branch information
carsakiller committed Dec 27, 2023
1 parent b5e1e66 commit 79b943f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/layouts/Main.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ import Footer from "~/components/layout/Footer.astro";
export interface Props {
title: string;
transition?: boolean;
displayFooter?: boolean;
}
const displayFooter = Astro.props.displayFooter ?? true;
---

<Layout title={Astro.props.title} transition={Astro.props.transition}>
<Header />
<slot />
<Footer />
{displayFooter && <Footer />}
</Layout>
2 changes: 1 addition & 1 deletion src/layouts/WikiArticle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface Props {
}
---

<Layout title="Wiki" transition={true}>
<Layout title="Wiki" transition={true} displayFooter={false}>
<div class="columns">
<div id="article-browser" class="sidebar">
<button class="open"><Icon name="newspaper" group="solid" /></button>
Expand Down

0 comments on commit 79b943f

Please sign in to comment.