- Linktree-style homepage with photo, social links, and self-hosted services (container registry, Git server) - Registry pages rendered on demand from Harbor via a live content collection, cached in memory (60s fresh, 10min stale-while-revalidate) - Pinned registry images (PINNED_IMAGES) shown first with a star - Node standalone server with security headers; self-contained server build so the Docker image ships no node_modules - Gitea workflow building multi-arch images for Flux Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
---
|
||||
import { SITE_DESCRIPTION, SITE_TITLE } from '../consts';
|
||||
import '../styles/global.css';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const { title, description = SITE_DESCRIPTION } = Astro.props;
|
||||
const canonical = Astro.site ? new URL(Astro.url.pathname, Astro.site) : undefined;
|
||||
const path = Astro.url.pathname;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{title === SITE_TITLE ? title : `${title} · ${SITE_TITLE}`}</title>
|
||||
<meta name="description" content={description} />
|
||||
{canonical && <link rel="canonical" href={canonical} />}
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav aria-label="Main">
|
||||
<a href="/" class="brand">{SITE_TITLE}</a>
|
||||
<a href="/" aria-current={path === '/' ? 'page' : undefined}>Home</a>
|
||||
<a href="/registry/" aria-current={path.startsWith('/registry') ? 'page' : undefined}>Registry</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
header,
|
||||
main {
|
||||
max-width: var(--max-width);
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--gap);
|
||||
}
|
||||
|
||||
header {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
align-items: center;
|
||||
padding-block: 1rem;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav a:hover,
|
||||
nav a[aria-current='page'] {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.brand {
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
main {
|
||||
padding-block: 2rem 4rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user