Files
website/src/components/Footer.astro
T

137 lines
3.0 KiB
Plaintext

---
const linkColumns = [
{
heading: 'Learn',
links: [
{ label: 'Docs', href: 'https://docs.green-tea.dev', external: true },
{ label: 'Blog', href: '/blog', external: false },
],
},
{
heading: 'Code',
links: [
{ label: 'GitHub', href: 'https://github.com/expressive-tea/green-tea', external: true },
{ label: 'npm', href: 'https://www.npmjs.com/package/@expressive-tea/core', external: true },
],
},
];
const year = new Date().getFullYear();
---
<footer class="site-footer">
<div class="wrap site-footer__inner">
<div class="site-footer__brand">
<span class="site-footer__wordmark">Green Tea<span class="site-footer__dot">.</span></span>
<p class="site-footer__tagline">A zen, opinionated, type-safe framework.</p>
</div>
<nav class="site-footer__columns" aria-label="Footer">
{
linkColumns.map((column) => (
<div class="site-footer__column">
<p class="site-footer__heading">{column.heading}</p>
<ul>
{column.links.map((link) => (
<li>
<a href={link.href} target={link.external ? '_blank' : undefined} rel={link.external ? 'noopener noreferrer' : undefined}>
{link.label}
</a>
</li>
))}
</ul>
</div>
))
}
</nav>
</div>
<div class="wrap site-footer__bottom">
<p>© {year} · MIT · That's the tea. 🍵</p>
</div>
</footer>
<style>
.site-footer {
border-top: 1px solid color-mix(in srgb, var(--panel) 80%, var(--base));
background: var(--panel);
padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}
.site-footer__inner {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 2.5rem;
}
.site-footer__wordmark {
font-family: var(--font-heading);
font-weight: 700;
font-size: 1.15rem;
color: var(--matcha);
}
.site-footer__dot {
color: var(--violet);
}
.site-footer__tagline {
color: var(--dim);
margin: 0.6em 0 0;
max-width: 26ch;
}
.site-footer__columns {
display: flex;
gap: 3.5rem;
}
.site-footer__heading {
color: var(--ink);
font-weight: 600;
margin: 0 0 0.75em;
font-size: 0.9rem;
letter-spacing: 0.02em;
text-transform: uppercase;
opacity: 0.75;
}
.site-footer__column ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.6em;
}
.site-footer__column a {
color: var(--dim);
font-size: 0.95rem;
}
.site-footer__column a:hover,
.site-footer__column a:focus-visible {
color: var(--matcha);
}
.site-footer__bottom {
margin-top: 2.5rem;
padding-top: 1.5rem;
border-top: 1px solid color-mix(in srgb, var(--base) 60%, var(--panel));
}
.site-footer__bottom p {
margin: 0;
color: var(--dim);
font-size: 0.875rem;
}
@media (max-width: 560px) {
.site-footer__columns {
gap: 2rem;
}
}
</style>