Skip to content

Commit c8878b3

Browse files
Extract footer into reusable component and improve post padding
Amp-Thread-ID: https://ampcode.com/threads/T-93bf77fa-72db-4bb1-a536-cd131e08ac34 Co-authored-by: Amp <amp@ampcode.com>
1 parent 717b76b commit c8878b3

3 files changed

Lines changed: 19 additions & 13 deletions

File tree

src/components/Footer.astro

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
---
3+
4+
<footer class="mt-16 border-t border-gray-200 pt-8">
5+
<div class="text-sm text-gray-500 font-light flex flex-col items-center gap-1">
6+
<span>
7+
AI-assisted: implementation and content are managed by
8+
<a href="https://ampcode.com" target="_blank" rel="noopener noreferrer" class="underline underline-offset-2 hover:text-gray-700">Amp</a>
9+
(coding agent).
10+
</span>
11+
<span>
12+
<a href="https://github.com/colmarius/colmarius.github.io" target="_blank" rel="noopener noreferrer" class="underline underline-offset-2 hover:text-gray-700">Source on GitHub</a>
13+
</span>
14+
<span>Copyright © {new Date().getFullYear()} Marius Colacioiu</span>
15+
</div>
16+
</footer>

src/layouts/Layout.astro

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import '../styles/global.css';
33
import Navigation from '@components/Navigation.astro';
4+
import Footer from '@components/Footer.astro';
45
56
type Props = {
67
title: string;
@@ -39,18 +40,7 @@ const currentPath = Astro.url.pathname;
3940
<slot />
4041
</main>
4142

42-
<footer class="mx-auto">
43-
<div class="text-sm text-gray-600 font-light flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2">
44-
<span>Copyright © {new Date().getFullYear()} Marius Colacioiu</span>
45-
<span class="hidden sm:inline text-gray-400">•</span>
46-
<span class="text-gray-500">
47-
AI-assisted: implementation and content are managed by
48-
<a href="https://ampcode.com" target="_blank" rel="noopener noreferrer" class="underline decoration-dotted underline-offset-2 hover:decoration-solid hover:text-gray-700">Amp</a>
49-
(coding agent).
50-
<a href="https://github.com/colmarius/colmarius.github.io" target="_blank" rel="noopener noreferrer" class="underline decoration-dotted underline-offset-2 hover:decoration-solid hover:text-gray-700">Source on GitHub</a>.
51-
</span>
52-
</div>
53-
</footer>
43+
<Footer />
5444
</div>
5545
</div>
5646

src/layouts/PostLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const isAgentPost = (tags || []).includes('AI Agents');
1616
---
1717

1818
<Layout title={title}>
19-
<article class="mx-auto max-w-2xl">
19+
<article class="mx-auto max-w-2xl pb-16">
2020
<nav class="mb-10" aria-label="Back">
2121
<BackNav href="/posts" label="Back to Posts" />
2222
</nav>

0 commit comments

Comments
 (0)