Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128---import { Font } from "astro:assets"
interface Props { title: string;}
const links = [ { href: '/', label: 'home' }, { href: '/blog', label: 'blog' }, { href: '/gallery', label: 'gallery' },]
const media = [ { href: 'https://tangled.org/davidv.mu', label: 'tangled' }, { href: 'https://codeberg.org/dmun', label: 'codeberg' }, { href: 'https://github.com/dmun', label: 'github' },]
const { title, ...attrs } = Astro.props;---
<html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <Font cssVariable="--font-libron" preload /> <Font cssVariable="--font-ah-next" preload /> <title>{title}</title> <nav> {links.map(({ href, label }) => ( <a href={href} aria-current={Astro.url.pathname === href ? 'page' : undefined}> {label} </a> ))} </nav> </head> <div class="hr" /> <body> <main {...attrs}> <slot /> </main> </body> <div class="hr" /> <footer> <nav class="footer"> {media.map(({ href, label }) => ( <a href={href}>{label}</a> ))} </nav> </footer></html>
<style is:global> :root { --bg: white; --text: #000; }
@media (prefers-color-scheme: dark) { :root { --bg: black; --text: white; } }
body { background: var(--bg); color: var(--text);
max-width: 42rem; margin: 12% auto; padding: 0 1rem; line-height: 1.6; }
.footer { display: flex; flex-direction: row-reverse; text-decoration: underline; }
a { font-family: var(--font-libron), mono; color: var(--text); padding-inline: 4px; /* text-decoration: none; */
&[aria-current="page"] { font-style: italic; font-weight: bold; text-decoration: underline; }
&:visited { font-style: italic; }
&:hover { color: var(--bg); background: var(--text) } }
nav { margin-bottom: 1em; }
.hr { border-top:1px dotted var(--text); margin-block: 1em; }
h1, h2 { font-family: var(--font-ah-next), system-ui, sans-serif; letter-spacing: -0.02em; font-weight: 600; }
ul, p { font-family: var(--font-libron), system-ui, sans-serif; }
code { /* font-family: var(--font-ah-mono), system-ui, sans-serif; */ }</style>