Page Sections footerportfoliominimal
Dev Footer
Minimal footer with a row of mono links, copyright and a small “built with” note.
Live Preview
Usage
Copy and paste this code into your Astro page:
astro
---
import { DevFooter } from 'astro-component-kit/sections';
---
<DevFooter name="Noa Lindqvist" links={[{ label: 'Blog', href: '/blog/' }]} note="Built with Astro" /> ---
import { DevFooter } from 'astro-component-kit/sections';
---
<DevFooter name="Noa Lindqvist" links={[{ label: 'Blog', href: '/blog/' }]} note="Built with Astro" /> Examples in context
Real code from the kit: how this piece is used inside templates, sections and other components.
PortfolioLayout.astro astro
<DevFooter
name={site.name}
links={[...links, { label: 'GitHub', href: site.contacts.find((c) => c.kind === 'github')?.href ?? '#' }]}
note="Keycap theme · Astro & Three.js"
/> <DevFooter
name={site.name}
links={[...links, { label: 'GitHub', href: site.contacts.find((c) => c.kind === 'github')?.href ?? '#' }]}
note="Keycap theme · Astro & Three.js"
/> Used in
Templates
Works well with
Manual Installation
If you are not using the npm package, create a new file and paste the following code: src/components/lib/DevFooter.astro:
astro
---
/**
* DevFooter — Minimal footer for developer portfolios ("Keycap" design): a row of mono links, the
* copyright and an optional "built with" note, separated by a hairline.
*
* @param {string} name - Copyright holder.
* @param {Array<{label: string, href: string}>} links - Footer links.
* @param {string} note - Optional small note (e.g. "Built with Astro & Three.js").
* @param {number} year - Copyright year. Default current year.
* @param {string} className - Extra class.
*
* Accessibility: contentinfo landmark with a labelled nav; 44px link targets on touch screens.
*/
interface Props {
name?: string;
links?: Array<{ label: string; href: string }>;
note?: string;
year?: number;
className?: string;
}
const { name = 'Noa Lindqvist', links = [{ label: 'Home', href: '/' }, { label: 'Projects', href: '/projects/' }, { label: 'Blog', href: '/blog/' }, { label: 'Contact', href: '/contact/' }], note, year = new Date().getFullYear(), className = '' } = Astro.props;
---
<footer class:list={['dvft', className]}>
<div class="dvft__wrap">
{links.length > 0 && (
<nav aria-label="Footer">
<ul class="dvft__links">{links.map((l) => <li><a href={l.href}>{l.label}</a></li>)}</ul>
</nav>
)}
<p class="dvft__copy">© {year} {name}{note && <span class="dvft__note"> · {note}</span>}</p>
</div>
</footer>
<style>
.dvft { border-top: 1px solid var(--c-border); padding: 2rem 0; color: var(--c-text-2); }
.dvft__wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 1.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.dvft__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.dvft__links a { display: inline-flex; align-items: center; min-height: 32px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--c-text-2); text-decoration: none; transition: color 0.2s ease; }
.dvft__links a:hover { color: var(--c-text-1); }
.dvft__links a:focus-visible { outline: 2px solid var(--c-text-1); outline-offset: 2px; }
.dvft__copy { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-text-3); }
@media (hover: none) { .dvft__links a { min-height: 44px; } }
</style> ---
/**
* DevFooter — Minimal footer for developer portfolios ("Keycap" design): a row of mono links, the
* copyright and an optional "built with" note, separated by a hairline.
*
* @param {string} name - Copyright holder.
* @param {Array<{label: string, href: string}>} links - Footer links.
* @param {string} note - Optional small note (e.g. "Built with Astro & Three.js").
* @param {number} year - Copyright year. Default current year.
* @param {string} className - Extra class.
*
* Accessibility: contentinfo landmark with a labelled nav; 44px link targets on touch screens.
*/
interface Props {
name?: string;
links?: Array<{ label: string; href: string }>;
note?: string;
year?: number;
className?: string;
}
const { name = 'Noa Lindqvist', links = [{ label: 'Home', href: '/' }, { label: 'Projects', href: '/projects/' }, { label: 'Blog', href: '/blog/' }, { label: 'Contact', href: '/contact/' }], note, year = new Date().getFullYear(), className = '' } = Astro.props;
---
<footer class:list={['dvft', className]}>
<div class="dvft__wrap">
{links.length > 0 && (
<nav aria-label="Footer">
<ul class="dvft__links">{links.map((l) => <li><a href={l.href}>{l.label}</a></li>)}</ul>
</nav>
)}
<p class="dvft__copy">© {year} {name}{note && <span class="dvft__note"> · {note}</span>}</p>
</div>
</footer>
<style>
.dvft { border-top: 1px solid var(--c-border); padding: 2rem 0; color: var(--c-text-2); }
.dvft__wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 1.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.dvft__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.dvft__links a { display: inline-flex; align-items: center; min-height: 32px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--c-text-2); text-decoration: none; transition: color 0.2s ease; }
.dvft__links a:hover { color: var(--c-text-1); }
.dvft__links a:focus-visible { outline: 2px solid var(--c-text-1); outline-offset: 2px; }
.dvft__copy { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-text-3); }
@media (hover: none) { .dvft__links a { min-height: 44px; } }
</style>
Quick Info
- Category
- Page Sections
- Filename
DevFooter.astro- Dependencies
- None — pure Astro + CSS
- Tags
- footerportfoliominimal