Skip to content

Commit

Permalink
fix(website): only show footer on landing
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Aug 11, 2024
1 parent 8cfc398 commit c9fbcec
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions website/src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
<footer class="footer">
<div class="container">
<p class="small-text">&copy; {new Date().getFullYear()} Binsider. All rights reserved.</p>
<p class="small-text">
Built with <a href="https://ratatui.rs" target="_blank" rel="noopener noreferrer">Rust & Ratatui</a> on <a href="https://github.com/orhun/binsider" target="_blank" rel="noopener noreferrer">GitHub</a> 🦀
</p>
<p class="small-text">In memory of Jia Tan 🏴</p>
</div>
</footer>
---
import type { Props } from '@astrojs/starlight/props';
import Default from '@astrojs/starlight/components/Footer.astro';
const isHomepage = Astro.props.slug === '';
---

{
isHomepage ? (
<footer class="footer">
<div class="container">
<p class="small-text">&copy; {new Date().getFullYear()} Binsider. All rights reserved.</p>
<p class="small-text">
Built with <a href="https://ratatui.rs" target="_blank" rel="noopener noreferrer">Rust & Ratatui</a> on <a href="https://github.com/orhun/binsider" target="_blank" rel="noopener noreferrer">GitHub</a> 🦀
</p>
<p class="small-text">In memory of Jia Tan 🏴</p>
</div>
</footer>
) : (
<Default {...Astro.props}>
<slot />
</Default>
)
}

<style>
.footer {
Expand Down

0 comments on commit c9fbcec

Please sign in to comment.