Skip to content

Commit d3dbe48

Browse files
feat(dev): add support for footer override
adds support for overriding the footer component, similar to the TopBar override setup. Users can now customize footer content such as legal terms, contact info, and copyrights. this change introduces `Footer.astro` and `FooterWrapper.astro` files to allow flexible slotting of footer items, improving customization for standalone tutorial deployments close #323
1 parent e1e9160 commit d3dbe48

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Diff for: packages/astro/src/default/components/Footer.astro

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<nav
2+
class="bg-tk-elements-footer-backgroundColor border-t border-tk-elements-app-borderColor flex justify-between p-4"
3+
>
4+
<div class="flex-1">
5+
<slot name="terms" />
6+
</div>
7+
<div class="flex-1">
8+
<slot name="contact-info" />
9+
</div>
10+
<div class="flex-1">
11+
<slot name="copyright" />
12+
</div>
13+
</nav>
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
// FooterWrapper.astro
3+
import { Footer } from 'tutorialkit:override-components';
4+
import Terms from './Terms.astro';
5+
import ContactInfo from './ContactInfo.astro';
6+
7+
const currentYear = new Date().getFullYear();
8+
---
9+
10+
<Footer>
11+
<Terms slot="terms" />
12+
<ContactInfo slot="contact-info" />
13+
<p slot="copyright"{currentYear} Your Company. All rights reserved.</p>
14+
</Footer>

0 commit comments

Comments
 (0)