Add 'back to home' link on blog posts

This commit is contained in:
Caleb Braaten 2026-01-09 16:13:59 -08:00
parent d5450a3c0a
commit d7fb16e24e
2 changed files with 40 additions and 0 deletions

View File

@ -24,6 +24,11 @@ export function Post({ children, meta }: PostProps) {
<main> <main>
<article className="blog-post"> <article className="blog-post">
<header className="post-header"> <header className="post-header">
<div className="back-button">
<a href="/" className="back-link">
<span className="back-arrow"></span> Back to Home
</a>
</div>
<h1>{meta.title}</h1> <h1>{meta.title}</h1>
<div className="post-meta"> <div className="post-meta">
{meta.date && meta.date instanceof Date && {meta.date && meta.date instanceof Date &&

View File

@ -728,6 +728,28 @@ h1 {
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
} }
.back-button {
margin-bottom: 20px;
}
.back-link {
display: inline-flex;
align-items: center;
color: var(--text-color-secondary);
text-decoration: none;
font-size: 14px;
transition: color 0.2s ease;
}
.back-link:hover {
color: var(--accent-color);
}
.back-arrow {
margin-right: 8px;
font-size: 16px;
}
.post-title { .post-title {
font-size: 42px; font-size: 42px;
font-weight: 700; font-weight: 700;
@ -1078,6 +1100,19 @@ h1 {
font-size: 28px; font-size: 28px;
} }
.back-button {
margin-bottom: 12px;
}
.back-link {
font-size: 13px;
}
.back-arrow {
font-size: 15px;
margin-right: 6px;
}
.post-content h2 { .post-content h2 {
font-size: 24px; font-size: 24px;
} }